Nightshade is a data-oriented game engine written in rust π¦
The fastest way to get started is with the nightshade-template.
It is also possible to host a webview with bidirectional IPC, demonstrated in nightshade-webview.
For a collection of example projects showcasing Nightshade's features, see the nightshade-examples repository.
Nightshade uses a modular feature system for fine-grained dependency control.
nightshade features:
βββ core βββββββββββββββ Minimal: windowing, math, ECS, time
βββ text βββββββββββββββ 3D text rendering (fontdue)
βββ behaviors βββββββββββBuilt-in entity behaviors (stateless, WASM-compatible)
βββ assets βββββββββββββ Asset loading (gltf, image, half, bincode)
βββ runtime ββββββββββββ core + text + behaviors (minimal runnable app)
βββ engine (default) βββ runtime + assets + scene_graph + picking + more
βββ full βββββββββββββββ Everything including audio, physics, navmesh, scripting
| Configuration | Size | Delta |
|---|---|---|
| runtime+wgpu (baseline) | 9.71 MB | - |
| +egui | 15.82 MB | +6.11 MB |
| +physics (rapier3d) | 10.95 MB | +1.24 MB |
| +assets | 10.28 MB | +0.57 MB |
| +gamepad | 10.21 MB | +0.50 MB |
| +terrain | 10.21 MB | +0.50 MB |
| +audio (kira) | 10.11 MB | +0.40 MB |
| +navmesh | 9.71 MB | +0.00 MB |
| engine (default) | 10.79 MB | +1.08 MB |
| full | 22.63 MB | +12.92 MB |
For a lightweight egui app without asset loading:
nightshade = { default-features = false, features = ["runtime", "wgpu", "egui"] }# native
just run
# wasm (webgpu)
just run-wasm
# serve site
cd site && just serveAll chromium-based browsers like Brave, Vivaldi, Chrome, etc support WebGPU. Firefox also supports WebGPU now starting with version
141. Runjustwith no arguments to list all commands
- just
- trunk (for web builds)
- git-cliff (for changelog generation)
- gh (GitHub CLI, for creating releases)
Build and run natively using cargo:
just run [project] # defaults to nightshade-editor
just build # release buildBuild for web browsers with WebGPU support:
just run-wasm [project] # defaults to editor
just build-wasm [project]See STEAM_DECK.md for deployment instructions.
See STEAM.md for Steam integration (achievements, stats, friends).
See PROFILING.md for detailed profiling and logging documentation.
See PLUGINS.md for runtime WASI plugin support.
See SCRIPTING.md for Rhai scripting support.
The mcp feature exposes an MCP (Model Context Protocol) server for AI-assisted scene manipulation. When enabled, the engine automatically starts an MCP server on http://127.0.0.1:3333/mcp.
nightshade = { features = ["mcp"] }Connect Claude Code:
claude mcp add --transport http nightshade http://127.0.0.1:3333/mcpAvailable tools: list_entities, query_entity, spawn_entity, despawn_entity, set_position, set_rotation, set_scale, set_material_color, set_behavior, add_behavior, remove_behavior, get_behavior, load_asset, spawn_prefab, list_loaded_assets, clear_scene, batch
Asset loading: Use load_asset to load .glb, .gltf, or .fbx files, then spawn_prefab to instantiate them.
Batch operations: Use batch to execute multiple operations atomically in a single frame, reducing round-trip latency. Supports: spawn_entity, despawn_entity, set_position, set_rotation, set_scale, set_material_color, add_behavior, remove_behavior, set_behavior, get_behavior, query_entity, list_entities, clear_scene.
The editor enables MCP by default for AI-assisted development workflows.
Nightshade is currently in its early stages of development. The project is not accepting external contributions at this time as the architecture and core systems are still being established. Once the engine reaches a more mature and stable state, I will open up contributions and provide contributor guidelines.
Nightshade is free, open source and permissively licensed! All code in this repository is dual-licensed under either:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in nightshade by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
