SlideShare a Scribd company logo
Game Programming
Component-Based Entity Systems
Nick Prühs
About Me
“Best Bachelor“ Computer Science
Kiel University, 2009
Master Games
HAW Hamburg, 2011
Lead Programmer
Daedalic Entertainment, 2011-2012
Co-Founder
slash games, 2013
Microsoft MVP
2015
2 / 79
Objectives
• To understand the disadvantages of inheritance-
based game models
• To learn how to build an aggregation-based game
model
• To understand the advantages and disadvantages of
aggregation-based game models
3 / 57
“Say you’re an engineer…
… set out to create a new Game Object System from scratch, and you’re going to ‘do it right the first time’. You
talk to your designer and say ‘What kind of content are we going to have in this game?’
They respond with ‘Oh lots of stuff, trees, and birds, and bushes, and keys and locks and … <trailing off>’
And your eyes glaze over as you start thinking of fancy C++ ways to solve the problem.
The object oriented programming sages tell you to try to determine Is-A relationships and abstract functionality
and all that other fun stuff. You go to the book store and buy a C++ book just to be sure, and it tells you to fire
up your $5000 UML editor. [...]”
- Scott Bilas
4 / 57
Entities
5 / 57
Entities
6 / 57
Entities
7 / 57
Entities
8 / 57
Entities
9 / 57
Entities
10 / 57
Entities
• object in your game world
• can (or cannot)…
• be visible
• move around
• attack
• explode
• be targeted
• become selected
• follow a path
• common across all genres
11 / 57
Entities
12 / 57
Approach #1: Inheritance
13 / 57
Approach #1: Inheritance
• Entity base class
• that class and its subclasses encapsulate the main
game logic
14 / 57
Example #1: Unreal Engine 3
• base class Actor
• rendering
• animation
• sound
• physics
• almost everything in Unreal is an Actor
• Pawn extends by taking damage
• Projectile extends by spawning impact effects
15 / 57
Drawbacks of inheritance-based game models
• Diamond of Death
16 / 57
Drawbacks of inheritance-based game models
• code added to the root of the inheritance tree
causes big overhead
• code added to the leafs of the tree tends to get
copied
• root and leaf classes tend to get very big
17 / 57
Where is Waldo?
public override void TakeDamage(int damage)
{
this.Health -= damage;
}
18 / 57
Where is Waldo?
public override void TakeDamage(int damage)
{
this.Health -= damage;
}
19 / 57
Where is Waldo?
public override void TakeDamage(int damage)
{
base.TakeDamage(damage);
this.Health -= damage;
}
20 / 57
Drawbacks of inheritance-based game models
• always need to understand all base classes along
the inheritance tree
• impossible to enforce calling base class functions
• Someone will forget it. Trust me.
• And you’re gonna spend your whole evening finding that one
missing base.Update().
• deep class hierarchies will more likely run into call
order issues
21 / 57
Inheritance-based game models are…
• … difficult to develop
• … difficult to maintain
• … difficult to extend
22 / 57
“There are probably hundreds of ways…
… you could decompose your systems and come up with a set of
classes […], and eventually, all of them are wrong. This isn’t to say
that they won’t work, but games are constantly changing,
constantly invalidating your carefully planned designs. [...]
So you hand off your new Game Object System and go work on
other things.
Then one day your designer says that they want a new type of
“alien” asteroid that acts just like a heat seeking missile, except it’s
still an asteroid.”
- Scott Bilas
23 / 57
“alien” asteroid
24 / 57
Approach #2: Aggregation
25 / 57
Approach #2: Aggregation
26 / 57
Approach #2: Aggregation
• popular since Gas Powered Games’ Dungeon Siege
• introduced long before
• entities are aggregations of components
• which in turn encapsulate independent functionality
• corresponds to recommendations by the Gang of Four
• “favor object composition over class inheritance”
• similar approach is used by the Unity3D game engine
• just for clarification: Unreal uses components as well, called
ActorComponent
27 / 57
Approach #2a
• create an Entity class
• add references to all available components
• has obvious disadvantages:
• many component references will be null pointers for
most entities
• big unnecessary memory overhead
• Entity class has to be updated each time a new
component is introduced
28 / 57
Approach #2b
• create an Entity class
• introduce a common base class for components
• entities hold a collection of Component objects
• reduced the memory overhead
• increased extensibility
• already gets close to an optimal solution
• easy to build, maintain and debug
• easy to implement new design ideas without breaking
existing code
29 / 57
However, we can do better.
30 / 57
Approach #2c: Entity Systems
31 / 57
Approach #2c: Entity Systems
32 / 57
Approach #2c: Entity Systems
• game entities are nothing more than just an id
• thus, no data or methods on entities
• no methods on components, either: all
functionality goes into what is called a system
• PhysicsSystem
• HealthSystem
• FightSystem
• entirely operate on their corresponding
components
33 / 57
“All the data goes into the Components.
All of it. Think you can take some “really common”
data, e. g. the x-/y-/z-coordinates of the in-game
object, and put it into the Entity itself? Nope. Don’t
go there. As soon as you start migrating data into the
Entity, you’ve lost. By definition the only valid place
for the data is inside the Component.”
- Adam Martin
34 / 57
Example #2: Simple Fight
35 / 57
Example #2: Simple Fight
36 / 57
Example #2: Simple Fight
37 / 57
Example #2: Simple Fight
38 / 57
Example #2: Simple Fight
39 / 57
Example #2: Simple Fight
40 / 57
Example #2: Simple Fight
41 / 57
Example #2: Simple Fight
42 / 57
Example #2: Simple Fight
43 / 57
Example #2: Simple Fight
44 / 57
Inter-System Communication
Systems communicate by the means of events, only.
• no coupling between systems
• easy to add or remove systems at any time
• great architectural advantage for general game features
• need multiplayer? just send the events over the network!
• need AI? just make it create events which are handled just
like player input is!
• need replays? just write all events with timestamps to a file!
45 / 57
Inter-System Communication
46 / 57
Advantages of Entity Systems
• update order is obvious
• components can easily be pooled and re-used
• independent systems can be updated by separate
threads
• data can easily be serialized and stored in a
database
47 / 57
uFrame ECS
48 / 12
uFrame ECS
DEMO
49 / 12
Assignment
1. Reduce Health of attacked entities.
2. Remove killed entities.
50 / 12
Assignment
1. Reduce Health of attacked entities.
2. Remove killed entities.
Hint
First, think about the components (data), systems
and events you might need!
51 / 12
Assignment
1. Reduce Health of attacked entities.
1. Add an AttackComponent with a Damage property.
2. Add a HealthComponent with a Health property.
3. Add groups for attacker and defender entities.
4. Add a DamageSystem modifying these components.
2. Remove killed entities.
52 / 12
Assignment
1. Reduce Health of attacked entities.
1. Add an AttackComponent with a Damage property.
2. Add a HealthComponent with a Health property.
3. Add groups for attacker and defender entities.
4. Add a DamageSystem modifying these components.
2. Remove killed entities.
1. Add a HealthChanged event.
2. Raise the HealthChanged event in the appropriate
system.
3. Add a DefeatSystem destroying defeated entities.
53 / 12
Assignment
3. Add a random value to the damage caused by
each attack.
4. Reduce damage taken by an Armor value of the
attacked entity.
5. Implement leveling up entities, increasing their
current Health and Damage.
54 / 12
Assignment Solution
Publicly available at
https://github.com/npruehs/teaching-ecs-uframe
55 / 12
Takeaway
• inheritance-based game models show a lot of
disadvantages
• entity systems are easy to maintain and debug
• provide great extensibility without the necessity of
modifying existing code
• show better performance characteristics for both
memory and CPU load
• easy to implement commonly used features
• scripting
• serialization
• logging
56 / 57
References
• Mick West. Evolve Your Hierarchy. http://cowboyprogramming.com/2007/01/05/evolve-your-
heirachy/, January 5, 2007.
• Levi Baker. Entity Systems Part 1: Entity and EntityManager.
http://blog.chronoclast.com/2010/12/entity-systems-part-1-entity-and.html, December 24,
2010.
• Kyle Wilson. Game Object Structure: Inheritance vs. Aggregation.
http://gamearchitect.net/Articles/GameObjects1.html, July 3, 2002.
• Adam Martin. Entity Systems are the future of MMOG development – Part 1. http://t-
machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-
1/, September 3, 2007.
• Adam Martin. Entity Systems: what makes good Components? good Entities? http://t-
machine.org/index.php/2012/03/16/entity-systems-what-makes-good-components-good-
entities/, March 16, 2012.
• Scott Bilas. A Data-Driven Game Object System.
http://scottbilas.com/files/2002/gdc_san_jose/game_objects_slides_with_notes.pdf, Slides,
GDC 2002.
• Scott Bilas. A Data-Driven Game Object System.
http://scottbilas.com/files/2002/gdc_san_jose/game_objects_paper.pdf, Paper, GDC 2002.
• Insomniac Games. A Dynamic Component Architecture for High Performance Gameplay.
http://www.insomniacgames.com/a-dynamic-component-architecture-for-high-performance-
gameplay/, June 1, 2010.
57 / 57
Thank you!
http://www.npruehs.de
https://github.com/npruehs
@npruehs
dev@npruehs.de

More Related Content

What's hot

Cerny method
Cerny methodCerny method
Cerny methodTim Holt
 
The Guerrilla Guide to Game Code
The Guerrilla Guide to Game CodeThe Guerrilla Guide to Game Code
The Guerrilla Guide to Game Code
Guerrilla
 
Level Design Workshop - GDC China 2012
Level Design Workshop - GDC China 2012Level Design Workshop - GDC China 2012
Level Design Workshop - GDC China 2012
Joel Burgess
 
The Rise and Rise of Idle Games
The Rise and Rise of Idle GamesThe Rise and Rise of Idle Games
The Rise and Rise of Idle Games
Anthony Pecorella
 
Horizon Zero Dawn: The Early Days
Horizon Zero Dawn: The Early DaysHorizon Zero Dawn: The Early Days
Horizon Zero Dawn: The Early Days
DevGAMM Conference
 
재미이론의 시사점과 게임 플레이 개선에 적용방안
재미이론의 시사점과 게임 플레이 개선에 적용방안재미이론의 시사점과 게임 플레이 개선에 적용방안
재미이론의 시사점과 게임 플레이 개선에 적용방안
Sunnyrider
 
Unity - Game Engine
Unity - Game EngineUnity - Game Engine
Unity - Game Engine
Geeks Anonymes
 
Tales from the Optimization Trenches - Unite Copenhagen 2019
Tales from the Optimization Trenches - Unite Copenhagen 2019Tales from the Optimization Trenches - Unite Copenhagen 2019
Tales from the Optimization Trenches - Unite Copenhagen 2019
Unity Technologies
 
The Technology of Uncharted: Drake’s Fortune
The Technology of Uncharted: Drake’s FortuneThe Technology of Uncharted: Drake’s Fortune
The Technology of Uncharted: Drake’s FortuneNaughty Dog
 
Ndc2010 김주복, v3. 마비노기2아키텍처리뷰
Ndc2010   김주복, v3. 마비노기2아키텍처리뷰Ndc2010   김주복, v3. 마비노기2아키텍처리뷰
Ndc2010 김주복, v3. 마비노기2아키텍처리뷰
Jubok Kim
 
Multiprocessor Game Loops: Lessons from Uncharted 2: Among Thieves
Multiprocessor Game Loops: Lessons from Uncharted 2: Among ThievesMultiprocessor Game Loops: Lessons from Uncharted 2: Among Thieves
Multiprocessor Game Loops: Lessons from Uncharted 2: Among ThievesNaughty Dog
 
위대한 게임개발팀의 공통점
위대한 게임개발팀의 공통점위대한 게임개발팀의 공통점
위대한 게임개발팀의 공통점
Ryan Park
 
LAFS Game Mechanics - The Core Mechanic
LAFS Game Mechanics - The Core MechanicLAFS Game Mechanics - The Core Mechanic
LAFS Game Mechanics - The Core Mechanic
David Mullich
 
NDC 2013 이은석 - 게임 디렉터가 뭐하는 건가요
NDC 2013 이은석 - 게임 디렉터가 뭐하는 건가요NDC 2013 이은석 - 게임 디렉터가 뭐하는 건가요
NDC 2013 이은석 - 게임 디렉터가 뭐하는 건가요
Eunseok Yi
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
AMD Developer Central
 
Unreal Engine 4 Introduction
Unreal Engine 4 IntroductionUnreal Engine 4 Introduction
Unreal Engine 4 Introduction
Sperasoft
 
Level Design
Level DesignLevel Design
Level Design
Martin Sillaots
 
[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리
[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리
[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리
강 민우
 
Putting the AI Back Into Air: Navigating the Air Space of Horizon Zero Dawn
Putting the AI Back Into Air: Navigating the Air Space of Horizon Zero DawnPutting the AI Back Into Air: Navigating the Air Space of Horizon Zero Dawn
Putting the AI Back Into Air: Navigating the Air Space of Horizon Zero Dawn
Guerrilla
 
최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로
최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로
최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로
SeongkukYun
 

What's hot (20)

Cerny method
Cerny methodCerny method
Cerny method
 
The Guerrilla Guide to Game Code
The Guerrilla Guide to Game CodeThe Guerrilla Guide to Game Code
The Guerrilla Guide to Game Code
 
Level Design Workshop - GDC China 2012
Level Design Workshop - GDC China 2012Level Design Workshop - GDC China 2012
Level Design Workshop - GDC China 2012
 
The Rise and Rise of Idle Games
The Rise and Rise of Idle GamesThe Rise and Rise of Idle Games
The Rise and Rise of Idle Games
 
Horizon Zero Dawn: The Early Days
Horizon Zero Dawn: The Early DaysHorizon Zero Dawn: The Early Days
Horizon Zero Dawn: The Early Days
 
재미이론의 시사점과 게임 플레이 개선에 적용방안
재미이론의 시사점과 게임 플레이 개선에 적용방안재미이론의 시사점과 게임 플레이 개선에 적용방안
재미이론의 시사점과 게임 플레이 개선에 적용방안
 
Unity - Game Engine
Unity - Game EngineUnity - Game Engine
Unity - Game Engine
 
Tales from the Optimization Trenches - Unite Copenhagen 2019
Tales from the Optimization Trenches - Unite Copenhagen 2019Tales from the Optimization Trenches - Unite Copenhagen 2019
Tales from the Optimization Trenches - Unite Copenhagen 2019
 
The Technology of Uncharted: Drake’s Fortune
The Technology of Uncharted: Drake’s FortuneThe Technology of Uncharted: Drake’s Fortune
The Technology of Uncharted: Drake’s Fortune
 
Ndc2010 김주복, v3. 마비노기2아키텍처리뷰
Ndc2010   김주복, v3. 마비노기2아키텍처리뷰Ndc2010   김주복, v3. 마비노기2아키텍처리뷰
Ndc2010 김주복, v3. 마비노기2아키텍처리뷰
 
Multiprocessor Game Loops: Lessons from Uncharted 2: Among Thieves
Multiprocessor Game Loops: Lessons from Uncharted 2: Among ThievesMultiprocessor Game Loops: Lessons from Uncharted 2: Among Thieves
Multiprocessor Game Loops: Lessons from Uncharted 2: Among Thieves
 
위대한 게임개발팀의 공통점
위대한 게임개발팀의 공통점위대한 게임개발팀의 공통점
위대한 게임개발팀의 공통점
 
LAFS Game Mechanics - The Core Mechanic
LAFS Game Mechanics - The Core MechanicLAFS Game Mechanics - The Core Mechanic
LAFS Game Mechanics - The Core Mechanic
 
NDC 2013 이은석 - 게임 디렉터가 뭐하는 건가요
NDC 2013 이은석 - 게임 디렉터가 뭐하는 건가요NDC 2013 이은석 - 게임 디렉터가 뭐하는 건가요
NDC 2013 이은석 - 게임 디렉터가 뭐하는 건가요
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
 
Unreal Engine 4 Introduction
Unreal Engine 4 IntroductionUnreal Engine 4 Introduction
Unreal Engine 4 Introduction
 
Level Design
Level DesignLevel Design
Level Design
 
[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리
[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리
[IGC 2017] 블루홀 최준혁 - '플레이어언노운스 배틀그라운드' DEV 스토리
 
Putting the AI Back Into Air: Navigating the Air Space of Horizon Zero Dawn
Putting the AI Back Into Air: Navigating the Air Space of Horizon Zero DawnPutting the AI Back Into Air: Navigating the Air Space of Horizon Zero Dawn
Putting the AI Back Into Air: Navigating the Air Space of Horizon Zero Dawn
 
최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로
최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로
최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로
 

Viewers also liked

ECS architecture with Unity by example - Unite Europe 2016
ECS architecture with Unity by example - Unite Europe 2016ECS architecture with Unity by example - Unite Europe 2016
ECS architecture with Unity by example - Unite Europe 2016
Simon Schmid
 
Game Programming 10 - Localization
Game Programming 10 - LocalizationGame Programming 10 - Localization
Game Programming 10 - Localization
Nick Pruehs
 
Game Programming 04 - Style & Design Principles
Game Programming 04 - Style & Design PrinciplesGame Programming 04 - Style & Design Principles
Game Programming 04 - Style & Design Principles
Nick Pruehs
 
Game Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance OptimizationGame Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance Optimization
Nick Pruehs
 
What Would Blizzard Do
What Would Blizzard DoWhat Would Blizzard Do
What Would Blizzard Do
Nick Pruehs
 
Game Programming 08 - Tool Development
Game Programming 08 - Tool DevelopmentGame Programming 08 - Tool Development
Game Programming 08 - Tool Development
Nick Pruehs
 
Game Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content GenerationGame Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content Generation
Nick Pruehs
 
School For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine BasicsSchool For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine Basics
Nick Pruehs
 
Tool Development A - Git
Tool Development A - GitTool Development A - Git
Tool Development A - Git
Nick Pruehs
 
Game Programming 09 - AI
Game Programming 09 - AIGame Programming 09 - AI
Game Programming 09 - AI
Nick Pruehs
 
Game Programming 12 - Shaders
Game Programming 12 - ShadersGame Programming 12 - Shaders
Game Programming 12 - Shaders
Nick Pruehs
 
Game Programming 11 - Game Physics
Game Programming 11 - Game PhysicsGame Programming 11 - Game Physics
Game Programming 11 - Game Physics
Nick Pruehs
 
Game Development Challenges
Game Development ChallengesGame Development Challenges
Game Development Challenges
Nick Pruehs
 
Eight Rules for Making Your First Great Game
Eight Rules for Making Your First Great GameEight Rules for Making Your First Great Game
Eight Rules for Making Your First Great Game
Nick Pruehs
 
Scrum - but... Agile Game Development in Small Teams
Scrum - but... Agile Game Development in Small TeamsScrum - but... Agile Game Development in Small Teams
Scrum - but... Agile Game Development in Small Teams
Nick Pruehs
 
Game Programming 05 - Development Tools
Game Programming 05 - Development ToolsGame Programming 05 - Development Tools
Game Programming 05 - Development Tools
Nick Pruehs
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated Testing
Nick Pruehs
 
Entity Component Systems
Entity Component SystemsEntity Component Systems
Entity Component Systems
Yos Riady
 
Game Models - A Different Approach
Game Models - A Different ApproachGame Models - A Different Approach
Game Models - A Different Approach
Nick Pruehs
 
Entity System Architecture with Unity - Unite Europe 2015
Entity System Architecture with Unity - Unite Europe 2015Entity System Architecture with Unity - Unite Europe 2015
Entity System Architecture with Unity - Unite Europe 2015
Simon Schmid
 

Viewers also liked (20)

ECS architecture with Unity by example - Unite Europe 2016
ECS architecture with Unity by example - Unite Europe 2016ECS architecture with Unity by example - Unite Europe 2016
ECS architecture with Unity by example - Unite Europe 2016
 
Game Programming 10 - Localization
Game Programming 10 - LocalizationGame Programming 10 - Localization
Game Programming 10 - Localization
 
Game Programming 04 - Style & Design Principles
Game Programming 04 - Style & Design PrinciplesGame Programming 04 - Style & Design Principles
Game Programming 04 - Style & Design Principles
 
Game Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance OptimizationGame Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance Optimization
 
What Would Blizzard Do
What Would Blizzard DoWhat Would Blizzard Do
What Would Blizzard Do
 
Game Programming 08 - Tool Development
Game Programming 08 - Tool DevelopmentGame Programming 08 - Tool Development
Game Programming 08 - Tool Development
 
Game Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content GenerationGame Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content Generation
 
School For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine BasicsSchool For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine Basics
 
Tool Development A - Git
Tool Development A - GitTool Development A - Git
Tool Development A - Git
 
Game Programming 09 - AI
Game Programming 09 - AIGame Programming 09 - AI
Game Programming 09 - AI
 
Game Programming 12 - Shaders
Game Programming 12 - ShadersGame Programming 12 - Shaders
Game Programming 12 - Shaders
 
Game Programming 11 - Game Physics
Game Programming 11 - Game PhysicsGame Programming 11 - Game Physics
Game Programming 11 - Game Physics
 
Game Development Challenges
Game Development ChallengesGame Development Challenges
Game Development Challenges
 
Eight Rules for Making Your First Great Game
Eight Rules for Making Your First Great GameEight Rules for Making Your First Great Game
Eight Rules for Making Your First Great Game
 
Scrum - but... Agile Game Development in Small Teams
Scrum - but... Agile Game Development in Small TeamsScrum - but... Agile Game Development in Small Teams
Scrum - but... Agile Game Development in Small Teams
 
Game Programming 05 - Development Tools
Game Programming 05 - Development ToolsGame Programming 05 - Development Tools
Game Programming 05 - Development Tools
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated Testing
 
Entity Component Systems
Entity Component SystemsEntity Component Systems
Entity Component Systems
 
Game Models - A Different Approach
Game Models - A Different ApproachGame Models - A Different Approach
Game Models - A Different Approach
 
Entity System Architecture with Unity - Unite Europe 2015
Entity System Architecture with Unity - Unite Europe 2015Entity System Architecture with Unity - Unite Europe 2015
Entity System Architecture with Unity - Unite Europe 2015
 

Similar to Component-Based Entity Systems (Demo)

PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue Kid
Matthew Johnson
 
Software Security : From school to reality and back!
Software Security : From school to reality and back!Software Security : From school to reality and back!
Software Security : From school to reality and back!
Peter Hlavaty
 
Create a Scalable and Destructible World in HITMAN 2*
Create a Scalable and Destructible World in HITMAN 2*Create a Scalable and Destructible World in HITMAN 2*
Create a Scalable and Destructible World in HITMAN 2*
Intel® Software
 
Joy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan RichardsonJoy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan Richardson
Alan Richardson
 
HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOps
Sarah Sexton
 
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Lviv Startup Club
 
Enter The back|track Linux Dragon
Enter The back|track Linux DragonEnter The back|track Linux Dragon
Enter The back|track Linux Dragon
Andrew Kozma
 
Practical guide to optimization in Unity
Practical guide to optimization in UnityPractical guide to optimization in Unity
Practical guide to optimization in Unity
DevGAMM Conference
 
Protect Your Payloads: Modern Keying Techniques
Protect Your Payloads: Modern Keying TechniquesProtect Your Payloads: Modern Keying Techniques
Protect Your Payloads: Modern Keying Techniques
Leo Loobeek
 
Good ideas that we forgot
Good ideas that we forgot   Good ideas that we forgot
Good ideas that we forgot
J On The Beach
 
Mobile Weekend Budapest presentation
Mobile Weekend Budapest presentationMobile Weekend Budapest presentation
Mobile Weekend Budapest presentation
Péter Ádám Wiesner
 
Five Cliches of Online Game Development
Five Cliches of Online Game DevelopmentFive Cliches of Online Game Development
Five Cliches of Online Game Development
iandundore
 
Polybot Onboarding Process
Polybot Onboarding ProcessPolybot Onboarding Process
Polybot Onboarding ProcessNina Park
 
Puppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with PuppetPuppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with Puppet
Puppet
 
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
DevClub_lv
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
Alex Kirby
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
midnite_runr
 
Software Engineering Best Practices @ Nylas
Software Engineering Best Practices @ NylasSoftware Engineering Best Practices @ Nylas
Software Engineering Best Practices @ Nylas
Ben Gotow
 

Similar to Component-Based Entity Systems (Demo) (20)

PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue Kid
 
Software Security : From school to reality and back!
Software Security : From school to reality and back!Software Security : From school to reality and back!
Software Security : From school to reality and back!
 
Create a Scalable and Destructible World in HITMAN 2*
Create a Scalable and Destructible World in HITMAN 2*Create a Scalable and Destructible World in HITMAN 2*
Create a Scalable and Destructible World in HITMAN 2*
 
Unity 3D VS your team
Unity 3D VS your teamUnity 3D VS your team
Unity 3D VS your team
 
Soc research
Soc researchSoc research
Soc research
 
Joy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan RichardsonJoy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan Richardson
 
HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOps
 
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
 
Enter The back|track Linux Dragon
Enter The back|track Linux DragonEnter The back|track Linux Dragon
Enter The back|track Linux Dragon
 
Practical guide to optimization in Unity
Practical guide to optimization in UnityPractical guide to optimization in Unity
Practical guide to optimization in Unity
 
Protect Your Payloads: Modern Keying Techniques
Protect Your Payloads: Modern Keying TechniquesProtect Your Payloads: Modern Keying Techniques
Protect Your Payloads: Modern Keying Techniques
 
Good ideas that we forgot
Good ideas that we forgot   Good ideas that we forgot
Good ideas that we forgot
 
Mobile Weekend Budapest presentation
Mobile Weekend Budapest presentationMobile Weekend Budapest presentation
Mobile Weekend Budapest presentation
 
Five Cliches of Online Game Development
Five Cliches of Online Game DevelopmentFive Cliches of Online Game Development
Five Cliches of Online Game Development
 
Polybot Onboarding Process
Polybot Onboarding ProcessPolybot Onboarding Process
Polybot Onboarding Process
 
Puppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with PuppetPuppet Camp Austin 2015: Getting Started with Puppet
Puppet Camp Austin 2015: Getting Started with Puppet
 
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
In the Trenches During a Software Supply Chain Attack by Mitch Denny at Front...
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
 
Software Engineering Best Practices @ Nylas
Software Engineering Best Practices @ NylasSoftware Engineering Best Practices @ Nylas
Software Engineering Best Practices @ Nylas
 

More from Nick Pruehs

Unreal Engine Basics 06 - Animation, Audio, Visual Effects
Unreal Engine Basics 06 - Animation, Audio, Visual EffectsUnreal Engine Basics 06 - Animation, Audio, Visual Effects
Unreal Engine Basics 06 - Animation, Audio, Visual Effects
Nick Pruehs
 
Unreal Engine Basics 05 - User Interface
Unreal Engine Basics 05 - User InterfaceUnreal Engine Basics 05 - User Interface
Unreal Engine Basics 05 - User Interface
Nick Pruehs
 
Unreal Engine Basics 04 - Behavior Trees
Unreal Engine Basics 04 - Behavior TreesUnreal Engine Basics 04 - Behavior Trees
Unreal Engine Basics 04 - Behavior Trees
Nick Pruehs
 
Unreal Engine Basics 03 - Gameplay
Unreal Engine Basics 03 - GameplayUnreal Engine Basics 03 - Gameplay
Unreal Engine Basics 03 - Gameplay
Nick Pruehs
 
Unreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorUnreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal Editor
Nick Pruehs
 
Game Programming - Cloud Development
Game Programming - Cloud DevelopmentGame Programming - Cloud Development
Game Programming - Cloud Development
Nick Pruehs
 
Game Programming - Git
Game Programming - GitGame Programming - Git
Game Programming - Git
Nick Pruehs
 
Designing an actor model game architecture with Pony
Designing an actor model game architecture with PonyDesigning an actor model game architecture with Pony
Designing an actor model game architecture with Pony
Nick Pruehs
 
Game Programming 01 - Introduction
Game Programming 01 - IntroductionGame Programming 01 - Introduction
Game Programming 01 - Introduction
Nick Pruehs
 
Game Programming 00 - Exams
Game Programming 00 - ExamsGame Programming 00 - Exams
Game Programming 00 - Exams
Nick Pruehs
 
Tool Development 10 - MVVM, Tool Chains
Tool Development 10 - MVVM, Tool ChainsTool Development 10 - MVVM, Tool Chains
Tool Development 10 - MVVM, Tool Chains
Nick Pruehs
 

More from Nick Pruehs (11)

Unreal Engine Basics 06 - Animation, Audio, Visual Effects
Unreal Engine Basics 06 - Animation, Audio, Visual EffectsUnreal Engine Basics 06 - Animation, Audio, Visual Effects
Unreal Engine Basics 06 - Animation, Audio, Visual Effects
 
Unreal Engine Basics 05 - User Interface
Unreal Engine Basics 05 - User InterfaceUnreal Engine Basics 05 - User Interface
Unreal Engine Basics 05 - User Interface
 
Unreal Engine Basics 04 - Behavior Trees
Unreal Engine Basics 04 - Behavior TreesUnreal Engine Basics 04 - Behavior Trees
Unreal Engine Basics 04 - Behavior Trees
 
Unreal Engine Basics 03 - Gameplay
Unreal Engine Basics 03 - GameplayUnreal Engine Basics 03 - Gameplay
Unreal Engine Basics 03 - Gameplay
 
Unreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorUnreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal Editor
 
Game Programming - Cloud Development
Game Programming - Cloud DevelopmentGame Programming - Cloud Development
Game Programming - Cloud Development
 
Game Programming - Git
Game Programming - GitGame Programming - Git
Game Programming - Git
 
Designing an actor model game architecture with Pony
Designing an actor model game architecture with PonyDesigning an actor model game architecture with Pony
Designing an actor model game architecture with Pony
 
Game Programming 01 - Introduction
Game Programming 01 - IntroductionGame Programming 01 - Introduction
Game Programming 01 - Introduction
 
Game Programming 00 - Exams
Game Programming 00 - ExamsGame Programming 00 - Exams
Game Programming 00 - Exams
 
Tool Development 10 - MVVM, Tool Chains
Tool Development 10 - MVVM, Tool ChainsTool Development 10 - MVVM, Tool Chains
Tool Development 10 - MVVM, Tool Chains
 

Recently uploaded

Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 

Recently uploaded (20)

Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 

Component-Based Entity Systems (Demo)

  • 2. About Me “Best Bachelor“ Computer Science Kiel University, 2009 Master Games HAW Hamburg, 2011 Lead Programmer Daedalic Entertainment, 2011-2012 Co-Founder slash games, 2013 Microsoft MVP 2015 2 / 79
  • 3. Objectives • To understand the disadvantages of inheritance- based game models • To learn how to build an aggregation-based game model • To understand the advantages and disadvantages of aggregation-based game models 3 / 57
  • 4. “Say you’re an engineer… … set out to create a new Game Object System from scratch, and you’re going to ‘do it right the first time’. You talk to your designer and say ‘What kind of content are we going to have in this game?’ They respond with ‘Oh lots of stuff, trees, and birds, and bushes, and keys and locks and … <trailing off>’ And your eyes glaze over as you start thinking of fancy C++ ways to solve the problem. The object oriented programming sages tell you to try to determine Is-A relationships and abstract functionality and all that other fun stuff. You go to the book store and buy a C++ book just to be sure, and it tells you to fire up your $5000 UML editor. [...]” - Scott Bilas 4 / 57
  • 11. Entities • object in your game world • can (or cannot)… • be visible • move around • attack • explode • be targeted • become selected • follow a path • common across all genres 11 / 57
  • 14. Approach #1: Inheritance • Entity base class • that class and its subclasses encapsulate the main game logic 14 / 57
  • 15. Example #1: Unreal Engine 3 • base class Actor • rendering • animation • sound • physics • almost everything in Unreal is an Actor • Pawn extends by taking damage • Projectile extends by spawning impact effects 15 / 57
  • 16. Drawbacks of inheritance-based game models • Diamond of Death 16 / 57
  • 17. Drawbacks of inheritance-based game models • code added to the root of the inheritance tree causes big overhead • code added to the leafs of the tree tends to get copied • root and leaf classes tend to get very big 17 / 57
  • 18. Where is Waldo? public override void TakeDamage(int damage) { this.Health -= damage; } 18 / 57
  • 19. Where is Waldo? public override void TakeDamage(int damage) { this.Health -= damage; } 19 / 57
  • 20. Where is Waldo? public override void TakeDamage(int damage) { base.TakeDamage(damage); this.Health -= damage; } 20 / 57
  • 21. Drawbacks of inheritance-based game models • always need to understand all base classes along the inheritance tree • impossible to enforce calling base class functions • Someone will forget it. Trust me. • And you’re gonna spend your whole evening finding that one missing base.Update(). • deep class hierarchies will more likely run into call order issues 21 / 57
  • 22. Inheritance-based game models are… • … difficult to develop • … difficult to maintain • … difficult to extend 22 / 57
  • 23. “There are probably hundreds of ways… … you could decompose your systems and come up with a set of classes […], and eventually, all of them are wrong. This isn’t to say that they won’t work, but games are constantly changing, constantly invalidating your carefully planned designs. [...] So you hand off your new Game Object System and go work on other things. Then one day your designer says that they want a new type of “alien” asteroid that acts just like a heat seeking missile, except it’s still an asteroid.” - Scott Bilas 23 / 57
  • 27. Approach #2: Aggregation • popular since Gas Powered Games’ Dungeon Siege • introduced long before • entities are aggregations of components • which in turn encapsulate independent functionality • corresponds to recommendations by the Gang of Four • “favor object composition over class inheritance” • similar approach is used by the Unity3D game engine • just for clarification: Unreal uses components as well, called ActorComponent 27 / 57
  • 28. Approach #2a • create an Entity class • add references to all available components • has obvious disadvantages: • many component references will be null pointers for most entities • big unnecessary memory overhead • Entity class has to be updated each time a new component is introduced 28 / 57
  • 29. Approach #2b • create an Entity class • introduce a common base class for components • entities hold a collection of Component objects • reduced the memory overhead • increased extensibility • already gets close to an optimal solution • easy to build, maintain and debug • easy to implement new design ideas without breaking existing code 29 / 57
  • 30. However, we can do better. 30 / 57
  • 31. Approach #2c: Entity Systems 31 / 57
  • 32. Approach #2c: Entity Systems 32 / 57
  • 33. Approach #2c: Entity Systems • game entities are nothing more than just an id • thus, no data or methods on entities • no methods on components, either: all functionality goes into what is called a system • PhysicsSystem • HealthSystem • FightSystem • entirely operate on their corresponding components 33 / 57
  • 34. “All the data goes into the Components. All of it. Think you can take some “really common” data, e. g. the x-/y-/z-coordinates of the in-game object, and put it into the Entity itself? Nope. Don’t go there. As soon as you start migrating data into the Entity, you’ve lost. By definition the only valid place for the data is inside the Component.” - Adam Martin 34 / 57
  • 35. Example #2: Simple Fight 35 / 57
  • 36. Example #2: Simple Fight 36 / 57
  • 37. Example #2: Simple Fight 37 / 57
  • 38. Example #2: Simple Fight 38 / 57
  • 39. Example #2: Simple Fight 39 / 57
  • 40. Example #2: Simple Fight 40 / 57
  • 41. Example #2: Simple Fight 41 / 57
  • 42. Example #2: Simple Fight 42 / 57
  • 43. Example #2: Simple Fight 43 / 57
  • 44. Example #2: Simple Fight 44 / 57
  • 45. Inter-System Communication Systems communicate by the means of events, only. • no coupling between systems • easy to add or remove systems at any time • great architectural advantage for general game features • need multiplayer? just send the events over the network! • need AI? just make it create events which are handled just like player input is! • need replays? just write all events with timestamps to a file! 45 / 57
  • 47. Advantages of Entity Systems • update order is obvious • components can easily be pooled and re-used • independent systems can be updated by separate threads • data can easily be serialized and stored in a database 47 / 57
  • 50. Assignment 1. Reduce Health of attacked entities. 2. Remove killed entities. 50 / 12
  • 51. Assignment 1. Reduce Health of attacked entities. 2. Remove killed entities. Hint First, think about the components (data), systems and events you might need! 51 / 12
  • 52. Assignment 1. Reduce Health of attacked entities. 1. Add an AttackComponent with a Damage property. 2. Add a HealthComponent with a Health property. 3. Add groups for attacker and defender entities. 4. Add a DamageSystem modifying these components. 2. Remove killed entities. 52 / 12
  • 53. Assignment 1. Reduce Health of attacked entities. 1. Add an AttackComponent with a Damage property. 2. Add a HealthComponent with a Health property. 3. Add groups for attacker and defender entities. 4. Add a DamageSystem modifying these components. 2. Remove killed entities. 1. Add a HealthChanged event. 2. Raise the HealthChanged event in the appropriate system. 3. Add a DefeatSystem destroying defeated entities. 53 / 12
  • 54. Assignment 3. Add a random value to the damage caused by each attack. 4. Reduce damage taken by an Armor value of the attacked entity. 5. Implement leveling up entities, increasing their current Health and Damage. 54 / 12
  • 55. Assignment Solution Publicly available at https://github.com/npruehs/teaching-ecs-uframe 55 / 12
  • 56. Takeaway • inheritance-based game models show a lot of disadvantages • entity systems are easy to maintain and debug • provide great extensibility without the necessity of modifying existing code • show better performance characteristics for both memory and CPU load • easy to implement commonly used features • scripting • serialization • logging 56 / 57
  • 57. References • Mick West. Evolve Your Hierarchy. http://cowboyprogramming.com/2007/01/05/evolve-your- heirachy/, January 5, 2007. • Levi Baker. Entity Systems Part 1: Entity and EntityManager. http://blog.chronoclast.com/2010/12/entity-systems-part-1-entity-and.html, December 24, 2010. • Kyle Wilson. Game Object Structure: Inheritance vs. Aggregation. http://gamearchitect.net/Articles/GameObjects1.html, July 3, 2002. • Adam Martin. Entity Systems are the future of MMOG development – Part 1. http://t- machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part- 1/, September 3, 2007. • Adam Martin. Entity Systems: what makes good Components? good Entities? http://t- machine.org/index.php/2012/03/16/entity-systems-what-makes-good-components-good- entities/, March 16, 2012. • Scott Bilas. A Data-Driven Game Object System. http://scottbilas.com/files/2002/gdc_san_jose/game_objects_slides_with_notes.pdf, Slides, GDC 2002. • Scott Bilas. A Data-Driven Game Object System. http://scottbilas.com/files/2002/gdc_san_jose/game_objects_paper.pdf, Paper, GDC 2002. • Insomniac Games. A Dynamic Component Architecture for High Performance Gameplay. http://www.insomniacgames.com/a-dynamic-component-architecture-for-high-performance- gameplay/, June 1, 2010. 57 / 57