← All projects

Games

2D roguelike

Rewrite of a game from my studies: a 2D roguelike in Godot 4 with C#, and an ASP.NET Core score API (JWT accounts, PostgreSQL) that checks every run by replaying it.

Done Sprint S23-S25 · 13 points
In short, no jargon for non-developersRead the summaryClose
What it is
A dungeon-exploring video game, with an online leaderboard of the best scores; each score is checked by replaying the game, to prevent cheating.
What it is for
The most complete project of the portfolio: a game, a server, player accounts and a database.
What it shows
Running a complete project in C# and .NET, from the game logic to the secured server.
Source code

How the pieces fit together

Diagram: Terminal → Rogue.Core (actions) ; Godot client → Rogue.Core (same rules) ; Godot client → Scores API (seed, game played) ; Scores API → Rogue.Core (replays the game) ; Scores API → PostgreSQL (EF Core). actions same rules seed, game played replays the game EF Core Terminal text client Rogue.Core rules, seed, replay Godot client Godot 4, C# Scores API ASP.NET Core, JWT PostgreSQL ranking in SQL

A game in progress

Godot 4 cannot export a C# game to the web: the roguelike runs on the desktop (Windows, Linux, macOS), in a Godot window or in the terminal. Here is a game in progress in the Godot client.

To play at home (.NET 10 SDK; Godot 4.7 .NET for the window; Docker for ranked runs, on the score API):

Tech stack

  • Godot 4
  • C#
  • .NET
  • ASP.NET Core
  • EF Core
  • PostgreSQL
  • JWT
  • OpenAPI
  • xUnit
  • Docker

Who does what

Godot 4
The desktop client (display, commands, ranked games), exported for Windows, Linux and macOS by CI.
C#
The game rules in a deterministic library, shared by the Godot client, the terminal and the API.
.NET
The common platform: net8.0 for the rules, net10.0 for the rest.
ASP.NET Core
The scores API, which sets the seed of every ranked game and replays it to compute the score itself.
EF Core
Database access and its migrations.
PostgreSQL
Accounts and scores; the leaderboard with DISTINCT ON.
JWT
The accounts' authentication tokens.
OpenAPI
The API description, and Swagger UI to try it.
xUnit
Tests of the rules (generation, field of view, combat, replay) and of the API, on a real PostgreSQL database.
Docker
Runs the API and its database with docker compose.

Definition of Done

  • Code reviewed, diff by diff
  • Unit and integration tests green
  • Green CI on Linux, Windows and macOS when compiled
  • README, REVIEW.md and DECISIONS.md up to date
  • Texts in French and English
  • Demo deployed and tested on mobile