I am making a 2D simple Breakout game, and I would like to know of an efficient way to display all the blocks on the screen. I was thinking of dividing the whole screen into little squares that can be occupied by a block or a wall (or most objects). Is this the best way of doing it? Sorry if my question is kinda noob-ish, I just started learning to develop games.
Before all else, you should make sure you need efficiency before you go about trying to implement it. Although it's possible you (non-)architecture yourself into an irrecoverable situation and have to essentially start over, that's not really a problem. You will waste more time pondering the best way to implement something than implementing it once, learning some lessons, and re-implementing. A big refactor is ok. Onto the direct answer: For a 2D XNA game, you will get a great deal of efficiency simply by using If you need to do something more exotic for any purpose, you can generate your complete set of 2D quads and draw them all at once from a single buffer. That's also fast. |
|||||||||||||
|