Skip to content
v1.2.0 released

MainframeEngine

A C# game engine on Vulkan with a Godot-style node tree, and an editor built on its own game UI.

  • .NET 11
  • Vulkan 1.2
  • macOS · Windows · Linux
  • MIT

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 showcase

Why 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.

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.

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.

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.

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.