MainframeEngine 1.1.7
dotnet add package MainframeEngine --version 1.1.7
NuGet\Install-Package MainframeEngine -Version 1.1.7
<PackageReference Include="MainframeEngine" Version="1.1.7" />
<PackageVersion Include="MainframeEngine" Version="1.1.7" />
<PackageReference Include="MainframeEngine" />
paket add MainframeEngine --version 1.1.7
#r "nuget: MainframeEngine, 1.1.7"
#:package MainframeEngine@1.1.7
#addin nuget:?package=MainframeEngine&version=1.1.7
#tool nuget:?package=MainframeEngine&version=1.1.7
Mainframe Engine
A modular C# game engine on Vulkan: a Godot-style scene tree with source-generated serialization, PBR materials, cascaded shadows, RmlUi game UI, Jitter2/Box2D physics, SoundFlow audio, multiplayer, gettext localization and Spine animation.
This package is everything a game needs to build and run, with no engine checkout and no editor required:
MainframeEngine.dll(and the bundledspine-csharp.dll)- the source generator for
[Export],[Signal],[Replicated]and[Rpc]members - the native libraries for
win-x64,linux-x64andosx-arm64/osx-x64, Valve'ssteam_apiincluded - Steam integration over Facepunch.Steamworks (bundled), which starts when the Steam client runs, Apple Silicon too
- the engine content (compiled shaders, UI widgets, fonts), which is copied into your app's
Assets/folder - build integration:
.po→.molocalization, theDEMOdefine fromproject.mfproj, and macOS development app bundles - player builds:
tools/mf-export, the exporter the editor's File › Export runs (see below) - surface shaders:
tools/mf-shadersand the engine's Slang modules (import mainframe.spatial;), run through theMainframeShaderstarget (see below)
Requirements: .NET 10, plus a GPU with Vulkan 1.2 (MoltenVK is included on macOS).
Start a game
The quickest way is the mfgame template from the engine repository, or New Project in the optional Mainframe
Editor. Both create a game library, a desktop project and project.mfproj that reference this package.
To add the engine to an existing project:
dotnet add package MainframeEngine
using MainframeEngine;
// Reads project.mfproj next to the app (window, input map, autoloads, main scene) and runs it.
return GameHost.Run(args, typeof(MyNode).Assembly);
Copy project.mfproj and your Assets/ to the output folder, as the template's desktop project does.
Surface shaders
Your own shaders are Slang surface shaders: .slang files under Assets/ that start with import mainframe.spatial; (3D
meshes) or import mainframe.canvas; (2D items); the engine generates every pass around their vertex() and
fragment(). Their SPIR-V is built ahead of time and committed next to them:
dotnet msbuild MyGame.Desktop -t:MainframeShaders # build stale ones (needs slangc)
dotnet msbuild MyGame.Desktop -t:MainframeShaders -p:MainframeShadersCommand=check # fail on stale ones
slangc comes with the Vulkan SDK or a Slang release. Every build copies the engine's modules to .mainframe/shaders/include
for the shader-slang VS Code extension (slang.additionalSearchPaths).
Player builds
Player builds come from export presets in project.mfproj (the editor's File › Export… writes them). The package
ships mf-export; MainframeExportTool gives its path:
mf_export="$(dotnet msbuild MyGame.Desktop -getProperty:MainframeExportTool)"
dotnet "$mf_export" --project . --preset "Windows" # or --all, --list
dotnet "$mf_export" MyGame.Desktop/MyGame.Desktop.csproj osx-arm64 builds # without a preset (the old package-game form)
It makes <Exe>-<version>-osx-arm64.zip (a signed .app), -win-x64.zip or -linux-x64.tar.gz, with only that
platform's natives. macOS presets sign (ad hoc, or a Developer ID) and notarize; they need a Mac.
Links
- Website and documentation
- Source, editor downloads and releases
- MIT licence; the bundled third-party code keeps its own licences (Valve's
steam_apinatives: the Steamworks SDK Access Agreement)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Box2D.NET (>= 3.1.654)
- Clipper2 (>= 1.5.4)
- DotRecast.Detour (>= 2026.3.1)
- DotRecast.Recast (>= 2026.3.1)
- ENet-CSharp (>= 2.4.8)
- GetText.NET (= 10.0.1)
- Jitter2 (>= 2.9.0)
- NVorbis (= 0.10.5)
- Silk.NET.Assimp (>= 2.23.0)
- Silk.NET.Input.Sdl (>= 2.23.0)
- Silk.NET.MoltenVK.Native (>= 2.23.0)
- Silk.NET.Vulkan (>= 2.23.0)
- Silk.NET.Vulkan.Extensions.EXT (>= 2.23.0)
- Silk.NET.Vulkan.Extensions.KHR (>= 2.23.0)
- Silk.NET.Windowing.Sdl (>= 2.23.0)
- SoundFlow (= 1.4.1)
- StbImageSharp (>= 2.30.16)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.