XNA 4.0 Beginner Tutorials - Breakout
This is a beginner tutorial on creating a Break Out style game. I will be writing tutorials in the future on creating the game using object-oriented programming principles. The tutorial is more to introduce XNA with a more or less complete game. It won't go into state management but it will be a functional brick breaking game.
To get started create a new XNA 4.0 game and call it BreakingOut. In the Break Out game there are three different game objects. There is the ball, the paddle, and the bricks. I will start by adding the paddle. The paddle is at the bottom of the screen. The object is to bounce the ball off the paddle and break the bricks on the screen. When all of the bricks have been destroyed game play moves to the next level. The paddle will be controlled by either the left and right arrow keys on the keyboard, the left thumb stick on a game pad or the direction pad on a game pad. You need to make sure that the paddle does not go off the left or right edges of the screen.