The challenge.
Bringing together the lessons from the guide in a more complete game while keeping the relationship between engine systems and game behaviour visible.
07 / C++ · TURN-BASED GAME
Every decision takes a turn.
The final project in the ECS engine guide: a turn-based game about finding a key, opening doors and progressing through random levels.
All programming
June 2023
1 month
C++ · Raylib · ECS
Bringing together the lessons from the guide in a more complete game while keeping the relationship between engine systems and game behaviour visible.
I programmed the game and its logic on top of the engine developed in the guide. Each move or interaction uses a turn; progression adds obstacles and enemies while reducing the items available.
A game with random levels and increasing difficulty, browsable source code and a Linux download. Its implementation is explained step by step in the guide’s final chapters.
A playable project reveals how architecture decisions fit together.
The loop keeps drawing while logic alternates between player input and AI updates. A turn variable and a time interval regulate the alternation. This makes it possible to distinguish continuous presentation from the moment when characters are allowed to act.
The input system reads the player’s components and sets movement. Collision, position and rendering systems then process the state. Following this chain shows each system’s responsibility and where the game rules connect.
Resetting preserves inventory through the game manager, removes entities and clears component storage before another level is prepared. Randomised progression requires attention both to what gets generated and to what must survive between stages.
A way into the project through its screens, supporting material and, where available, its source code.
A CLOSER LOOK
Open any image to explore the gallery.
THE PEOPLE BEHIND IT
Programming
2D art
NEXT PROJECT / 08