✳ Choose your perspective
← Back to projects

My main project

01 / ARCHITECTURE · TECHNICAL WRITING

One engine. Five projects. One guide.

Building an ECS game engine in C++20

My main project brings together what interests me most about development: understanding engine architecture and explaining it through playable examples. A Spanish-language guide to ECS, memory management and C++20. It is currently used as teaching material in the fourth year of the Multimedia Engineering degree at the University of Alicante.

MY CONTRIBUTION

Author and developer

DATE

May 2023

DURATION

1 year

TOOLS

C++20 · Raylib · ECS · LaTeX

01 / CONTEXT

The challenge.

Turning an engine architecture into a path that other developers could follow from scratch, without losing sight of data organisation or execution flow.

02 / PROCESS

My contribution.

I broke the engine down into entities, components and systems. I organised increasingly challenging examples and wrote explanations alongside the code. The guide progresses towards data separation, slotmaps and component storage.

  • Design of the learning path and writing of the guide.
  • Implementation of the projects and evolution of their ECS engine.
  • Examples covering memory, data structures and component organisation.
03 / OUTCOME

What we built.

A 174-page guide and five learning projects. The journey ends with The Final Room, a turn-based game that brings together the pieces developed throughout the previous chapters.

Explaining an architecture decision means understanding both the problem it solves and the cost it introduces.
04 / DECISIONS

Development decisions.

Introduce architecture when it becomes useful

The five projects give each concept a playable problem to refer to. The sequence starts with small examples and reaches The Final Room. Readers can connect each new engine feature with the behaviour the game needs rather than meeting the whole architecture at once.

Separate identity, data and behaviour

Entities identify game objects, components store their data and systems perform operations on them. In the final project, player controls, collisions, object positions, artificial intelligence and rendering can be studied separately. The game’s behaviour emerges from how those pieces work together.

Make memory management visible

Component storage and slotmaps are part of the project material. Keys combine an index and generation to check validity when slots are reused. Readers can examine both the organisation of data and the insertion, lookup and removal operations behind it.

05 / WALKTHROUGH

The project in use.

  1. Start with the starfield and early examples to understand the execution loop and how state is represented.
  2. Move towards entities, components and systems, comparing the explanations with each prototype’s files.
  3. Open The Final Room and observe how a player action is processed by the systems that update and draw the game.
06 / EXPLORE

What to explore.

A way into the project through its screens, supporting material and, where available, its source code.

  • How the guide’s explanations correspond to the five prototype directories.
  • Keys and generation validation in the slotmap implementation.
  • The order in which systems update in the final game.
THIS PROJECT CONNECTS TOEvery decision takes a turn.

THE PEOPLE BEHIND IT

Credits.

Laureano Cantó

Author and development

Francisco José Gallego Durán

Guide review

NEXT PROJECT / 02

Turn-based strategy, built in C++