Thoughts about entity-component-system

Overview

About

Warning: This is not a complete production-ready library for entity-component-system.

This is only my thoughts about how the modern entity-component-system should look.

Key things:

  • Data-oriented design for components storage. Storages support reordering to reduce 'fragmentation.'

  • Compile-time type check fully compatible with C++ types

  • Multithreading friendly. There should be no data dependencies that limit the parallel processing. Systems must know what data they need only for reading, and which ones to modify.

  • Systems(Processes) can control the order of updating entities. Should be easy to create a parent/child relationship.

  • Support for a large number of entities (100K+) The worst complexity of the any algorithm must be O(n) or better.

The main difference from other entity-component-system frameworks is ReMap, Fold and Reorder concept. When the system(process) receives notification about a new entity, the process can determine the key for this entity. After the keys of all entities are defined, the entities are updated in the order that is defined by the key.

Build status

Windows Appveyor build status

Useful reading (in random order):

Theory and Practice of Game Object Component Architecture by Marcin Chady
http://twvideo01.ubm-us.net/o1/vault/gdccanada09/slides/marcinchadyGDCCanada.ppt

Game Architecture and Components Systems in Lumberyard by Rosen Baklov and Bill Merrill
http://www.gdcvault.com/play/1023600/

A Data - Driven Game Object System by Scott Bilas
http://scottbilas.com/files/2002/gdc_san_jose/game_objects_slides.pdf

Entity Systems are the future of MMOG development by Adam Martin
http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/

"Overwatch" Gameplay Architecture and Netcode (pay wall)
http://www.gdcvault.com/play/1024001/-Overwatch-Gameplay-Architecture-and

Unite Austin 2017 - Writing High Performance C# Scripts by Joachim Ante
https://www.youtube.com/watch?v=tGmnZdY5Y-E

A Dynamic Component Architecture for High Performance Gameplay by Terrance Cohen
http://twvideo01.ubm-us.net/o1/vault/gdccanada10/slides/Terrance_Cohen_DynamicComponentArchitecture.ppt

Pitfalls of Object Oriented Programming by Tony Albrecht
http://gamedevs.org/uploads/pitfalls-of-object-oriented-programming.pdf

Implementation of a component-based entity system in modern C++ by Vittorio Romeo
https://github.com/CppCon/CppCon2015/blob/master/Tutorials/Implementation%20of%20a%20component-based%20entity%20system%20in%20modern%20C%2B%2B/Implementation%20of%20a%20component-based%20entity%20system%20in%20modern%20C%2B%2B%20-%20Vittorio%20Romeo%20-%20CppCon%202015.pdf

Evolve Your Hierarchy by Mick West
http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/

Component-oriented design on consoles by Boris Batkin (in Russian)
http://blog.gamedeff.com/?p=91

Object Systems by Doug Church
http://chrishecker.com/images/6/6f/ObjSys.ppt

Building a Data-Oriented Entity System (Bitsquid engine) by Niklas Gray
http://bitsquid.blogspot.com/2014/08/building-data-oriented-entity-system.html
http://bitsquid.blogspot.com/2014/09/building-data-oriented-entity-system.html
http://bitsquid.blogspot.com/2014/10/building-data-oriented-entity-system.html
http://bitsquid.blogspot.com/2014/10/building-data-oriented-entity-system_10.html

Comparison of Doom 1, Quake, and Doom 3 entity references system by Guillaume Chereau
http://blog.noctua-software.com/entity-references.html

A flexible and expandable architecture for computer games by Jeff Plummer
https://www.tjhsst.edu/~rlatimer/techlab07/plummer_thesis.pdf

The Components and Systems of Morgan's Raid by Paul Gestwicki
http://paulgestwicki.blogspot.com/2012/03/components-and-systems-of-morgans-raid.html

Dungeon Siege by Scott Bilas
https://web.archive.org/web/20150418070828/http://scottbilas.com/games/dungeon-siege

Data Structures for Entity Systems: Contiguous memory by Adam Martin
http://t-machine.org/index.php/2014/03/08/data-structures-for-entity-systems-contiguous-memory/

You might also like...
A component based project manager.

Component Based Project Manager CBPM provides an interface to manage a component-based project. Build To build CBPM, you must install xmake: a build-s

Spin-off component from existing IBM/mcas open source project

PyMM PyMM is a python library that allows the storing and manipulation of existing heavily used types such as Numpy ndarray and PyTorch on Persistent

bsdiff changed to remove bz2, the header and to allow streaming interfaces, to be used on the esp32 with idf as a component

bspatch for esp32 This project adds support for bspatch to the esp32 with some changes: no compression (bz2), no header and changed the interfaces to

Custom ESPHome Component for generic  Sit-Stand-Desks
Custom ESPHome Component for generic Sit-Stand-Desks

ESPHomeGenericSitStandDesk I have one of those generic relatively cheap Sit Stand Desks. In an effort to monitor my desk usage I developed this overki

ESPHome component to send and receive HDMI-CEC messages.

HDMI-CEC ESPHome Component An ESPHome component that supports receiving and transmitting HDMI-CEC messages to connected HDMI devices. The ultimate goa

Operating system project - implementing scheduling algorithms and some system calls for XV6 OS

About XV6 xv6 is a modern reimplementation of Sixth Edition Unix in ANSI C for multiprocessor x86 and RISC-V systems.

CQC (Charmed Quark Controller) a commercial grade, full featured, software based automation system. CQC is built on our CIDLib C++ development system, which is also available here on GitHub.

The CQC Automation System What It Is CQC is a commercial quality, software based automation system, suitable for residential or commercial application

KePOS is a 64-bit operating system. Design and implement your own operating system
KePOS is a 64-bit operating system. Design and implement your own operating system

KePOS is a 64-bit operating system. The purpose of this system is to combine the theoretical knowledge and practice of the operating system, and to deepen the understanding of the operating system.

Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

Owner
Sergey Makeev
Roblox Corporation, Sr. Technical director, Rendering
Sergey Makeev
apecs: A Petite Entity Component System

apecs: A Petite Entity Component System A header-only, very small entity component system with no external dependencies.

Matt Cummins 17 Jun 1, 2022
EntityX - A fast, type-safe C++ Entity-Component system

EntityX - A fast, type-safe C++ Entity Component System NOTE: The current stable release 1.0.0 breaks backward compatibility with < 1.0.0. See the cha

Alec Thomas 2k Nov 26, 2022
[WIP] Experimental C++14 multithreaded compile-time entity-component-system library.

ecst Experimental & work-in-progress C++14 multithreaded compile-time Entity-Component-System header-only library. Overview Successful development of

Vittorio Romeo 448 Nov 20, 2022
C++ single-header entity component system library

ECS This is a simple C++ header-only type-safe entity component system library. It makes heavy use of C++11 constructs, so make sure you have an up to

Sam Bloomberg 415 Nov 24, 2022
C++ entity-component system

CORGI Version 1.0.2 {#corgi_readme} CORGI is a C++ entity-component system library developed primarily for games that focus on simplicity and flexibil

Google 250 Nov 6, 2022
Entity-Component-System (ECS) with a focus on ease-of-use, runtime extensibility and compile-time type safety and clarity.

Kengine The Koala engine is a type-safe and self-documenting implementation of an Entity-Component-System (ECS), with a focus on runtime extensibility

Nicolas Phister 461 Nov 10, 2022
An open source C++ entity system.

anax ARCHIVED: as I haven't maintained this library for at least a couple of years. I don't have the time or interest to work on this. Please use anot

Miguel Martin 457 Nov 16, 2022
A drop-in entity editor for EnTT with Dear ImGui

imgui_entt_entity_editor A drop-in, single-file entity editor for EnTT, with ImGui as graphical backend. demo-code (live) Editor Editor with Entiy-Lis

Erik Scholz 146 Nov 19, 2022
Simple ESPHome Wiegand custom component

esphome-wiegand Simple ESPHome Wiegand custom component Based on this code: https://github.com/Luisiado/wiegand_esphome_module To use: Drop wiegand_de

Av 21 Oct 20, 2022