Keeping It Simple

5-1

Using the game development framework built in Chapter 4, we build our first Java game–a simple single-player Pong clone with a twist. This chapter explains how to design and implement model classes and incorporate them into a single state class, which represents a game screen. Other topics covered include collision detection, input handling, dependency reduction, and simple physics.

Source Code

The following .zip download contains the full source code for each programming example provided in this chapter.

Download the Source Code (Chapter 5)

Contents:

LonePong (Complete): The full source code for the LongPong game. 

Importing Instructions:

Click Here to see how to import the above projects into your workspace.

Downloads

The following .zip download contains all assets used in this chapter.

Download the Assets (Chapter 5)

Contents:

bounce.wav, hit.wav, iconimage.png, welcome.png, line.png

Additional Information

1. For a list of all known in-text errors, please see the Errata.

This section will be updated as needed. Please post on our forums if you need assistance or explanation on topics covered in this chapter.