Mainframe Engine is a modular game engine written in C# for .NET 10. Games are trees of nodes, as in Godot: scenes are
JSON, nodes are plain C# classes whose properties a source generator registers, and servers own everything behind them
— a Vulkan renderer with HDR, PBR and a full post-processing stack, Jitter2 and Box2D physics, a SoundFlow audio mixer,
RmlUi (HTML/CSS) game UI, multiplayer replication, gettext localization, save games and Steam. The editor is built with
the engine's own game UI: scenes and inspectors, Play in its own process with C# code reload, a music mode (a DAW over
the whole window) and a sound designer, and a video mode that turns gameplay recordings into promo footage.
It runs on macOS (Apple Silicon), Windows x64 and Linux x64, ships as the
MainframeEngine NuGet package and a self-updating editor, and is
open source under the MIT licence. It started as a way to learn how engines work and to build a framework I like
working in, and it is in active development (milestones M0–M10 are done; see the roadmap). Feel
free to use it, and to send pull requests or feature requests in Issues 😁
Showcase
Every image is the engine rendering in real time.
The Demo
The Demo has one scene per feature, switched from its nav bar; F12 opens the developer overlay in any
game.
The editor
A Godot-style editor whose UI is built with the engine's own RmlUi game UI. It works on game projects: a Project
Manager and New Project wizard, a scene tree, an inspector generated from the nodes' [Export] metadata with undo/redo,
a 3D or 2D viewport with GPU picking and gizmos, a FileSystem panel (a Simplified view of just Assets and Scripts, or the
whole project folder) that keeps references when files move, and Play — the game builds and runs in its own process,
its log streams into Output, and code changes reload into the open editor. Scenes open in tabs, each in its own world;
nothing but [Tool] nodes runs while editing — until Simulate (Alt+F6) runs the scene's physics and scripts on a
copy in the view and Stop gives the authored scene back. The gizmo moves, rotates and scales every selected node around
a median, active or per-node pivot; a drag on empty space box-selects what is visible; locked nodes stay out of the way;
light and audio ranges (and game floats marked [Export(Handle = …)]) are dragged in the view; and an inline resource
can be saved as a .mres or made unique from the inspector.
Video mode: Run › Play and Record (F10) records the game to MP4, and the Game|Video toggle turns the editor into a
video editor that trims it for promo footage: Detect Silence and Detect Idle Gameplay cut dead air and idle play,
Transcribe writes a Whisper transcript you edit by clicking words, Remove Fillers cuts the "um"s, and Export writes the
trimmed MP4 and the transcript as SRT or text.
The Forest
The Forest is a first-person walk through a generated 320 m valley: a stream over a fall, through
three pools and under a log bridge into a pond, a sand beach on a lake, cliffs and distant mountains round the rest, a
log cabin with a crackling fire and a door that opens, about 2 400 Ez Tree trees and dense ground cover, all generated
at load. PBR
materials lit by a physical sky and its image-based light, baked light probes, volumetric fog, histogram auto exposure,
AgX and a colour-grading LUT, at 2560 × 1440 with 3D at 75 % and TAA upscaling.
Neon
Neon is a first-person walk round a two-bedroom industrial loft 20 floors up in a rainy neon city at
night: open the doors, run the shower, flip the lights and the blinds, watch TV, put music on, sit at a computer whose
six monitors are live and whose terminal runs the apartment, and step out on the balcony over traffic, holograms and
an elevated train — but never leave. Textured CC0 interiors built by a Blender script, about 820 instanced towers whose
neon is all emission and glow, cars on baked curves, a train and fly-bys on Path3D followers, sub-viewport screens,
nearest-light selection, baked probes, and synthesised sound with an adaptive-music stereo
(design). just neon.
Features
Every subsystem has a design doc that describes it exactly as it is in the code.
Rendering
| Feature | What you get |
|---|
| Vulkan renderer | Vulkan 1.2 on macOS (MoltenVK), Windows and Linux: HDR with linear lighting, an in-house GPU allocator and upload queue, a persisted pipeline cache, zero allocations per frame |
| Materials & meshes | PBR StandardMaterial3D, sRGB-aware textures with GPU mips, instanced and sorted batches (10 000 instances in a few draws), frustum culling, GPU picking, SubViewports, billboarded Sprite3Ds that cast shadows, outlined Label3D name tags |
| Lighting & sky | Directional, omni and spot lights; procedural, physical, panoramic and cubemap skies with image-based lighting; baked light probes |
| Shadows | Four sun cascades, a spot/secondary-directional atlas, point-light cubes, PCF and PCSS soft shadows, cutout casters, per-light settings |
| Post-processing | SSAO/GTAO, TAA and upscaling, volumetric fog, depth of field, auto exposure, glow, light shafts, FXAA, colour grading, ACES and AgX |
| 2D canvas & text | Godot-compatible canvas items, sprites, skinned polygons with bones, canvas groups that fade as one image, layers, z-order and y-sort, wrapped multi-line TrueType text from the engine's own rasterizer; Godot's BitMap and Geometry2D (alpha to polygons, polygon booleans and offsets) |
|
Worlds
| Feature | What you get |
|---|
| Terrain | Terrain3D: chunked heightmap meshes with LOD, splat material layers, foliage scatter, exact collision and height queries |
| Procedural trees | A port of Ez Tree: 15 presets, realistic or low-poly styles, wind, levels of detail and impostors, from a seed |
| Water | Streams carved into the terrain along a curve, ponds and falls with spray, refraction, screen-space reflections and caustics |
| Asset import | glTF, FBX and OBJ through Assimp into scenes you can instance, with import settings, an import cache and stable UIDs |
Gameplay
| Feature | What you get |
|---|
| Scene system | A Godot-style SceneTree: lifecycle callbacks, signals, groups, NodePath, pause, [Tool] nodes; .mscene/.mres JSON with stable UIDs and nested scenes; [Export] metadata from a Roslyn source generator, no runtime reflection |
| Physics | Jitter2 in 3D and Box2D in 2D: rigid, static and character bodies, areas that detect bodies and other areas, layers, queries, MoveAndSlide, interpolation, debug draw |
| Joints and ragdolls | PinJoint3D, HingeJoint3D, SliderJoint3D, ConeTwistJoint3D, DistanceJoint3D, WeldJoint3D and six 2D joints: limits, motors, springs, breaking, collision exclusion, debug draw and editor gizmos; Ragdoll3D for rigid-part characters, PhysicalBone3D ragdolls on skinned skeletons and Create physical skeleton in the editor |
| Input & cameras | Named input actions for keyboard, mouse and gamepad, player rebinding, captured and window-confined mouse modes, 2D, 3D and fly cameras |
| Saves & settings | Save slots with thumbnails, versioned JSON with migrations, crash-safe writes with recovery, a drop-in settings menu |
| Multiplayer | Generated [Replicated] and [Rpc], delta snapshots, interpolation, authority, late join; ENet, Steam relay sockets, loopback and simulated bad networks |
Audio
| Feature | What you get |
|---|
| Audio engine | A bus mixer on its own thread, 2D and 3D players, streaming WAV, OGG, MP3 and FLAC, attenuation, low-pass and doppler, a null device fallback |
| Sound designer | ZzFX sounds synthesised at run time: presets, randomize, mutate, a live waveform and export to WAV, in the inspector |
| Music editor | A DAW in the editor's music mode, over the whole window: arrangement, piano roll and mixer (resizable, P / X), a Browser of songs and plugins (F), a built-in wavetable synth (unison, warps, two filters, mod matrix, 39 presets, .wav wavetable import), 15 built-in effects with plugin windows (EQ curve, gain-reduction meters, tempo-synced delays and LFOs), VST3 instruments and effects, MIDI recording, render to OGG or WAV |
Tools
| Feature | What you get |
|---|
| Editor | Project Manager, scene tree, generated inspector with undo, 3D/2D gizmos (multi-node, pivots), range handles, box selection and lock, Simulate in the view, resource Save as .mres / Make Unique, FileSystem panel, Play in its own process, C# code reload |
| Crash reporting | A crash leaves a report bundle (exception, the node and callback it left, scene, GPU and driver, the last log lines); native crashes and kills are noticed on the next start, with optional native dumps; a next-launch prompt for players, opt-in upload to Sentry or your own endpoint; the editor shows a game's crash as one Output row with click-to-source frames |
| Gameplay recording | Record any game to MP4 through your own ffmpeg: F10 in the editor or --record, live or offline, with a sidecar of input, loading and pauses |
| Video mode | The editor trims recordings for promo footage: detect silence and idle play, Whisper transcripts, remove filler words, export |
| Game UI | RmlUi (HTML and CSS) on Vulkan: data binding, gamepad navigation, hot reload and a widget library; the editor is built with it |
| Developer overlay | F12 in any game: frame, renderer, shadow maps, GPU memory, audio mixer, physics and network panels; add your own in one call |
| Frame profiler | Zero-allocation CPU scopes on any thread, GPU timestamps per pass and post effect, counters, a frame history with spike capture; a Profiler section in the F12 overlay, an editor Profiler tab (frame graph, timeline, scope table) and Chrome/Perfetto trace export () |
Tech stack
| Area | Technology | Notes |
|---|
| Language & runtime | C# on .NET 10 | Nullable, warnings as errors; unsafe for Vulkan buffers and matrices |
| Graphics | Vulkan 1.2 via Silk.NET 2.23 | In-house GPU allocator, upload and deletion queues, pipeline cache |
| Vulkan on macOS | MoltenVK (Silk.NET.MoltenVK.Native) | Bundled: nothing to install to run |
| Windowing & input | SDL2 via Silk.NET | Keyboard, mouse, gamepads; HiDPI |
| Shaders | Slang → SPIR-V | Compiled by dotnet build (slangc); committed SPIR-V as the fallback |
| Game & editor UI | RmlUi 6.3 + FreeType | Through mfrmlui, an in-house C ABI shim, and a Vulkan renderer |
| Physics | Jitter2 2.9 (3D) · Box2D.NET 3.1 (2D) | Behind PhysicsServer3D / PhysicsServer2D |
| Audio | SoundFlow 1.4 (miniaudio) · NVorbis 0.10 |
Versions are central in Directory.Packages.props.
Get started
Download the editor from Releases, or make a
game with the .NET 10 SDK alone:
dotnet new install MainframeEngine.Templates
dotnet new mfgame -n MyGame
Getting started covers installing the editor, building from source, making a game in
the editor, the Demo, a tour of the code, tests and releases.
Documentation & roadmap
- Docs site — the documentation, searchable, with the
landing page and editor downloads at engine.mainframe.games.
- Design docs — how each subsystem works today, one topic per file, with known issues.
- Milestones — the roadmap. M0–M10 are done; next are M11 (backend-neutral GPU API, WebGPU),
M12 (mobile core: Android + iOS) and M13 (mobile platform services), each with a design proposal.
License
- Engine code (everything in this repository unless noted otherwise) is MIT licensed — see LICENSE.
- Third-party components and assets keep their own licences; they are listed, with their notices, in
THIRD_PARTY_NOTICES.md. Keep those notices with any distribution of the engine, the editor
or a game built with it.
- Spine:
Plugins/Spine (spine-csharp) is under the
Spine Runtimes License, not MIT. A game that uses
SpineNode (or anything else from the Spine Runtimes) needs its own
Spine Editor licence. The bundled Spine example assets
(SpineBoy) are © Esoteric Software and are not covered by the MIT licence.