Jump to content

Like
2Likes
Dislike
XNA 4.0 Beginner Tutorials - Breakout


I'm writing these tutorials for the new XNA 4.0 framework. The tutorials will make more sense if they are read in order. You can find the list of tutorials on the XNA 4.0 Tutorials page of my web site. I will be making my version of the project available for download at the end of each tutorial. It will be included on the page that links to the tutorials.

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.

4: Adsense

0 Comments

Note: GameDev.net moderates article comments.