MainframeEngine
A C# game engine on Vulkan with a Godot-style node tree, and an editor built on its own game UI.
Showcase
Made with Mainframe
Every image is the engine rendering in real time: the Demo's scenes.
The Demo one scene per feature
The Forest and Neon: two first-person games made with the engine.
View the showcaseWhy Mainframe
The game is the engine
There is no runtime for your game to plug into. The engine is a C# library, a game is an ordinary .NET program whose Main is one line, and what you ship is your executable with the engine inside it.
One language, one process
Engine and game are C# in the same process: no binding layer, no marshalling. The NuGet package carries symbols and sources, so the debugger steps from your node into the renderer.
The editor is a game too
The editor is an Engine subclass: its panels are the engine's game UI and its viewports the same scene tree. What the editor does, your game can do.
Play runs the real game
Play builds your project and starts the executable you will ship, in its own process. --headless runs that same executable as a dedicated server.
Your tools just work
A game is a .NET solution: dotnet build, dotnet test, Rider or VS Code, NuGet packages, analyzers and your CI work as for any C# project.
Nothing is out of reach
MIT-licensed and small enough to read, with a design doc per subsystem that describes it as it is in the code. Override it, or point your game at a checkout and change it.
Why not Godot?
If Godot works for you, use it
It is mature, with a large community, web and mobile exports, and GDScript. Mainframe is for people who want Godot's way of making games with three differences.
C# all the way down
Godot is a C++ engine with C# as one of its scripting languages. Here the engine itself is C#, and per-frame code makes no allocations, which a CI gate enforces.
Godot's model, kept
Nodes, the scene tree, signals, [Export], MoveAndSlide, AStarGrid2D, TileMapLayer and surface shaders with Godot's built-ins (written in Slang) work as you know them, so moving over costs little.
The shipping kit is built in
Saves, a settings menu with rebinding, Steam and demo builds, export presets, crash reports, localization, recording with a trailer-cutting video mode, music and sound tools: most of it what Godot leaves to add-ons.
The trade-offs: Mainframe targets desktop (macOS, Windows and Linux) for now, and it is young. Pick it if you would rather read and change your engine than work around it.
Features
Everything a game needs, in one tree
39 subsystems, each with a design doc that describes it exactly as it is in the code.
Rendering
Vulkan renderer
Vulkan 1.2 on macOS (MoltenVK), Windows and Linux: an in-house GPU allocator, upload queue, persisted pipeline cache and zero allocations per frame.
Materials & meshes
PBR StandardMaterial3D by default (older scenes keep Blinn-Phong), sRGB-aware textures with GPU mips, instanced and sorted batches, frustum culling, GPU object picking, SubViewports, billboarded sprites with shadows, outlined 3D text labels.
LOD & decals
Mesh levels of detail picked by projected screen error, with shadows at the same level, authored _LOD0…7 nodes from model files or levels generated by meshoptimizer; forward decals that change albedo, normals, roughness and emission before lighting, with a box gizmo in the editor.
World-space UI
Label3D text in the scene with multiple lines, autowrap, the locale's fallback fonts and a fixed screen size, hundreds of labels in a few batched draws and an opt-out from exposure; nameplates, health bars, prompts and edge-clamped waypoints as HUD markers at 3D points, hidden behind walls by physics rays; terminals and in-world menus as RmlUi panels on quads or any mesh, rendered the same frame, clicked with the mouse, a crosshair or code, and previewed with stand-in data in the editor.
Lighting & sky
Directional, omni and spot lights in linear HDR; procedural, physical, panoramic (HDR too) and cubemap skies with image-based lighting.
Shadows
Four sun cascades, a spot-light atlas and point-light cubes, PCF and soft shadows, cutout casters, per-light settings.
Post-processing
A stack of effects: SSAO, 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, layers, z-order and y-sort, wrapped TrueType text from the engine's own rasterizer, and Godot's BitMap and Geometry2D for turning sprites into polygons.
Animated sprites
Godot's SpriteFrames and AnimatedSprite2D: flipbooks sliced from sprite sheets by count or cell size, Godot's timing and signals, no allocation per frame, and a SpriteFrames editor with a Select Frames dialog.
Tile maps
Godot 4.3's TileSet and TileMapLayer: atlas tiles with flips, collision polygons and custom data; chunked layers drawn in about one batch, y-sorted with characters, one physics body per chunk; paint, line, rect, bucket and random tools with a palette and a TileSet editor.
3D particles
GpuParticles3D on Godot's ParticleProcessMaterial: emission shapes, gravity, damping, turbulence, curves and colour ramps; camera-facing or velocity-aligned billboards, mixed or additive HDR particles that fog and glow.
Spine animation
Spine skeletons under a 2D or 3D camera, lit and casting alpha-tested silhouette shadows, optionally billboarded to the camera, with animation tracks and queues.
Keyframe and skeletal animation
Keyframe any property, cubic and eased, with method and audio keys, in the editor's Animation panel. Skinned glTF and FBX characters with their clips: GPU skinning that shadows, outlines and picking all see, an AnimationPlayer with crossfades, queues and events, root motion that walks a character body, and attachments on bones.
Slang shaders
Every shader in Slang, compiled to SPIR-V at build time, with shared includes and limits generated from one file. Your own Godot canvas_item and spatial shaders draw sprites and meshes, lit, shadowed and pickable.
Worlds
Terrain
Terrain3D: chunked heightmap meshes with LOD, splat material layers, foliage scatter, object scatter (scenes with stable ids games can remove and save), exact collision and height queries. Sculpt, paint, lay water, grow foliage and scatter objects in the editor with the Terrain dock.
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 along a curve carved into the terrain, ponds and falls with spray, refraction, screen-space reflections and caustics. Draw, widen and carve streams in the editor.
Asset import
glTF, FBX and OBJ through Assimp into scenes you can instance, with import settings, an import cache and stable UIDs.
Gameplay
Scene system
A Godot-style node tree: signals, groups, NodePath, pause, [Tool] nodes, JSON scenes with UIDs; metadata from a source generator, no reflection.
Physics
Jitter2 in 3D and Box2D in 2D: rigid, static and character bodies, areas that detect bodies and other areas, layers, raycasts, MoveAndSlide and interpolation.
Navigation
Godot's AStarGrid2D with jump point search and AStar2D/AStar3D point graphs, allocation-free and deterministic; grids baked from static bodies or read live from a tile map layer, NavigationAgent2D with Godot's repath rules and signals, ORCA local avoidance between agents and moving or polygon obstacles, 2D navigation meshes baked from collision shapes and tiles with funnel paths and links for jumps and teleports, async path queries on worker threads that stay deterministic, 3D grids with NavigationAgent3D for top-down 3D games, 3D navigation meshes baked with Recast over ramps and stairs, and Visible Navigation, Bake and Clear in the editor.
Paths
Godot's Path2D/PathFollow2D and Path3D/PathFollow3D on Bézier curves baked to equal arc length: closed curves, smooth tangents, up vectors that never flip on a loop, followers that move by themselves with no allocation, and fast closest-point queries. Moving platforms carry characters, turntables included. Draw paths in 2D and 3D with the editor's curve tool: tilt rings, snap and fit to the terrain.
Joints & ragdolls
Pin, hinge, slider, cone-twist, distance, weld and 6-DOF joints in 3D and seven joint types in 2D (motor joints among them), with limits, motors, springs and breaking; limits dragged in the editor viewport; ragdolls from rigid parts or skinned skeletons, one click to build in the editor, and active ragdolls that stagger when pushed and keep standing.
Input & cameras
Named input actions for keyboard, mouse and gamepad, player rebinding, captured and confined mouse modes, and 2D, 3D and fly cameras.
Saves & settings
Save slots with thumbnails, versioned JSON with migrations, crash-safe writes with recovery, and 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.
Localization
gettext catalogs with plurals and contexts, runtime locale switching, translated UI and scenes, a pseudo-locale and tooling.
Steamworks
Lobbies, invites, rich presence, overlay, achievements and avatars (as textures, in the game UI) over Facepunch.Steamworks, with Valve's natives for Windows, Linux and macOS.
Audio
Audio engine
A bus mixer on its own thread, 2D and 3D players, streaming WAV, OGG, MP3 and FLAC, attenuation, low-pass and doppler.
Adaptive music
Sections, layers, parameters and beat-quantized transitions written in the song editor, baked to stems and played by an AdaptiveMusicPlayer; drive a running game's music from the editor.
Tools
Crash reporting
A crash leaves a report: the exception, the node and callback, scene, GPU, the last log lines. Native crashes are noticed next start; players get a prompt, uploads are opt-in, and the editor shows a game crash 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.
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, adaptive music, physics and network panels; add your own in one call.
Frame profiler
Zero-allocation CPU scopes, GPU timestamps per pass, a Profiler section in the F12 overlay, an editor Profiler tab and Perfetto trace export (--profile-trace).
Games in C#
dotnet new mfgame, project.mfproj and GameHost: autoloads, structured logs, the editor link and headless dedicated servers.
Game export
File › Export: presets per platform in project.mfproj, full and demo builds from one project, Steam checks, icons and signed macOS bundles, archives or depot folders; content ships packed and encrypted in one Assets.mfpak, not loose files; nativeAot compiles the game to one native executable with no .NET assemblies to decompile; mf-export runs the same presets in CI.
NuGet packages
The engine and the project template on nuget.org: build a game with the .NET SDK alone, no checkout or editor needed.
Quality
Zero warnings, 1 600+ tests, golden-image render tests on two drivers, a validation gate and an allocation gate.
Editor
Get the editor
The editor is built with the engine's own game UI. It lives in its own repository,mainframe-editor, with its own docs and releases.
Start building
Read how the engine works, or open the editor and press Play.