I'm sharing my WIP game engine with the Nim community, as I believe it's in a state where folks could start building games using it. There are still some features I need to implement (such as release builds with static linking), but I figured I might as well share the code in case it is useful to others.
I'm currently in the process of constructing examples and authoring documentation. The engine supports macOS and Linux. I will get Windows support added soon, it just hasn't been a priority for me. Some features (like the fire propagation system for instance) are still under development and aren't ready for use yet. Also, I still need to invest a lot of work on the 2D side of things, as it's been less of a priority for me than features needed for 3D games.
Here's a quick rundown of the engine's features:
Core architecture
- Hot-reloadable plugin system: gameplay, examples, and the editor are all shared libraries the engine loads at runtime and
rebuilds in place without restarting.
- First-class C ABI plugin API — plugins are written in any language that can produce a shared library, not just Nim.
- Cross-platform application + windowing layer (macOS arm64 and Linux today; Windows scaffolded).
- Fiber-based job system with work-stealing scheduling for parallel task graphs.
- Lock-free queues, atomics, and a thread pool used throughout the engine internals.
- Virtual file system with mount points, alias resolution, and absolute-path passthrough.
- Hot-reloading asset pipeline: live file watching on mount points triggers re-imports of textures, shaders, scenes,
etc.
- Asynchronous, handle-based asset manager with reference counting and reload notifications.
- Project-wide custom allocator routing all Nim allocations through a high-performance heap.
- Built-in CPU/GPU profiler integration with zone instrumentation across engine + plugin code.
- Live shader hot-reload driven by compiled reflection metadata (pipelines rebuilt at runtime from YAML).
- Cross-backend graphics abstraction (Metal / GL / D3D11 / WebGPU) selected per-platform.
- In-engine logging, string utilities, temp allocator, pool allocator, and slug/handle primitives shared across
plugins.
Rendering
- Clustered forward+ renderer with a phase-based callback system so technique plugins can inject passes.
- PBR forward shading with point lights, directional lights, and cascaded shadow maps.
- Screen-space ambient occlusion with separable blur.
- Bloom (threshold + blur + composite) and FXAA post-processing.
- Outline / silhouette rendering pass.
- Depth + normal prepass exposed to plugins for screen-space effects.
- Skeletal mesh skinning on the GPU.
- Sky rendering.
- Vegetation rendering pass.
- Vector graphics renderer for 2D shapes, curves, gradients, and textured geometry.
- High-quality vector text rendering with signed-distance / Slug-style glyph shaders.
- Immediate-mode debug draw: lines, grids, axes, shapes, frustums.
- GPU compute particle system modeled after a familiar VFX graph: emission, simulation, distortion, mesh particles,
sub-emitters.
World, scene, and gameplay systems
- Entity-Component-System core with a registered-component model and scene-aware iteration.
- Scene plugin for loading, saving, and clearing ECS worlds.
- Editor camera (orbit + fly) and an ECS CameraComponent for in-game cameras.
- Rigid-body physics: world, bodies, box/sphere/capsule/mesh colliders, raycasting, ECS components.
- Skeletal animation with animation graphs, blending, and runtime playback.
- AI utility system: response curves and Decision Score Evaluators (DSE) for behaviour selection.
- Navigation: offline navmesh bake from level geometry plus runtime path queries.
- CDLOD heightmap terrain with LOD morphing and a node-graph terrain authoring layer.
- Cellular-automata fire propagation system layered onto terrain (fuel / heat / moisture / burn).
- Stylized water with Gerstner waves, depth-based colouring, shore foam, and physics interaction hooks.
- Spatial 3D audio: one-shots, managed sounds, sound groups, and listener positioning.
- Spline system with cubic-Bezier / Catmull-Rom sampling and rasterization.
UI and tools
- Layout-engine-based retained UI with vector-graphics drawing, exposed at both a low-level and high-level API.
- 2D scene system that bridges retained ECS entities with immediate-mode UI layout (Container / Label compositions).
- Full immediate-mode dev GUI with gizmos for translation / rotation / scale manipulation.
- In-engine editor plugin (loaded the same way as a game) with scene editing, a profiler view, and live entity
inspection.
- Native file-dialog support for asset import flows.
Build / dev experience
- Single-command build for engine, plugins, examples, and editor; debug and release flavours of each.
- Per-example build configs so an individual demo can be rebuilt in isolation.
- A growing library of demos (cube, physics, audio, input, GUI, ImGui canvas, debug draw, navigation, spline, jobs,
profiler, asset loading, game template).
--- Third-party dependencies
Graphics / windowing / UI
- sokol (app, gfx, time, glue, imgui backend)
- sokol-shdc + a YAML reflection pipeline
- cimgui (Dear ImGui C bindings) and ImGuizmo
- Clay layout engine
- vg-renderer (vector graphics core, Nim port)
- Slug glyph rendering
- stb_image, stb_truetype
- tinyfiledialogs
Simulation / gameplay
- Jolt Physics (via a C wrapper)
- Recast & Detour navigation (via a C wrapper)
- ozz-animation
- flecs ECS
- HandmadeMath (hmm)
- miniaudio
Asset import / runtime
- cgltf
- ufbx
- PhysFS
Infrastructure
- cr.h (hot-reload host)
- dmon (file watching)
- mimalloc (global allocator)
- Tracy (profiler)
- c89atomic
All the code and some of the third-party dependencies I've needed to fork an modify, are available here on my codeberg instance: https://codeberg.org/hahaitsfunny
I haven't figured out licensing on the engine yet, but most likely I'll aim for MIT or some sort of do whatever the hell you want with the code license, unless there's a strong incentive not to.
Thanks for checking out my project, and I hope at the very least it's a valuable learning resource for folks interested in game engine / game development.