O'Reilly logo

Beginning Android C++ Game Development by Bruce Sutherland

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

Game Entities

All games are made up of different objects and the way that these objects behave. Pac-Man has objects such as Pac-Man himself, the ghosts, pac-dots, power pellets, and walls. Each of these objects has a different behavior. Pac-Man responds to the player’s input and can change from being the prey to being the predator by eating a power pellet. This changes the behavior of the ghosts, who are placed into a state where they run away from the player.

Our game calls for a simpler set of behaviors, but we will construct the objects using state-of-the-art methods to get a feel for how modern games structure their game objects. Traditionally, game objects have been built with a normal class hierarchy, starting with a base ...

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