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