Creating a 2D Platform Game
This is where the fun starts. The previous chapters covered the basics of using Java to create graphics, sound, and interactivity. In this chapter, you're going to use what you created in the previous chapters to create a real 2D platform game. Platform games are games in which the player runs and jumps from platform to platform, avoiding bad guys and collecting power-ups. To create a platform game, in this chapter you'll learn about tile-based maps, map files, collision detection, power-ups, simple bad guys, and parallax background scrolling. Check out the screenshot of the game you'll create in Screenshot.
Screenshot In this chapter, you'll create a 2D platform game with tile-based maps, bad guys, and power-ups.
NOTE This chapter is less about Java-related technology and more about game-programming techniques, so not all the code for the game is presented here. Instead, you can get the code from the website, www.brackeen.com/javagamebook, as always.