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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access