SlideShare uma empresa Scribd logo
1 de 46
Building a Turn-Based
Game Prototype …
the ECS Way
Setting the stage!
3
— Not the next Civilization game
— Code focussed
— No ECS experience is fine
— Agenda
– My background
– Concepts of this talk
– Non-turn-based prototype with ECS
– Turn it turn-based
About me
4
Turn Based Games
5
Turn Based Game Loop
6
— Continuous update
— Poll all events
— Change game world
Game world continuously changes
every frame
while (true)
{
processInput();
update(elapsed);
render();
}
System A
System Y
System Z
…
…
7
— Frame != Turn
— We have continuous systems: update every frame
— We have turn based systems: update every turn
Turn Based Game Loop
Turn Based Game Loop
8
— Continuous update
— Poll all events
— Wait for player action
— Update other actors only when
player makes a move
Game world only changes in
response to player action
while (true)
{
action = processInput();
if(action != null)
{
update(elapsed);
}
render();
}
Player Action
TB System
TB System
…
— Composition vs
Inheritance
— Atomic parts
— Filtering
— Systematic design
Entity
Component
System
Unity ECS
9
DATA
DATA
Unity ECS
10
— Quite useable today
— High degree of control over gameworld (Savegames!)
— Performance and data layout
— Path into future awesomeness of Unity
Let’s prototype away!
11
Example Project Setup
12
— Unity 2019.2.6f1
— 3D Template
— Packages:
– Entities 0.1.1 [preview]
– Hybrid Renderer 0.1.1 [preview]
— Content from different assets:
– PolyWorks FullPack, GalaxyBox1, SurrounDead - Free Sample, Bitgem Texture pack
— https://github.com/floAr/UniteCPH_TurnBasedPrototypeECS
“Flying Gardener”
13
— Grid based world
— Two kind of actors:
– Player(s)
– NPCs (Evil Snails)
— 2DOF Movement
Creating actors
14
— Actors move on grid in
game world
— Current- and target
position
[Serializable]
public struct ActorComponent : IComponentData
{
public float3 position;
public float3 target_positon;
}
public void Convert(Entity entity,
EntityManager dstManager,
GameObjectConversionSystem conversionSystem)
{
float3 grid_pos = new float3(
math.floor(transform.position.x),
0,
math.floor(transform.position.z)
);
dstManager.AddComponentData(entity,
new ActorComponent()
{
position = grid_pos,
target_positon = grid_pos
});
}
Creating actors
15
— Actors move on grid in
game world
— Current- and target
position
[Serializable]
public struct ActorComponent : IComponentData
{
public float3 position;
public float3 target_positon;
}
public void Convert(Entity entity,
EntityManager dstManager,
GameObjectConversionSystem conversionSystem)
{
float3 grid_pos = new float3(
math.floor(transform.position.x),
0,
math.floor(transform.position.z)
);
dstManager.AddComponentData(entity,
new ActorComponent()
{
position = grid_pos,
target_positon = grid_pos
});
}
Creating actors
16
— Actors move on grid in
game world
— Current- and target
position
— Convert from
MonoBehaviour to
Component
[Serializable]
public struct ActorComponent : IComponentData
{
public float3 position;
public float3 target_positon;
}
public void Convert(Entity entity,
EntityManager dstManager,
GameObjectConversionSystem conversionSystem)
{
float3 grid_pos = new float3(
math.floor(transform.position.x),
0,
math.floor(transform.position.z)
);
dstManager.AddComponentData(entity,
new ActorComponent()
{
position = grid_pos,
target_positon = grid_pos
});
}
Creating actors
17
— Actors move on grid in
game world
— Current- and target
position
— Convert from
MonoBehaviour to
Component
[Serializable]
public struct ActorComponent : IComponentData
{
public float3 position;
public float3 target_positon;
}
public void Convert(Entity entity,
EntityManager dstManager,
GameObjectConversionSystem conversionSystem)
{
float3 grid_pos = new float3(
math.floor(transform.position.x),
0,
math.floor(transform.position.z)
);
dstManager.AddComponentData(entity,
new ActorComponent()
{
position = grid_pos,
target_positon = grid_pos
});
}
— Show player prefab with scripts be converted to entity
— Highlight entity debugger
[Editor / Live Code]
18
Moving actors
19
— Interpolate between
current and target
position
struct ActorSystemJob : IJobForEach<Translation, Rotation, ActorComponent>
{
public float deltaTime;
public void Execute(ref Translation translation,
ref Rotation rotation,
ref ActorComponent actor )
{
var direction = actor.target_positon - actor.position;
if (math.length(direction) > 0.1f)
{
direction = math.normalize(direction);
rotation.Value= quaternion.LookRotation(direction, math.up());
translation.Value = translation.Value + direction * deltaTime;
actor.position = translation.Value;
}
else
{
translation.Value = actor.target_positon;
actor.position = translation.Value;
}
}
}
Moving actors
20
— Interpolate between
current and target
position
— Change Translation and
Rotation accordingly
struct ActorSystemJob : IJobForEach<Translation, Rotation, ActorComponent>
{
public float deltaTime;
public void Execute(ref Translation translation,
ref Rotation rotation,
ref ActorComponent actor )
{
var direction = actor.target_positon - actor.position;
if (math.length(direction) > 0.1f)
{
direction = math.normalize(direction);
rotation.Value= quaternion.LookRotation(direction, math.up());
translation.Value = translation.Value + direction * deltaTime;
actor.position = translation.Value;
}
else
{
translation.Value = actor.target_positon;
actor.position = translation.Value;
}
}
}
Moving actors
21
— Interpolate between
current and target
position
— Change Translation and
Rotation accordingly
— Execute on all entities
with Translation,
Rotation and
ActorComponent
struct ActorSystemJob : IJobForEach<Translation, Rotation, ActorComponent>
{
public float deltaTime;
public void Execute(ref Translation translation,
ref Rotation rotation,
ref ActorComponent actor )
{
var direction = actor.target_positon - actor.position;
if (math.length(direction) > 0.1f)
{
direction = math.normalize(direction);
rotation.Value= quaternion.LookRotation(direction, math.up());
translation.Value = translation.Value + direction * deltaTime;
actor.position = translation.Value;
}
else
{
translation.Value = actor.target_positon;
actor.position = translation.Value;
}
}
}
Moving actors
22
— Interpolate between
current and target
position
— Change Translation and
Rotation accordingly
— Execute on all entities
with Translation,
Rotation and
ActorComponent
struct ActorSystemJob : IJobForEach<Translation, Rotation, ActorComponent>
{
public float deltaTime;
public void Execute(ref Translation translation,
ref Rotation rotation,
ref ActorComponent actor )
{
var direction = actor.target_positon - actor.position;
if (math.length(direction) > 0.1f)
{
direction = math.normalize(direction);
rotation.Value= quaternion.LookRotation(direction, math.up());
translation.Value = translation.Value + direction * deltaTime;
actor.position = translation.Value;
}
else
{
translation.Value = actor.target_positon;
actor.position = translation.Value;
}
}
}
Moving actors
23
— Interpolate between
current and target
position
— Change Translation and
Rotation accordingly
— Execute on all entities
with Translation,
Rotation and
ActorComponent
— Pipe external data in
and schedule the job
public class ActorSystem : JobComponentSystem
{
[BurstCompile]
struct ActorSystemJob
{ […] }
protected override JobHandle OnUpdate(JobHandle inputDependencies)
{
var job = new ActorSystemJob();
job.deltaTime = UnityEngine.Time.deltaTime;
return job.Schedule(this, inputDependencies);
}
}
public struct MoveIntention : IComponentData
{
public int2 direction_xz;
}
protected override void OnUpdate()
{
Entities.WithAll<ActorComponent>().ForEach((Entity id) =>
{
var direction = generateMove();
var intent = new MoveIntention()
{
direction_xz = direction
};
PostUpdateCommands.AddComponent<MoveIntention>(id, intent);
});
}
Moving actors
24
— Create MoveIntention
public struct MoveIntention : IComponentData
{
public int2 direction_xz;
}
protected override void OnUpdate()
{
Entities.WithAll<ActorComponent>().ForEach((Entity id) =>
{
var direction = generateMove();
var intent = new MoveIntention()
{
direction_xz = direction
};
PostUpdateCommands.AddComponent<MoveIntention>(id, intent);
});
}
Moving actors
25
— Create MoveIntention
public struct MoveIntention : IComponentData
{
public int2 direction_xz;
}
protected override void OnUpdate()
{
Entities.WithAll<ActorComponent>().ForEach((Entity id) =>
{
var direction = generateMove();
var intent = new MoveIntention()
{
direction_xz = direction
};
PostUpdateCommands.AddComponent<MoveIntention>(id, intent);
});
}
Moving actors
26
— Create MoveIntention
— System that generate
random intentions (for
our non-player actors)
public struct MoveIntention : IComponentData
{
public int2 direction_xz;
}
protected override void OnUpdate()
{
Entities.WithAll<ActorComponent>().ForEach((Entity id) =>
{
var direction = generateMove();
var intent = new MoveIntention()
{
direction_xz = direction
};
PostUpdateCommands.AddComponent<MoveIntention>(id, intent);
});
}
Moving actors
27
— Create MoveIntention
— System that generate
random intentions (for
our non-player actors)
public struct MoveIntention : IComponentData
{
public int2 direction_xz;
}
protected override void OnUpdate()
{
Entities.WithAll<ActorComponent>().ForEach((Entity id) =>
{
var direction = generateMove();
var intent = new MoveIntention()
{
direction_xz = direction
};
PostUpdateCommands.AddComponent<MoveIntention>(id, intent);
});
}
Moving actors
28
— Create MoveIntention
— System that generate
random intentions (for
our non-player actors)
public struct MoveIntention : IComponentData
{
public int2 direction_xz;
}
protected override void OnUpdate()
{
Entities.WithAll<ActorComponent>().ForEach((Entity id) =>
{
var direction = generateMove();
var intent = new MoveIntention()
{
direction_xz = direction
};
PostUpdateCommands.AddComponent<MoveIntention>(id, intent);
});
}
Moving actors
29
— Create MoveIntention
— System that generate
random intentions (for
our non-player actors)
— Component changes
need synchronization
public struct MoveIntention : IComponentData
{
public int2 direction_xz;
}
protected override void OnUpdate()
{
Entities.WithAll<ActorComponent>().ForEach((Entity id) =>
{
var direction = generateMove();
var intent = new MoveIntention()
{
direction_xz = direction
};
PostUpdateCommands.AddComponent<MoveIntention>(id, intent);
});
}
Moving actors
30
— Create MoveIntention
— System that generate
random intentions (for
our non-player actors)
— Component changes
need synchronization
New scene -> grid + player + enemies
[Editor / Live Code]
31
— Player input / way to pass the turn
— Communicate between systems when allowed to run
— Variant 1: Manual control
— Variant 2: Component based control
Changes:
— PlayerComponent
— InputSystem: WASD -> MoveIntention
Bringing things in order. The player update
lock
32
Show InputSystem
Filter Player Entities from RandomMoveSystem
[Editor / Live Code]
33
Variant 1: Manual Update
34
— Remove turn-based systems from
ECS update loop
— Manually trigger update after
each turn
— [DisableAutoCreation] of turn
based systems
— World.GetOrCreateSystem()
— System.Update()
TB System
TB System
Player Action
…
Variant 1: Manual Update
35
— Remove turn-based systems from
ECS update loop
— Manually trigger update after
each turn
— [DisableAutoCreation] of turn
based systems
— World.GetOrCreateSystem()
— System.Update()
TB System
TB System
Player Action
…
[Disable on Load] Move and RandomMove
Manually call them from TurnBasedGameLoop
[Editor / Live Code]
36
Variant 1: Manual Update
37
One column body text
lorem ipsum dolor sit
amet, consectetur
adipiscing elit. Nunc
lacinia, nisi ac vehicula
pellentesque, justo tellus
dignissim velit, nec
rhoncus tellus lorem id
sapien.
Fine grained control
Low footprint
Manual effort for each system
Does not scale well
Variant 2: Interlocked Components
38
— Components to communicate
— Player has AwaitAction
— InputSystem consumes
AwaitAction
— If no player is waiting,
TurnBasedSystem hand out
ReadyToHandle flag
— After one frame every other
system updated so we remove
the flag again
Player Action
TB System
TB System
…
Variant 2: Interlocked Components
39
— Components to communicate
— Player has AwaitAction
— InputSystem consumes
AwaitAction
— If no player is waiting,
TurnBasedSystem hand out
ReadyToHandle flag
— After one frame every other
system updated so we remove
the flag again
Player Action
TB System
TB System
…
[Editor / Live Code]
40
Player gets await flag
Input system consumes await flag
Talk about Query
If no one is waiting:
Hand out ready to handle tokens
Refresh await action token
Include handle token in move system
Variant 2: Interlocked Components
41
One column body text
lorem ipsum dolor sit
amet, consectetur
adipiscing elit. Nunc
lacinia, nisi ac vehicula
pellentesque, justo tellus
dignissim velit, nec
rhoncus tellus lorem id
sapien.
Scales nicely
Frontloading effort
Extensible
Multiple players out of the box
Complexity
Order related problems
What could be next?
42
— Gameplay!
— Alternative turn modes: Timed, multiple actions
— Integrate awesome Unity packages:
– Deterministic, stateless Physics
– Mulitplayer
– Live Play
– …
Recap
43
— ECS building blocks
— MonoBehaviours ECS
— Turn based game loop
— Player action triggers world
change
— Variants of turn based systems
Thank you!
Florian Uhde
@florianuhde
florian.uhde@posteo.de
44
Bonus Slide! Local Multiplayer
— Give ID to PlayerComponent
— Filter InputSystem based on ID
— MoveSystem -> WithAny
Bonus Slide! Update Groups
46
— Use attributes to sort systems
into update order
— [UpdateAfter] [UpdateBefore]
Player Action
TB System
TB System
…

Mais conteúdo relacionado

Mais procurados

[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리
[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리
[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리MinGeun Park
 
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들영욱 오
 
Node canvasで作るプロトタイプ
Node canvasで作るプロトタイプNode canvasで作るプロトタイプ
Node canvasで作るプロトタイプH T
 
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters AdventureHow we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters AdventureFelipe Lira
 
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)Seungmo Koo
 
ECS (Part 1/3) - Introduction to Data-Oriented Design
ECS (Part 1/3) - Introduction to Data-Oriented DesignECS (Part 1/3) - Introduction to Data-Oriented Design
ECS (Part 1/3) - Introduction to Data-Oriented DesignPhuong Hoang Vu
 
Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4Gerke Max Preussner
 
Level Design Challenges & Solutions - Mirror's Edge
Level Design Challenges & Solutions - Mirror's EdgeLevel Design Challenges & Solutions - Mirror's Edge
Level Design Challenges & Solutions - Mirror's EdgeElectronic Arts / DICE
 
ECS: Streaming and Serialization - Unite LA
ECS: Streaming and Serialization - Unite LAECS: Streaming and Serialization - Unite LA
ECS: Streaming and Serialization - Unite LAUnity Technologies
 
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기강 민우
 
게임서버프로그래밍 #4 - 멀티스레드 프로그래밍
게임서버프로그래밍 #4 - 멀티스레드 프로그래밍게임서버프로그래밍 #4 - 멀티스레드 프로그래밍
게임서버프로그래밍 #4 - 멀티스레드 프로그래밍Seungmo Koo
 
위대한 게임개발팀의 공통점
위대한 게임개발팀의 공통점위대한 게임개발팀의 공통점
위대한 게임개발팀의 공통점Ryan Park
 
멀티플레이 레벨 디자인의 10가지 팁
멀티플레이 레벨 디자인의 10가지 팁멀티플레이 레벨 디자인의 10가지 팁
멀티플레이 레벨 디자인의 10가지 팁용태 이
 
게임 인공지능 설계
게임 인공지능 설계게임 인공지능 설계
게임 인공지능 설계ByungChun2
 
Custom SRP and graphics workflows - Unite Copenhagen 2019
Custom SRP and graphics workflows - Unite Copenhagen 2019Custom SRP and graphics workflows - Unite Copenhagen 2019
Custom SRP and graphics workflows - Unite Copenhagen 2019Unity Technologies
 
multi plaform Full3D MMO 만들기 "삼국지를 품다"의 테크니컬 아트
multi plaform Full3D MMO 만들기 "삼국지를 품다"의 테크니컬 아트multi plaform Full3D MMO 만들기 "삼국지를 품다"의 테크니컬 아트
multi plaform Full3D MMO 만들기 "삼국지를 품다"의 테크니컬 아트JP Jung
 
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 2016Simon Schmid
 

Mais procurados (20)

Niagara In UE4
Niagara In UE4Niagara In UE4
Niagara In UE4
 
[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리
[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리
[데브루키/141206 박민근] 유니티 최적화 테크닉 총정리
 
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
NDC2017 언리얼엔진4 디버깅 101 - 게임 기획자, 프로그래머가 버그와 만났을 때 사용할 수 있는 지침들
 
Node canvasで作るプロトタイプ
Node canvasで作るプロトタイプNode canvasで作るプロトタイプ
Node canvasで作るプロトタイプ
 
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters AdventureHow we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
 
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
사설 서버를 막는 방법들 (프리섭, 더이상은 Naver)
 
ECS (Part 1/3) - Introduction to Data-Oriented Design
ECS (Part 1/3) - Introduction to Data-Oriented DesignECS (Part 1/3) - Introduction to Data-Oriented Design
ECS (Part 1/3) - Introduction to Data-Oriented Design
 
Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4Plug-ins & Third-Party SDKs in UE4
Plug-ins & Third-Party SDKs in UE4
 
Level Design Challenges & Solutions - Mirror's Edge
Level Design Challenges & Solutions - Mirror's EdgeLevel Design Challenges & Solutions - Mirror's Edge
Level Design Challenges & Solutions - Mirror's Edge
 
ECS: Streaming and Serialization - Unite LA
ECS: Streaming and Serialization - Unite LAECS: Streaming and Serialization - Unite LA
ECS: Streaming and Serialization - Unite LA
 
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기
[IGC 2017] 펄어비스 민경인 - Mmorpg를 위한 voxel 기반 네비게이션 라이브러리 개발기
 
UE4 Hair & Groomでのリアルタイムファーレンダリング (UE4 Character Art Dive Online)
UE4 Hair & Groomでのリアルタイムファーレンダリング (UE4 Character Art Dive Online)UE4 Hair & Groomでのリアルタイムファーレンダリング (UE4 Character Art Dive Online)
UE4 Hair & Groomでのリアルタイムファーレンダリング (UE4 Character Art Dive Online)
 
게임서버프로그래밍 #4 - 멀티스레드 프로그래밍
게임서버프로그래밍 #4 - 멀티스레드 프로그래밍게임서버프로그래밍 #4 - 멀티스레드 프로그래밍
게임서버프로그래밍 #4 - 멀티스레드 프로그래밍
 
위대한 게임개발팀의 공통점
위대한 게임개발팀의 공통점위대한 게임개발팀의 공통점
위대한 게임개발팀의 공통점
 
멀티플레이 레벨 디자인의 10가지 팁
멀티플레이 레벨 디자인의 10가지 팁멀티플레이 레벨 디자인의 10가지 팁
멀티플레이 레벨 디자인의 10가지 팁
 
게임 인공지능 설계
게임 인공지능 설계게임 인공지능 설계
게임 인공지능 설계
 
Custom SRP and graphics workflows - Unite Copenhagen 2019
Custom SRP and graphics workflows - Unite Copenhagen 2019Custom SRP and graphics workflows - Unite Copenhagen 2019
Custom SRP and graphics workflows - Unite Copenhagen 2019
 
multi plaform Full3D MMO 만들기 "삼국지를 품다"의 테크니컬 아트
multi plaform Full3D MMO 만들기 "삼국지를 품다"의 테크니컬 아트multi plaform Full3D MMO 만들기 "삼국지를 품다"의 테크니컬 아트
multi plaform Full3D MMO 만들기 "삼국지를 품다"의 테크니컬 아트
 
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
 
Ssao
SsaoSsao
Ssao
 

Semelhante a Building a turn-based game prototype using ECS - Unite Copenhagen 2019

Converting Scene Data to DOTS – Unite Copenhagen 2019
Converting Scene Data to DOTS – Unite Copenhagen 2019Converting Scene Data to DOTS – Unite Copenhagen 2019
Converting Scene Data to DOTS – Unite Copenhagen 2019Unity Technologies
 
React new features and intro to Hooks
React new features and intro to HooksReact new features and intro to Hooks
React new features and intro to HooksSoluto
 
Scene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game EnginesScene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game EnginesBryan Duggan
 
You will learn RxJS in 2017
You will learn RxJS in 2017You will learn RxJS in 2017
You will learn RxJS in 2017名辰 洪
 
Oleksandr Tolstykh
Oleksandr TolstykhOleksandr Tolstykh
Oleksandr TolstykhCodeFest
 
Unreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorUnreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorNick Pruehs
 
Entity Component System - a different approach to game and app development
Entity Component System - a different approach to game and app developmentEntity Component System - a different approach to game and app development
Entity Component System - a different approach to game and app developmentMaxim Zaks
 
A split screen-viable UI event system - Unite Copenhagen 2019
A split screen-viable UI event system - Unite Copenhagen 2019A split screen-viable UI event system - Unite Copenhagen 2019
A split screen-viable UI event system - Unite Copenhagen 2019Unity Technologies
 
Think Async: Asynchronous Patterns in NodeJS
Think Async: Asynchronous Patterns in NodeJSThink Async: Asynchronous Patterns in NodeJS
Think Async: Asynchronous Patterns in NodeJSAdam L Barrett
 
Design pattern - part 3
Design pattern - part 3Design pattern - part 3
Design pattern - part 3Jieyi Wu
 
Tracking a soccer game with Big Data
Tracking a soccer game with Big DataTracking a soccer game with Big Data
Tracking a soccer game with Big DataWSO2
 
Strata 2014 Talk:Tracking a Soccer Game with Big Data
Strata 2014 Talk:Tracking a Soccer Game with Big DataStrata 2014 Talk:Tracking a Soccer Game with Big Data
Strata 2014 Talk:Tracking a Soccer Game with Big DataSrinath Perera
 
Pick up the low-hanging concurrency fruit
Pick up the low-hanging concurrency fruitPick up the low-hanging concurrency fruit
Pick up the low-hanging concurrency fruitVaclav Pech
 
React Back to the Future
React Back to the FutureReact Back to the Future
React Back to the Future500Tech
 
Intro to OTP in Elixir
Intro to OTP in ElixirIntro to OTP in Elixir
Intro to OTP in ElixirJesse Anderson
 
Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Nick Pruehs
 
Silverlight as a Gaming Platform
Silverlight as a Gaming PlatformSilverlight as a Gaming Platform
Silverlight as a Gaming Platformgoodfriday
 
Tracking a soccer game with big data
Tracking a soccer game with big dataTracking a soccer game with big data
Tracking a soccer game with big dataWSO2
 

Semelhante a Building a turn-based game prototype using ECS - Unite Copenhagen 2019 (20)

Converting Scene Data to DOTS – Unite Copenhagen 2019
Converting Scene Data to DOTS – Unite Copenhagen 2019Converting Scene Data to DOTS – Unite Copenhagen 2019
Converting Scene Data to DOTS – Unite Copenhagen 2019
 
React new features and intro to Hooks
React new features and intro to HooksReact new features and intro to Hooks
React new features and intro to Hooks
 
Road to react hooks
Road to react hooksRoad to react hooks
Road to react hooks
 
Scene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game EnginesScene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game Engines
 
You will learn RxJS in 2017
You will learn RxJS in 2017You will learn RxJS in 2017
You will learn RxJS in 2017
 
Oleksandr Tolstykh
Oleksandr TolstykhOleksandr Tolstykh
Oleksandr Tolstykh
 
Unreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal EditorUnreal Engine Basics 02 - Unreal Editor
Unreal Engine Basics 02 - Unreal Editor
 
Entity Component System - a different approach to game and app development
Entity Component System - a different approach to game and app developmentEntity Component System - a different approach to game and app development
Entity Component System - a different approach to game and app development
 
libGDX: Scene2D
libGDX: Scene2DlibGDX: Scene2D
libGDX: Scene2D
 
A split screen-viable UI event system - Unite Copenhagen 2019
A split screen-viable UI event system - Unite Copenhagen 2019A split screen-viable UI event system - Unite Copenhagen 2019
A split screen-viable UI event system - Unite Copenhagen 2019
 
Think Async: Asynchronous Patterns in NodeJS
Think Async: Asynchronous Patterns in NodeJSThink Async: Asynchronous Patterns in NodeJS
Think Async: Asynchronous Patterns in NodeJS
 
Design pattern - part 3
Design pattern - part 3Design pattern - part 3
Design pattern - part 3
 
Tracking a soccer game with Big Data
Tracking a soccer game with Big DataTracking a soccer game with Big Data
Tracking a soccer game with Big Data
 
Strata 2014 Talk:Tracking a Soccer Game with Big Data
Strata 2014 Talk:Tracking a Soccer Game with Big DataStrata 2014 Talk:Tracking a Soccer Game with Big Data
Strata 2014 Talk:Tracking a Soccer Game with Big Data
 
Pick up the low-hanging concurrency fruit
Pick up the low-hanging concurrency fruitPick up the low-hanging concurrency fruit
Pick up the low-hanging concurrency fruit
 
React Back to the Future
React Back to the FutureReact Back to the Future
React Back to the Future
 
Intro to OTP in Elixir
Intro to OTP in ElixirIntro to OTP in Elixir
Intro to OTP in Elixir
 
Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3
 
Silverlight as a Gaming Platform
Silverlight as a Gaming PlatformSilverlight as a Gaming Platform
Silverlight as a Gaming Platform
 
Tracking a soccer game with big data
Tracking a soccer game with big dataTracking a soccer game with big data
Tracking a soccer game with big data
 

Mais de Unity Technologies

Build Immersive Worlds in Virtual Reality
Build Immersive Worlds  in Virtual RealityBuild Immersive Worlds  in Virtual Reality
Build Immersive Worlds in Virtual RealityUnity Technologies
 
Augmenting reality: Bring digital objects into the real world
Augmenting reality: Bring digital objects into the real worldAugmenting reality: Bring digital objects into the real world
Augmenting reality: Bring digital objects into the real worldUnity Technologies
 
Let’s get real: An introduction to AR, VR, MR, XR and more
Let’s get real: An introduction to AR, VR, MR, XR and moreLet’s get real: An introduction to AR, VR, MR, XR and more
Let’s get real: An introduction to AR, VR, MR, XR and moreUnity Technologies
 
Using synthetic data for computer vision model training
Using synthetic data for computer vision model trainingUsing synthetic data for computer vision model training
Using synthetic data for computer vision model trainingUnity Technologies
 
The Tipping Point: How Virtual Experiences Are Transforming Global Industries
The Tipping Point: How Virtual Experiences Are Transforming Global IndustriesThe Tipping Point: How Virtual Experiences Are Transforming Global Industries
The Tipping Point: How Virtual Experiences Are Transforming Global IndustriesUnity Technologies
 
Unity Roadmap 2020: Live games
Unity Roadmap 2020: Live games Unity Roadmap 2020: Live games
Unity Roadmap 2020: Live games Unity Technologies
 
Unity Roadmap 2020: Core Engine & Creator Tools
Unity Roadmap 2020: Core Engine & Creator ToolsUnity Roadmap 2020: Core Engine & Creator Tools
Unity Roadmap 2020: Core Engine & Creator ToolsUnity Technologies
 
How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...
How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...
How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...Unity Technologies
 
Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity XR platform has a new architecture – Unite Copenhagen 2019Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity XR platform has a new architecture – Unite Copenhagen 2019Unity Technologies
 
Turn Revit Models into real-time 3D experiences
Turn Revit Models into real-time 3D experiencesTurn Revit Models into real-time 3D experiences
Turn Revit Models into real-time 3D experiencesUnity Technologies
 
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...Unity Technologies
 
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...Unity Technologies
 
QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019Unity Technologies
 
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...Unity Technologies
 
Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Supplying scalable VR training applications with Innoactive - Unite Copenhage...Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Supplying scalable VR training applications with Innoactive - Unite Copenhage...Unity Technologies
 
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...Unity Technologies
 
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...Unity Technologies
 
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...Unity Technologies
 
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019Unity Technologies
 
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019Unity Technologies
 

Mais de Unity Technologies (20)

Build Immersive Worlds in Virtual Reality
Build Immersive Worlds  in Virtual RealityBuild Immersive Worlds  in Virtual Reality
Build Immersive Worlds in Virtual Reality
 
Augmenting reality: Bring digital objects into the real world
Augmenting reality: Bring digital objects into the real worldAugmenting reality: Bring digital objects into the real world
Augmenting reality: Bring digital objects into the real world
 
Let’s get real: An introduction to AR, VR, MR, XR and more
Let’s get real: An introduction to AR, VR, MR, XR and moreLet’s get real: An introduction to AR, VR, MR, XR and more
Let’s get real: An introduction to AR, VR, MR, XR and more
 
Using synthetic data for computer vision model training
Using synthetic data for computer vision model trainingUsing synthetic data for computer vision model training
Using synthetic data for computer vision model training
 
The Tipping Point: How Virtual Experiences Are Transforming Global Industries
The Tipping Point: How Virtual Experiences Are Transforming Global IndustriesThe Tipping Point: How Virtual Experiences Are Transforming Global Industries
The Tipping Point: How Virtual Experiences Are Transforming Global Industries
 
Unity Roadmap 2020: Live games
Unity Roadmap 2020: Live games Unity Roadmap 2020: Live games
Unity Roadmap 2020: Live games
 
Unity Roadmap 2020: Core Engine & Creator Tools
Unity Roadmap 2020: Core Engine & Creator ToolsUnity Roadmap 2020: Core Engine & Creator Tools
Unity Roadmap 2020: Core Engine & Creator Tools
 
How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...
How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...
How ABB shapes the future of industry with Microsoft HoloLens and Unity - Uni...
 
Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity XR platform has a new architecture – Unite Copenhagen 2019Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity XR platform has a new architecture – Unite Copenhagen 2019
 
Turn Revit Models into real-time 3D experiences
Turn Revit Models into real-time 3D experiencesTurn Revit Models into real-time 3D experiences
Turn Revit Models into real-time 3D experiences
 
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
 
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
 
QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019
 
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
 
Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Supplying scalable VR training applications with Innoactive - Unite Copenhage...Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Supplying scalable VR training applications with Innoactive - Unite Copenhage...
 
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
 
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
 
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
 
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
 
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
 

Último

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Building a turn-based game prototype using ECS - Unite Copenhagen 2019

  • 1.
  • 2. Building a Turn-Based Game Prototype … the ECS Way
  • 3. Setting the stage! 3 — Not the next Civilization game — Code focussed — No ECS experience is fine — Agenda – My background – Concepts of this talk – Non-turn-based prototype with ECS – Turn it turn-based
  • 6. Turn Based Game Loop 6 — Continuous update — Poll all events — Change game world Game world continuously changes every frame while (true) { processInput(); update(elapsed); render(); } System A System Y System Z … …
  • 7. 7 — Frame != Turn — We have continuous systems: update every frame — We have turn based systems: update every turn Turn Based Game Loop
  • 8. Turn Based Game Loop 8 — Continuous update — Poll all events — Wait for player action — Update other actors only when player makes a move Game world only changes in response to player action while (true) { action = processInput(); if(action != null) { update(elapsed); } render(); } Player Action TB System TB System …
  • 9. — Composition vs Inheritance — Atomic parts — Filtering — Systematic design Entity Component System Unity ECS 9 DATA DATA
  • 10. Unity ECS 10 — Quite useable today — High degree of control over gameworld (Savegames!) — Performance and data layout — Path into future awesomeness of Unity
  • 12. Example Project Setup 12 — Unity 2019.2.6f1 — 3D Template — Packages: – Entities 0.1.1 [preview] – Hybrid Renderer 0.1.1 [preview] — Content from different assets: – PolyWorks FullPack, GalaxyBox1, SurrounDead - Free Sample, Bitgem Texture pack — https://github.com/floAr/UniteCPH_TurnBasedPrototypeECS
  • 13. “Flying Gardener” 13 — Grid based world — Two kind of actors: – Player(s) – NPCs (Evil Snails) — 2DOF Movement
  • 14. Creating actors 14 — Actors move on grid in game world — Current- and target position [Serializable] public struct ActorComponent : IComponentData { public float3 position; public float3 target_positon; } public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) { float3 grid_pos = new float3( math.floor(transform.position.x), 0, math.floor(transform.position.z) ); dstManager.AddComponentData(entity, new ActorComponent() { position = grid_pos, target_positon = grid_pos }); }
  • 15. Creating actors 15 — Actors move on grid in game world — Current- and target position [Serializable] public struct ActorComponent : IComponentData { public float3 position; public float3 target_positon; } public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) { float3 grid_pos = new float3( math.floor(transform.position.x), 0, math.floor(transform.position.z) ); dstManager.AddComponentData(entity, new ActorComponent() { position = grid_pos, target_positon = grid_pos }); }
  • 16. Creating actors 16 — Actors move on grid in game world — Current- and target position — Convert from MonoBehaviour to Component [Serializable] public struct ActorComponent : IComponentData { public float3 position; public float3 target_positon; } public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) { float3 grid_pos = new float3( math.floor(transform.position.x), 0, math.floor(transform.position.z) ); dstManager.AddComponentData(entity, new ActorComponent() { position = grid_pos, target_positon = grid_pos }); }
  • 17. Creating actors 17 — Actors move on grid in game world — Current- and target position — Convert from MonoBehaviour to Component [Serializable] public struct ActorComponent : IComponentData { public float3 position; public float3 target_positon; } public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) { float3 grid_pos = new float3( math.floor(transform.position.x), 0, math.floor(transform.position.z) ); dstManager.AddComponentData(entity, new ActorComponent() { position = grid_pos, target_positon = grid_pos }); }
  • 18. — Show player prefab with scripts be converted to entity — Highlight entity debugger [Editor / Live Code] 18
  • 19. Moving actors 19 — Interpolate between current and target position struct ActorSystemJob : IJobForEach<Translation, Rotation, ActorComponent> { public float deltaTime; public void Execute(ref Translation translation, ref Rotation rotation, ref ActorComponent actor ) { var direction = actor.target_positon - actor.position; if (math.length(direction) > 0.1f) { direction = math.normalize(direction); rotation.Value= quaternion.LookRotation(direction, math.up()); translation.Value = translation.Value + direction * deltaTime; actor.position = translation.Value; } else { translation.Value = actor.target_positon; actor.position = translation.Value; } } }
  • 20. Moving actors 20 — Interpolate between current and target position — Change Translation and Rotation accordingly struct ActorSystemJob : IJobForEach<Translation, Rotation, ActorComponent> { public float deltaTime; public void Execute(ref Translation translation, ref Rotation rotation, ref ActorComponent actor ) { var direction = actor.target_positon - actor.position; if (math.length(direction) > 0.1f) { direction = math.normalize(direction); rotation.Value= quaternion.LookRotation(direction, math.up()); translation.Value = translation.Value + direction * deltaTime; actor.position = translation.Value; } else { translation.Value = actor.target_positon; actor.position = translation.Value; } } }
  • 21. Moving actors 21 — Interpolate between current and target position — Change Translation and Rotation accordingly — Execute on all entities with Translation, Rotation and ActorComponent struct ActorSystemJob : IJobForEach<Translation, Rotation, ActorComponent> { public float deltaTime; public void Execute(ref Translation translation, ref Rotation rotation, ref ActorComponent actor ) { var direction = actor.target_positon - actor.position; if (math.length(direction) > 0.1f) { direction = math.normalize(direction); rotation.Value= quaternion.LookRotation(direction, math.up()); translation.Value = translation.Value + direction * deltaTime; actor.position = translation.Value; } else { translation.Value = actor.target_positon; actor.position = translation.Value; } } }
  • 22. Moving actors 22 — Interpolate between current and target position — Change Translation and Rotation accordingly — Execute on all entities with Translation, Rotation and ActorComponent struct ActorSystemJob : IJobForEach<Translation, Rotation, ActorComponent> { public float deltaTime; public void Execute(ref Translation translation, ref Rotation rotation, ref ActorComponent actor ) { var direction = actor.target_positon - actor.position; if (math.length(direction) > 0.1f) { direction = math.normalize(direction); rotation.Value= quaternion.LookRotation(direction, math.up()); translation.Value = translation.Value + direction * deltaTime; actor.position = translation.Value; } else { translation.Value = actor.target_positon; actor.position = translation.Value; } } }
  • 23. Moving actors 23 — Interpolate between current and target position — Change Translation and Rotation accordingly — Execute on all entities with Translation, Rotation and ActorComponent — Pipe external data in and schedule the job public class ActorSystem : JobComponentSystem { [BurstCompile] struct ActorSystemJob { […] } protected override JobHandle OnUpdate(JobHandle inputDependencies) { var job = new ActorSystemJob(); job.deltaTime = UnityEngine.Time.deltaTime; return job.Schedule(this, inputDependencies); } }
  • 24. public struct MoveIntention : IComponentData { public int2 direction_xz; } protected override void OnUpdate() { Entities.WithAll<ActorComponent>().ForEach((Entity id) => { var direction = generateMove(); var intent = new MoveIntention() { direction_xz = direction }; PostUpdateCommands.AddComponent<MoveIntention>(id, intent); }); } Moving actors 24 — Create MoveIntention
  • 25. public struct MoveIntention : IComponentData { public int2 direction_xz; } protected override void OnUpdate() { Entities.WithAll<ActorComponent>().ForEach((Entity id) => { var direction = generateMove(); var intent = new MoveIntention() { direction_xz = direction }; PostUpdateCommands.AddComponent<MoveIntention>(id, intent); }); } Moving actors 25 — Create MoveIntention
  • 26. public struct MoveIntention : IComponentData { public int2 direction_xz; } protected override void OnUpdate() { Entities.WithAll<ActorComponent>().ForEach((Entity id) => { var direction = generateMove(); var intent = new MoveIntention() { direction_xz = direction }; PostUpdateCommands.AddComponent<MoveIntention>(id, intent); }); } Moving actors 26 — Create MoveIntention — System that generate random intentions (for our non-player actors)
  • 27. public struct MoveIntention : IComponentData { public int2 direction_xz; } protected override void OnUpdate() { Entities.WithAll<ActorComponent>().ForEach((Entity id) => { var direction = generateMove(); var intent = new MoveIntention() { direction_xz = direction }; PostUpdateCommands.AddComponent<MoveIntention>(id, intent); }); } Moving actors 27 — Create MoveIntention — System that generate random intentions (for our non-player actors)
  • 28. public struct MoveIntention : IComponentData { public int2 direction_xz; } protected override void OnUpdate() { Entities.WithAll<ActorComponent>().ForEach((Entity id) => { var direction = generateMove(); var intent = new MoveIntention() { direction_xz = direction }; PostUpdateCommands.AddComponent<MoveIntention>(id, intent); }); } Moving actors 28 — Create MoveIntention — System that generate random intentions (for our non-player actors)
  • 29. public struct MoveIntention : IComponentData { public int2 direction_xz; } protected override void OnUpdate() { Entities.WithAll<ActorComponent>().ForEach((Entity id) => { var direction = generateMove(); var intent = new MoveIntention() { direction_xz = direction }; PostUpdateCommands.AddComponent<MoveIntention>(id, intent); }); } Moving actors 29 — Create MoveIntention — System that generate random intentions (for our non-player actors) — Component changes need synchronization
  • 30. public struct MoveIntention : IComponentData { public int2 direction_xz; } protected override void OnUpdate() { Entities.WithAll<ActorComponent>().ForEach((Entity id) => { var direction = generateMove(); var intent = new MoveIntention() { direction_xz = direction }; PostUpdateCommands.AddComponent<MoveIntention>(id, intent); }); } Moving actors 30 — Create MoveIntention — System that generate random intentions (for our non-player actors) — Component changes need synchronization
  • 31. New scene -> grid + player + enemies [Editor / Live Code] 31
  • 32. — Player input / way to pass the turn — Communicate between systems when allowed to run — Variant 1: Manual control — Variant 2: Component based control Changes: — PlayerComponent — InputSystem: WASD -> MoveIntention Bringing things in order. The player update lock 32
  • 33. Show InputSystem Filter Player Entities from RandomMoveSystem [Editor / Live Code] 33
  • 34. Variant 1: Manual Update 34 — Remove turn-based systems from ECS update loop — Manually trigger update after each turn — [DisableAutoCreation] of turn based systems — World.GetOrCreateSystem() — System.Update() TB System TB System Player Action …
  • 35. Variant 1: Manual Update 35 — Remove turn-based systems from ECS update loop — Manually trigger update after each turn — [DisableAutoCreation] of turn based systems — World.GetOrCreateSystem() — System.Update() TB System TB System Player Action …
  • 36. [Disable on Load] Move and RandomMove Manually call them from TurnBasedGameLoop [Editor / Live Code] 36
  • 37. Variant 1: Manual Update 37 One column body text lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc lacinia, nisi ac vehicula pellentesque, justo tellus dignissim velit, nec rhoncus tellus lorem id sapien. Fine grained control Low footprint Manual effort for each system Does not scale well
  • 38. Variant 2: Interlocked Components 38 — Components to communicate — Player has AwaitAction — InputSystem consumes AwaitAction — If no player is waiting, TurnBasedSystem hand out ReadyToHandle flag — After one frame every other system updated so we remove the flag again Player Action TB System TB System …
  • 39. Variant 2: Interlocked Components 39 — Components to communicate — Player has AwaitAction — InputSystem consumes AwaitAction — If no player is waiting, TurnBasedSystem hand out ReadyToHandle flag — After one frame every other system updated so we remove the flag again Player Action TB System TB System …
  • 40. [Editor / Live Code] 40 Player gets await flag Input system consumes await flag Talk about Query If no one is waiting: Hand out ready to handle tokens Refresh await action token Include handle token in move system
  • 41. Variant 2: Interlocked Components 41 One column body text lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc lacinia, nisi ac vehicula pellentesque, justo tellus dignissim velit, nec rhoncus tellus lorem id sapien. Scales nicely Frontloading effort Extensible Multiple players out of the box Complexity Order related problems
  • 42. What could be next? 42 — Gameplay! — Alternative turn modes: Timed, multiple actions — Integrate awesome Unity packages: – Deterministic, stateless Physics – Mulitplayer – Live Play – …
  • 43. Recap 43 — ECS building blocks — MonoBehaviours ECS — Turn based game loop — Player action triggers world change — Variants of turn based systems
  • 45. Bonus Slide! Local Multiplayer — Give ID to PlayerComponent — Filter InputSystem based on ID — MoveSystem -> WithAny
  • 46. Bonus Slide! Update Groups 46 — Use attributes to sort systems into update order — [UpdateAfter] [UpdateBefore] Player Action TB System TB System …