O'Reilly logo

Beginning Java SE 6 Game Programming, Third Edition by Jonathan S. Harbour

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

Chapter 6. Simple Sprites

Up to this point you have learned about a lot of Java classes that are useful for making a game, particularly the Graphics2D class. The previous two chapters provided the groundwork for this chapter by showing you how to tap into the Graphics2D class to draw vectors and bitmaps. At this point, the source code for even a simple bitmap-based game will tend to be too complicated and too difficult to manage without a better way to handle the objects in a game. What you need at this point is a new class that knows how to work with game objects—something known as an actor or a sprite. The goal of this chapter is to develop a way to handle the game objects moving around on the screen.

Here are the specific topics covered in this ...

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