Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# - GDI+

Status
Not open for further replies.

TheMidnighter

Programmer
Feb 13, 2008
1
CA
Alright, so I'm trying to make Breakout!
I had the idea of splitting my forum up into two sections, by creating a rectangle to fill with the boxes, and the other rectangle to let the paddle move on (Or, no rectangle I suppose that one's not needed)

What would be the best way to draw all the "Bricks" do ya figure? I was thinking I'd fill that Rectangle with a bunch of smaller rectangles, but I don't know if that'll work?
 
I'm not sure what engine you are creating to tell when a block has been hit - but I'd make an array of blocks - each is responsible for drawing itself. The block should simply know it's x,y position and its size.

The drawing of simple rectangles is extremely fast so don't worry about performance. I always liked the mac version "Brickles"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top