Jeu Libre: turn-based naval RPG
Strategy RPG prototype in C++ and SFML 3 on a home-made ECS engine: island exploration, sailing, hex-grid combat
C++ · SFML 3 · ECS · Turn-based · Hex grid · JSON · Game Design · Solo
Strategy RPG prototype built for Gaming Campus' "Jeu Libre" (free project) assignment, on a hand-written ECS engine.
Context
The Game Design Document (March 2025) describes a turn-based RPG where the player, captain of a ship in a mostly maritime semi-futuristic world, recruits a crew, explores islands and fights on land (hex tiles, dice rolls, initiative) and at sea. The engine was first built in an "ECS 2D" repository (SFML 2.5, March 2025), then moved to SFML 3.
What I did
Every commit in the repository is mine: the ECS engine (entities, components, systems, JSON databases), the naval exploration scene and the five island scenes, the hex-grid land combat scene, and the Game Design Document. This engine later became the base of the ECS Template.
Links
Architecture
Two-project solution generated by a SolutionGenerator (config/settings.json):
Engine (static library, SFML 3 linked statically)
├── Entity / EntityManager / EntityFactory
├── 37 components (Transform, Render, Combat, CrewMember, Navire, FogOfWar, TurnOrder…)
├── 34 systems + SystemManager
└── JSON databases: actions, effects, items, loot, stats, tiles, spawners
Game (executable)
└── 10 scenes: naval exploration, 5 islands, land combat, options…
Technical points
- Hex grid: directions and neighbours in offset coordinates (
HexDirection, row parity). - Turn order: queue sorted by total initiative (
SystemTurnOrder). - Maps: islands loaded from JSON files (
TileMapLoader, nlohmann/json), one map file and one spawner file per island. - Data-driven: actions, effects, items and loot tables described in JSON and loaded at startup.
Stack
| Tech | Role |
|---|---|
| C++ | Language |
| SFML 3.0.0 | Rendering, window, audio |
| nlohmann/json | Data and maps |
| Visual Studio | Build (generated projects) |