Notes and links for my talk for IGDA DC, Tues. Oct 29, 2019. Slides on Projector.
- Who am I?
- … and why listen to me?
- What is an ECS (and DOD)
- comparison to OOP
- entities ("just indexes" - generational indexes)
- components (just data - e.g. "primitive" or value types)
- archetypes - groups of components
- systems - functions that run on queried (by component) groups of entities
- queries - groups of entities with certain sets of components
- resources - like "shared components" … usually read only from the perspective of systems
- jobs - scheduling systems that are dependent on other systems (physics, parent/child transforms)
- Why use it?
- performance
- prototyping & rapid iteration
- serializable (and therefore streamable)
- A very simple implementation from scratch
- JavaScript
- no generational indexing (limited to
2^53 - 1
(or9,007,199,254,740,991
) entities) - no querying/caching, all systems run on all entities (in a "world")
- systems:
- activate/deactivate - lifetime
- update - fireworks, boids, metaballs, boundaries?, gravity?
- Unity
- very new (lots of flux - documentation missing or like, immediately out of date)
- where to start (no
GameObject
s, noMonoBehavior
s) -RuntimeInitializeOnLoadMethod
- Pure ECS
- Project Tiny
- Other applications
- Effects & shader graphs
- Cloud architecture (API as data/components, "functions as a service" as systems)
- Intersectional feminism?
a branch of feminism asserting how different aspects of social and political identity discrimination overlap--for example, race with gender. It is a qualitative analytic framework that identifies how interlocking systems of power affect those who are most marginalized in society. --Wikepedia (emphasis mine)
- TransformSystem | Package Manager UI website
- Scheduling a job from a job - why not? | Package Manager UI website
- Burst User Guide | Package Manager UI website
- Unity - Scripting API: RuntimeInitializeOnLoadMethodAttribute
- Project Tiny Preview Package is here! – Unity Blog
- Entity-Component System in Unity – a tutorial
- keijiro/Voxelman: Unity ECS + C# Job System example
- Unity-Technologies/EntityComponentSystemSamples
- EntityComponentSystemSamples/ECSSamples/Documentation at master · Unity-Technologies/EntityComponentSystemSamples
- EntityComponentSystemSamples/resources.md at master · Unity-Technologies/EntityComponentSystemSamples
- EntityComponentSystemSamples/ecs_principles_and_vision.md at master · Unity-Technologies/EntityComponentSystemSamples
- EntityComponentSystemSamples/is_ecs_for_you.md at master · Unity-Technologies/EntityComponentSystemSamples
- Unity-Technologies/Unity.Mathematics: A prototype of a C# math library providing vector types and math functions with a shader like syntax
- Unity-Technologies/DOTS-Shmup3D-sample: A demo with Unity DOTS and Unity Physics.
- Unity-Technologies/UnityCsReference: Unity C# reference source code
- Unity-Technologies/unite2019-scenedatatodots: Unite 2019 - Converting Scene Data to DOTS (samples)
- UnityTechnologies/AngryBots_ECS: The DOTS project used for the presentation Converting Your Game to DOTS
- UnityTechnologies/SpaceShooterECS: The ECS project originally developed with Intel for GDC 2018
- UnityTechnologies/ProceduralPatterns2D
- Converting your game to DOTS - Unite Copenhagen
- Converting scene data to DOTS - Unite Copenhagen
- Options for Entity interaction - Unite Copenhagen
- Unity ECS for mobile: Metropolis Traffic Simulation - Unite Copenhagen
- Unboxing DOTS: Designing workflows for humans - Unite Copenhagen
- Project Tiny overview and roadmap - Unite Copenhagen
- Overview of physics in DOTS - Unite Copenhagen
- Getting started with Burst - Unite Copenhagen
- Using Entity Command Buffers - Unite Copenhagen
- Creating a third-person zombie shooter with DOTS - Unite Copenhagen
- Building a turn-based game prototype using ECS - Unite Copenhagen
- Introduction to the DOTS Sample and the NetCode that drives it - Unite Copenhagen
- Tangentially related?
Also collected (by me) in a single playlist: Unity DOTS & ECS - Unite Copenhagen 2019
- The truth behind Inversion of Control – Part V – Entity Component System design to achieve true Inversion of Flow Control - Seba's Lab
- What's an Entity System? - Entity Systems Wiki
- Component Based Engine Design | Randy Gaul's Game Programming Blog
- Simple physics using Unity's ECS - Part 1: Introduction - PlayerONE Studio
- ECS Physics - UnityList
- KptEmreU/Roll-A-Ball-ECS-style: Recreation of Unity Roll-A-Ball tutorial
- Entities, components and systems - Ingeniously Simple - Medium
- Gamasutra: Tobias Stein's Blog - The Entity-Component-System - An awesome game-design pattern in C++ (Part 1)
- Data Structures for Entity Systems: Contiguous memory – T-machine.org
- Using An ES With Physics - Entity Systems Wiki
- How we use Box2D with Artemis
- Moving the Paddles - Amethyst Documentation
- amethyst/timing.rs at master · amethyst/amethyst
- Game Loop · Sequencing Patterns · Game Programming Patterns
- A Detailed Explanation of JavaScript Game Loops and Timing | Isaac Sukin
- Understanding Component-Entity-Systems
- SpriteSheetRenderer
- A powerful Unity ECS system to render massive numbers of animated sprites using DynamicBuffers and ComputeBuffer
- a thread on Unity Forums
- Getting Started with ECS in Unity 2019 (Code Monkey)
- Draw a Sprite with ECS in Unity 2019 (Code Monkey)
- Simple Sprite Sheet Animation in Unity ECS (Code Monkey)
See ./notes
.
const sim = createSim();
sim.addResource('keyboard' /* do something to init the keyboard */);
sim.addResource('mouse' /* do something to init the mouse */);
sim.addResource('gamepad' /* do something to init the gamepad */);
const world = createWorld(sim /* whatev */);
world.addEntities(count, withComponents); // maybe a config, like { count: number, withComponents: Component[] }
world.registerSystem(query, system); // cache & invalidate queries
// use a functional style
// emitters ... a default "is active" component?