Thoughts about entity-component-system



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

Game Architecture and Components Systems in Lumberyard by Rosen Baklov and Bill Merrill

A Data - Driven Game Object System by Scott Bilas

Entity Systems are the future of MMOG development by Adam Martin

"Overwatch" Gameplay Architecture and Netcode (pay wall)

Unite Austin 2017 - Writing High Performance C# Scripts by Joachim Ante

A Dynamic Component Architecture for High Performance Gameplay by Terrance Cohen

Pitfalls of Object Oriented Programming by Tony Albrecht

Implementation of a component-based entity system in modern C++ by Vittorio Romeo

Evolve Your Hierarchy by Mick West

Component-oriented design on consoles by Boris Batkin (in Russian)

Object Systems by Doug Church

Building a Data-Oriented Entity System (Bitsquid engine) by Niklas Gray

Comparison of Doom 1, Quake, and Doom 3 entity references system by Guillaume Chereau

A flexible and expandable architecture for computer games by Jeff Plummer

The Components and Systems of Morgan's Raid by Paul Gestwicki

Dungeon Siege by Scott Bilas

Data Structures for Entity Systems: Contiguous memory by Adam Martin

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

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: To use: Drop wiegand_de

Av 21 Oct 20, 2022