O'Reilly logo

Beginning Android Tablet Games Programming by Jeremy Kerfs

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required