Skip to main content

ECS as a Relational Model

· 2 min read

Archetypes, Component-Centric Relations, and Normal Forms

I'm currently working on my Master's thesis. In the meantime, I continue to add features to helios and refactor existing ones, including restructuring the project into self-contained modules (helios::ecs, helios::engine, helios::opengl, ...). However, new game ideas are currently on hold while I focus on research and writing.

My thesis investigates how partitioning entities and components affects parallelization and concurrency in ECS systems. This research can also benefit my game, especially when considering parallel execution for CPU-bound particle systems...

My research question is motivated primarily by the use of ECS in video games and real-time simulations, where making effective and comprehensive use of the available system resources and processor cores is particularly relevant. At the same time, certain runtime invariants and, in many cases, deterministic state transitions must be ensured.

Cover of the paper 'Entity-Component-System as a Relational Model'

While researching current ECS work and commonly used frameworks, I noticed that the frequently drawn connection to relational data structures usually remains informal, while a classification in terms of normal form theory is often only implied.

For this reason, I preceded my main research with an analysis from the perspective of normal form theory. Under the model assumptions made, I show that archetype-based relations satisfy the 1st through 5th normal forms, while component-centric relations (which are often implemented using Sparse Sets) satisfy the 6th normal form.

This makes it possible, in particular, to describe structural properties of the different storage organizations in relational terms, derive static invariants, and establish connections to concepts from database theory.

The paper is available as a preprint in english and german.