A .NET 8 framework for building terminal / CLI games with pixel-art sprites, Markdown-driven localisation, and player-editable content.
Reference only what you need. Each module is a standalone .NET 8 class library with no game-specific dependencies.
ILocalizationService, LocalizationTable, EngineVersion. No external dependencies.CL static façade, CK base keys, Markdown loader, in-memory service. 11 languages, hot-reload, graceful degradation.AnimationEngine for frame-by-frame terminal animation.GameConfig — language, audio, display — consumed by both CLI runtime and Unity/Godot front-end.SaveRepository<T> works with any serialisable model.Clone ConsoleEngine and reference the projects from your game's .csproj.
git clone https://github.com/maxiusofmaximus/ConsoleEngine.git
Reference the modules you need. A typical game uses all five:
<ItemGroup> <ProjectReference Include="path/to/ConsoleEngine.Core/..." /> <ProjectReference Include="path/to/ConsoleEngine.Locale/..." /> <ProjectReference Include="path/to/ConsoleEngine.Rendering/..." /> <ProjectReference Include="path/to/ConsoleEngine.Config/..." /> <ProjectReference Include="path/to/ConsoleEngine.Persistence/..." /> </ItemGroup>
Drop a Markdown table at GameData/locale/en.md. No tools required.
# Locale: en
## Entries
| Key | Value |
|------------------|--------------------|
| menu.title | My Terminal Game |
| greeting | Hello, {0}! |
Three lines to get a localised, pixel-art terminal game running:
PixelArtRenderer.EnableAnsi(); // enable truecolor on Windows
CL.Initialize("GameData", "en"); // load locale
Console.WriteLine(CL.Get("menu.title")); // → "My Terminal Game"
The HelloConsoleEngine sample shows localisation + pixel art in 40 lines of code:
cd samples/HelloConsoleEngine dotnet run
Locale files are plain Markdown tables. They are diff-friendly, editable in any text editor, and read at runtime with no compilation required.
Missing keys fall back to English automatically. Hot-reload a language by calling
CL.Initialize() again — no restart needed.
// Switch to Spanish at runtime — takes effect immediately
CL.Initialize("GameData", language: "es");
Console.WriteLine(CL.Get("menu.title")); // → "Mi Juego de Terminal"
Supported: en · ja · zh-Hans · es · pt
· de · ru · it · fr · ca · ko
ConsoleEngine renders sprites using Unicode ▀ half-block characters and ANSI
truecolor — no graphics library, no window, just the terminal.
// Render a PNG at column 10, row 5 — pixels with alpha < 128 are transparent
PixelArtRenderer.RenderPng("Sprites/hero.png", col: 10, row: 5);
// Or build a sprite from a char-map palette (no PNG file needed)
var palette = new Dictionary<char, PixelArtRenderer.Rgb>
{
['#'] = new(255, 200, 50), // gold
['.'] = new(0, 0, 0), // transparent
};
string[] map = { ".###.", "#####", ".###." };
var sprite = PixelArtRenderer.BuildSprite(map, palette, transparent: new(0,0,0));
PixelArtRenderer.RenderRgb(sprite, col: 10, row: 5);