The document discusses using a component-based entity system architecture for developing a large mobile tower defense game with over 500 playable characters, complex item systems, and multiple game modes. A component-based entity system separates game objects into reusable components and uses independent processing systems, which makes the architecture easy to understand, maintain, and adapt to changing requirements. This fits well with a data-driven development approach using a database like MongoDB. The document recommends using an open-source entity system framework like Artemis and processing components in parallel threads to take advantage of the architecture.
24. Game data & config need to be
human-friendly and easy to change
• Game designers & operators are lazy human beings
Anh Cody ơi
giảm base dam,
tăng máu cho
Thạch Sanh hộ
em
Tự vào admin panel
chỉnh đê!!!
25. Short on time, while requirements
change fast
• Reuse as much as possible
• Adapt to change
26. What is the most suitable
architecture forVTT?
28. Game objects usually share common (set of) functionalities
Bird Collision,Graphics,Animation,
TouchHandling
Pipe Collision,Graphics, Movement
Ground Collision,Graphics, Movement
31. Mixins or Multiple-inheritance. No!!!
Bird Pipe Ground
Collidable
(Collision)
Renderable
Animatable
(Animation)
Movable
(Movement)
Pipe
Checkpoint
Base Game
Object
32. It’s hard to create a good OO
architecture for bigger & more
complicated games
• Impossible to build a good OOP class hierachy
• Where to put logic code that process objects of 2+
different classes?
• Easy to make mistake when working in team
37. Entities – Components
Graphics Anim Move
Along Path
Attack Skill Collection
Bonus
Officer (defend) x x x x x
Officer (run) x x x
Soldier (defend) x x x
Soldier (run) x x x
Animal x x x
• Decompose game entities by capabilities into reusable components
– Components contains only data
– Each entity has an unique ID and a list of components
• Create entities by picking the desired components
38. Systems
• Divide game aspects into systems
• Systems process only entities they care about in each game loop
Move Along
Path Sys
Animation
Sys
Collection
Bonus Sys Attack Sys Skill Sys
Officer
(defend)
Officer (run)
Soldier
(defend)
Soldier (run) Animal
42. Goes hand-in-hand with
Data-Driven Methodology
• Components are just data, separated from game logic. Entities are just
bag of components
– Can be stored & retrieved from anywhere
– Human can make changes easily
43. MongoDB as database
• Flexible data structure, welcomes changes
• Easy synchronization between client / backend
48. References
• A Data-DrivenGame Object System
http://scottbilas.com/files/2002/gdc_san_jose/game_objects_slides.ppt
• Entity Systems are the future of MMOG development
http://t-machine.org/index.php/2007/11/11/entity-systems-are-the-
future-of-mmog-development-part-2/
• EvolveYour Hierarchy
http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/
• http://gamedev.stackexchange.com/a/31491