Building the One-Player Game

Because you’ve already done so much work in previous chapters, you don’t need to change many things to build your first real game. The only files from the previous chapter that you must change for your one-character game are SpriteObject.java and GameView.java:

  1. Open a new Eclipse project, and name it AllTogether.
  2. Copy all the files from the SoundTest project in Chapter 4. Don’t forget to copy both the Java source files in the src folder and the resource files in the rsc folder.

Before you start making changes, let’s go over the procedure for handling motion and collisions.

Upgrading the Game Sprites

You begin by upgrading your sprites so you can more finely control their motion and detect collisions between them ...

Get Beginning Android Tablet Games Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.