O'Reilly logo

Sams Teach Yourself Android Game Programming in 24 Hours 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

Hour 20. Entity Grouping

What You’ll Learn in This Hour

• Adding an entity grouping system to the engine

• Making the necessary engine enhancements

• Adding behavior to the game entities

• Demonstrating entity grouping

This hour covers a very big subject that is high in concept but fairly low in complexity, leading up to collision detection in the next hour. Entity grouping is the use of a list for game entities that is automatically updated by the engine. The way this works is that animations or behaviors are used to specify the activity of an entity (that is, sprite), which means “fire and forget” sprites. Give a sprite entity a simple behavior and “cut it loose” to wreak havoc—entirely on its own, so to speak. We’ll follow this up in the ...

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