3DEngine 5.2.291
dotnet add package 3DEngine --version 5.2.291
NuGet\Install-Package 3DEngine -Version 5.2.291
<PackageReference Include="3DEngine" Version="5.2.291" />
<PackageVersion Include="3DEngine" Version="5.2.291" />
<PackageReference Include="3DEngine" />
paket add 3DEngine --version 5.2.291
#r "nuget: 3DEngine, 5.2.291"
#:package 3DEngine@5.2.291
#addin nuget:?package=3DEngine&version=5.2.291
#tool nuget:?package=3DEngine&version=5.2.291
<div align="center">
3D Engine
A C# engine on SDL3, Vulkan, ImGui and Slang. A program draws each frame with static calls named as raylib's functions are, over an ECS with a schedule of stages, and is scripted with behaviors compiled while it runs.
</div>
using Engine;
using static Engine.E3D;
InitWindow(800, 450, "[core] basic window");
SetTargetFPS(60);
while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(Color.RayWhite);
DrawText("Congrats! You created your first window!", 190, 200, 20, Color.LightGray);
EndDrawing();
}
CloseWindow();
That is raylib's first example, and why not raylib itself is a fair question. This engine keeps its flat API and its loop, in C# with no binding, and adds a Vulkan renderer with shadows and reflections, an ECS, physics, skeletal animation, scene files and ImGui in the frame. It costs raylib's reach, the web, phones and small boards, and asks for Vulkan. The comparison, with what was measured, is Compared with raylib.
A scene is lit by global illumination worked out in real time by radiance cascades, the light that leaves every surface it reaches lighting what it falls on next, tinted by its color, each frame and with nothing baked. A lamp carried through a cave lights it round its corners, a red wall tints the floor beside it, and every light and mesh of a game may move. Global illumination says how, and what it costs.
[Behavior]
public struct Ball
{
public Vector3 Position;
public Vector3 Velocity;
[OnUpdate]
public void Move(BehaviorContext ctx)
{
var dt = (float)ctx.Time.DeltaSeconds;
Velocity.Y -= 9.81f * dt;
Position += Velocity * dt;
}
}
A program opens a window, draws each frame with static calls and closes the window, and every
call it can make is on one cheatsheet. Dear ImGui works between
BeginDrawing and EndDrawing with no setup. Under the flat API is an ECS whose behaviors are
[Behavior] structs like Ball, whose fields are each entity's state and whose methods a source
generator turns into systems. It runs inside the same frames, so a program uses as much of it as it
needs. DESIGN.md shows the rest of it, and
ARCHITECTURE.md how it is built.
Contents
A program of your own
The engine is the 3DEngine package on nuget.org, and 3DEngine.Templates beside it makes a
game from it in one command:
dotnet new install 3DEngine.Templates
dotnet new 3dengine -n Hello && cd Hello
dotnet run
The project has a window, a loop and a cube in Program.cs, a resources folder for what it
loads, and a source/behaviors folder for scripts the running game compiles again when they are
saved. dotnet new 3dengine-ecs makes one whose state is in behaviors instead, with a script in
that folder setting how fast its cubes turn. Where there is no display,
dotnet run -- --offscreen --frames 30 draws thirty frames with no window and exits.
Without the templates, a console project takes the package:
dotnet new console -n Hello && cd Hello
dotnet add package 3DEngine
and the program at the top of this page goes into Program.cs. A program can use a package built
from a checkout of this repository instead, as
BUILDING.md
shows.
Examples
Each example is a short program in 3DEngine.Examples, run by name:
build/fetch-slang.sh # once, for the shader compiler
build/fetch-raylib-resources.sh # once, for the files raylib's examples load
dotnet run --project 3DEngine.Examples -- core_3d_camera_free
A picture opens the program that drew it, and the name under it is the one it runs by. Each of raylib's own examples, and what is written of it here, is a row of the examples table. A folder's row scrolls sideways where it is wider than the page. The games, the last row, are built from the package as a game of your own would be, each with a README of what it shows.
Of raylib's 222 examples 221 are written here and 1 does not apply, and beside them are 43 examples of the engine's own and 19 games.
Audio (12)
Benchmarks (2)
![]() |
![]() |
|---|---|
textures_bunnymark |
models_stress |
Core (50)
Ecs (6)
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|---|
ecs_behaviors |
ecs_mesh_entities |
ecs_animated_models |
ecs_states |
ecs_physics |
ecs_parented_particles |
Gui (1)
![]() |
|---|
gui_imgui_window |
Models (42)
Physics (1)
![]() |
|---|
physics_boxes |
Scenes (1)
![]() |
|---|
scenes_level |
Shaders (52)
Shapes (45)
Text (17)
Textures (35)
Games (19)
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Hopper |
Summit |
Swarm |
Rally |
Manor |
Tactics |
Tempo |
Sumo |
Wordfall |
Slide |
Jelly |
Wick |
Ore |
Pinball |
Span |
Siege |
Tumble |
Tones |
Blockout |
Guide
The guide in docs/ is for somebody
using the engine, a page an area, each built on an example that runs, read in order or by area.
| CHEATSHEET.md | Every public function of the library on one line, grouped as the pages are |
| A first game | From dotnet new 3dengine to a small finished game in twelve steps, each a few lines and a picture |
| The window and the frame | Opening a window, the loop, time, the window's state and ImGui in the frame |
| Drawing in 2D | Shapes, colors, text, splines, a 2D camera and collision |
| Drawing in 3D and cameras | 3D shapes, moving a camera, projections, picking and drawing into a texture |
| Textures and images | Loading and drawing textures, filtering, editing images, sprites and many sprites |
| Text and fonts | The default font, fonts from files, other scripts, typed text and distance field fonts |
| Models and animation | Loading and generating models, terrain, skeletal animation, layered clips, morph targets, a sky and instancing |
| Modeling | Edit meshes shaped by primitives and operations on a selection, their recipe and its files, and the models and colliders built from them |
| Materials, light and shadows | Metallic and rough surfaces, maps, emissive and see-through surfaces, bloom and effects over the frame, lights and shadows, global illumination, reflection probes |
| Global illumination | Radiance cascades, the scene's field and the probes, emissive surfaces as lights, the qualities and their cost, and the tools that read it against a reference |
| Shaders and compute | Slang shaders for 2D drawing and models, post processing, compute shaders, their buffers and the textures they write |
| Audio | Sounds, streamed music, volume, pitch and pan, and sound placed in a 3D world |
| Input | Keys, the mouse, touch and gestures, gamepads, and input shared with ImGui |
| Physics | Bodies that fall and collide, rays, contacts, triggers, joints and a character |
| Behaviors and the ECS | Behaviors, stages, spawning entities, filters, and the world from the loop |
| States | Screens and modes as a state, behaviors that follow it, and states within states |
| Scenes | Saving and loading levels, the file, a program's own components, and scenes inside scenes |
| The command line | Asking a running program about its world, input, captures, the log, commands of its own and C# typed at it |
| Shipping a game | A game of its own on the package, and one native executable a player runs |
| Compared with raylib | What is the same as raylib, what this engine adds, what it costs, and what was measured |
| Moving from 5.1 to 6.0 | What a game written for 5.1 writes for 6.0, name by name, raylib's names for keys, buttons and log levels among them |
Controlling a running app
./e3d controls any program built on the engine from a terminal, which is how changes are checked
without opening a visible window:
./e3d open models_loading --offscreen # renders, with no window and no display needed
./e3d command entity.count
./e3d command input.key W 40 # input through the engine
./e3d eval 'ecs.Query<Transform>().Count()' # C# compiled against the running world
./e3d shot after.png # the next frame, as a PNG
./e3d stop
Programs take --serve, --hidden, --offscreen, --headless, --frames N and
--frame-time S, and a game adds commands with
[Command] on a static method. E3D.md lists the commands.
Building
You need the .NET 10 SDK and a Vulkan 1.3 driver. SDL3, Assimp and Dear ImGui come with their NuGet
packages, and build/fetch-slang.sh downloads the Slang compiler into build/tools.
build/fetch-slang.sh
dotnet build 3DEngine.slnx
dotnet test 3DEngine.Tests
BUILDING.md has the layout, the platforms and how shaders are compiled.
Status
Early, and used for small games. The flat API carries most of raylib's API, the window and input, 2D and 3D shapes, images and textures, models through Assimp with skeletal animation, sounds, music, audio streams, text in fonts, render targets, Slang shaders for shapes and models, compute shaders, lights with shadows, an environment map and reflection probes, global illumination and glossy reflections, physics, states and scenes, with ImGui in the same frame. The ECS, the scheduler and behaviors run underneath, and a game ships as one native executable through native AOT. What is missing:
- Some of raylib is not carried, as the shapes texture and the file callbacks, and the comparison with raylib answers each function left out with what C# has in its place or why it is left out.
- The effects over the frame are bloom, exposure, a choice of curve, color grading, a vignette, FXAA, depth of field and motion blur, with ambient occlusion beside them, past what a program draws through a render texture and a shader of its own.
- CI draws on Linux and Windows through lavapipe and on macOS through MoltenVK, under the validation layer, on every push, and the pack run plays every game on all three and captures every example on Linux and macOS.
TODO.md lists the rest, in the order it blocks making a game.
Documents
| DESIGN.md | The rules the API follows, and the dependency policy |
| ARCHITECTURE.md | The app, the schedule, the ECS and the renderer |
| RENDERING.md | The renderer and the order it grows in |
| BUILDING.md | Building, testing and platforms |
| TODO.md | Outstanding work |
License
Mozilla Public License 2.0. The libraries the engine depends on, and their licenses, are in THIRD-PARTY-NOTICES.md, which the package carries beside the license.
| 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
- AssimpNetter (>= 6.0.4)
- BepuPhysics (>= 2.5.0-beta.29)
- BepuUtilities (>= 2.5.0-beta.29)
- Microsoft.CodeAnalysis.CSharp (>= 5.3.0)
- NLayer (>= 3.0.0)
- NVorbis (>= 0.10.5)
- SDL3-CS (>= 3.5.0-preview.20260213-150035)
- SDL3-CS.Native (>= 3.5.0-preview.20260205-174353)
- StbImageSharp (>= 2.30.15)
- Twizzle.ImGui-Bundle.NET (>= 1.91.5.2)
- Vortice.Vulkan (>= 3.2.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.2.291 | 0 | 10/24/2026 |
| 5.2.283 | 69 | 10/24/2026 |
| 5.2.281 | 44 | 10/24/2026 |
| 5.2.215 | 157 | 10/23/2026 |
| 5.2.213 | 57 | 10/21/2026 |
| 5.2.204 | 55 | 10/21/2026 |
| 5.2.190 | 180 | 10/20/2026 |
| 5.2.155 | 53 | 10/20/2026 |
| 5.2.92 | 91 | 10/19/2026 |
| 5.2.65 | 65 | 10/18/2026 |
| 5.2.43 | 93 | 10/17/2026 |
| 5.1.116 | 87 | 10/6/2026 |
| 5.0.12 | 88 | 10/4/2026 |
| 5.0.0 | 66 | 10/4/2026 |
| 4.0.1 | 472 | 11/16/2025 |
| 4.0.0 | 378 | 11/16/2025 |
| 3.1.0 | 465 | 10/30/2024 |
| 3.0.99 | 354 | 10/30/2024 |
| 3.0.98 | 353 | 10/30/2024 |
| 3.0.97 | 398 | 10/29/2024 |
A mesh entity draws a mesh the program uploaded or indexed arrays, keeps its mesh while it lives whether drawn or not, and keeps every look past four thousand, a freed mesh letting go of its own looks alone.
A component that names its key through IKeyed has its entities found by it through an index the world keeps as each is added, replaced, removed or despawned, a lookup allocating nothing.
A behavior holds a reference to what nothing can change, a record or sealed class of readonly fields of such values, with no warning, so a stack keeps its item where it kept the item's id.
A query takes up to six components, by copy, by reference and read only, each walking the store with the fewest and filtered as the smaller queries are.
A game's test builds an app with no window through the public AddPlugin and steps its behaviors a frame a call with Frame, and disposing an app shuts it down as CloseWindow does.
A material's ShadowOnly draws its mesh into the shadow maps alone, so a game that leaves the rock over a cave out of its view keeps the sun off the cave's floor, saved with the readings of the grove's glow lights by the way each pixel took, the grove on 5.2.215 and on HEAD, and the cave with the game's culling on and off.
The glow lights carry the box their reach lies in, so a point past it takes none of their light without being weighed against each, which takes the voxel game's cherry grove at 1920 by 1080 at High from 9.1 ms of scene pass to 8.4 on the development machine's GPU.
The model pass takes the share of the sky its probes see in the same gather as their light, which takes the voxel game's cherry grove at 1920 by 1080 at High from 10.1 ms of scene pass to 8.9 on the development machine's GPU.



















































































































































































































































































