onegame
A C#-native game engine with no editor: a game is plain C# plus text assets. Build, run, test, capture and replay it from a terminal.
A quick look
One class holds an entity’s synced state, its commands, its deterministic simulation and its view. The generator writes the change tracking, codecs, deltas and snapshots; the analyzers turn the rules into compile errors.
Your first game, line by line[Entity] public partial class Counter : Entity { [Synced] public partial int Count { get; private set; } [Synced] public partial int Ticks { get; private set; } [Command] public void Increment(int by) => Count += by; protected override void OnTick() => Ticks++; // View code reads state and never writes it. [View] public string Label() => $"Count: {Count}"; }
What it does
Rules enforced at build time
Entities, sync, rendering and UI are generated or checked by Roslyn source generators and analyzers. Warnings are errors, and every shipping project is AOT- and trim-checked.
Sync built in
Clients and servers run the same stack, so state syncs between processes, with prediction, authority transfer and drift detection.
Driven from a terminal
A command line, a C# test API and a live-control protocol (MCP) build, run, inspect, capture and replay games, with scenarios as tests.
Runs where players are
Windows, Linux (X11, Wayland and the Steam Deck), macOS, Android, iOS and the web through WebGPU. Everything is NativeAOT- and trim-clean.
New, run, test, export
You need the .NET 10 SDK and nothing else. onegame new writes a project on the RecursiveAI.OneGame.Sdk MSBuild SDK, which brings the engine from nuget.org at the same version as the tool.
dotnet tool install -g RecursiveAI.OneGame.Cli onegame new mygame cd mygame onegame run --headless --frames 60 --json onegame test --json onegame export --target linux
The packages
- The command
RecursiveAI.OneGame.Cliis theonegamecommand, a dotnet tool: create, build, run, test, capture and replay games. - The SDK
RecursiveAI.OneGame.Sdkis an MSBuild SDK for games. It brings the engine libraries, the analyzers, the development tools of Debug builds and the export targets. - The engine
28 packages in all, one per area: entities and sync, networking and dedicated servers, graphics on Vulkan, Metal and WebGPU, 2D and physically based 3D rendering, glTF import, UI and text, platform and audio output, in-app purchases and Steam, and testing and live control.
- Built on
Shaders are compiled during the build by oneshader, and audio decoding and mixing come from oneaudio.
- Exports
Windows, Linux and macOS builds from the packages alone. Web, Android and iOS exports and plugin servers build from an engine checkout.
- Samples
Sample games in the repository, each with scenarios and a README.
- Version
1.1.2, the same for every package.
- .NET
.NET 10. NativeAOT and trimming are supported. MIT or Apache-2.0.