Nebula Dreamcast Engine is an open-source 3D game engine purpose-built for the Sega Dreamcast. Build your scenes in the project editor, write your gameplay scripts in plain C, and package directly to CDI disc images that boot on real hardware.
- Dreamcast-first runtime path with rapid package/rebuild loops
- Editor-driven content workflow (scenes, meshes, textures, materials)
- Deterministic asset staging names for reliable disc lookup
- Runtime safety fallbacks to avoid hard crashes on missing texture refs
Active development / prototyping, with a working Dreamcast package flow and hardware-focused iteration.
- Visual Studio 2022 + Native Tools x64
- Required for MSVC/
cl.exebuild flows. - Install "Desktop development with C++" workload.
- Required for MSVC/
- CMake + CMake GUI
- Used to configure/generate Visual Studio solution files.
- Git
- Source sync and branch workflows.
- DreamSDK (KallistiOS toolchain)
- Provides Dreamcast compile/link/package tools (e.g.
sh-elf-gcc,kos-cc,mkisofs, CDI tooling). - Required for building
nebula_dreamcast.elfand packaging CDI output. - WARNING: DreamSDK must be fully installed with KOS toolchain, or the Dreamcast CDI build will fail.
- Provides Dreamcast compile/link/package tools (e.g.
where cl
cmake --version
where sh-elf-gcc
where kos-cc- Runtime staged data is packaged under:
build_dreamcast/cd_root/data/materialsbuild_dreamcast/cd_root/data/meshesbuild_dreamcast/cd_root/data/scenesbuild_dreamcast/cd_root/data/texturesbuild_dreamcast/cd_root/data/animationsbuild_dreamcast/cd_root/data/vmu
- Scene/mesh/texture/animation staging uses short deterministic names:
- Scenes:
Sxxxxx.* - Meshes:
Mxxxxx.* - Textures:
Txxxxx.* - Animations:
Axxxxx.*
- Scenes:
- Missing scene texture refs can fall back safely at runtime.
- Missing/unloadable textures use fallback white texture instead of hard exit.
- Material refs are staged to
data/materialsfor packaging parity.
src/- engine source (directory guide)camera/- camera math and viewport utilitieseditor/- editor application, shared state, preferencesio/- file format loaders and exportersmath/- math primitives and utility functionsnavmesh/- navigation mesh buildingnodes/- scene node type definitionsplatform/dreamcast/- Dreamcast codegen and KOS bindingsruntime/- play-mode physics, collision, script bridgescene/- scene serialization and managementui/- ImGui editor panelsviewport/- 3D viewport rendering and gizmosvmu/- VMU icon tool
assets/- project assetsthirdparty/- vendored dependencies (GLFW, ImGui, Recast/Detour)build_dreamcast/- generated Dreamcast runtime/package output (project-local)docs/- engine documentation
See docs/README.md for the full documentation index and learning path.
- Quickstart Tutorial — build, create a project, write a script, run on Dreamcast
- Source Directory Structure — module layout and dependency flow
- Scripting — C gameplay scripts and NB_RT_* API reference
- Dreamcast Binding API v2 — all
NB_RT_*,NB_DC_*,NB_KOS_*runtime APIs - Dreamcast Export — codegen, packaging, disc layout
- Dreamcast Header Reference — platform header files and types
- Script Formatting & Syntax — how to write C gameplay scripts
- Multi-Script Runtime — running multiple gameplay scripts simultaneously
- Editor Play Mode — compilation, DLL caching, progress bar, hot reload, scene switching
- Asset Pipeline — texture, material, mesh, and animation formats and export
- Dependencies & Paths — toolchain setup and path requirements
- .nebproj - project file
- .nebscene - scene file
- .nebmesh - mesh format
- .nebtex - texture format
- .nebmat - material reference file
- .nebslots - StaticMesh material-slot manifest
- .nebanim - vertex animation clip format
- Visual Studio 2022 (Desktop development with C++)
- CMake (and CMake GUI)
- Git
- Open CMake GUI.
- Set:
- Where is the source code:
<repo>/(this folder) - Where to build the binaries:
<repo>/build
- Where is the source code:
- Click Configure.
- Choose generator:
Visual Studio 17 2022- Platform:
x64
- Let configure finish (fix any missing dependency prompts if shown).
- Click Generate.
- Click Open Project (opens the generated
.slnin Visual Studio).
- Set NebulaEditor as the startup project (Solution Explorer → right-click
NebulaEditor→ Set as Startup Project). - Set configuration to Debug or Release.
- Set platform to x64.
- Build:
- Build → Build Solution (
Ctrl+Shift+B)
- Build → Build Solution (
- Run from Visual Studio (or run built exe from
build/...).
cmake -S . -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config ReleaseGeneral flow:
- Open project in editor
- Export/package Dreamcast build
- Run
_nebula_build_dreamcast.batinbuild_dreamcast - Test
nebula_dreamcast.cdi(emulator/hardware) - Iterate
Quick analysis of what _nebula_build_dreamcast.bat runs:
- Cleans prior ELF output (
rm -f nebula_dreamcast.elf) - Compiles C sources to objects (
main.c, bindings/input files, and script.cfiles) - Links objects into
nebula_dreamcast.elfwithkos-cc - Builds disc image data (
mkisofs) - Generates final CDI image for emulator/hardware testing (
cdi4dc)
Exact environment/toolchain setup may vary by local DreamSDK/KOS install.
If default toolchain detection fails on your machine, set custom paths in:
File -> Preferences
Fields:
- DreamSDK
- Path to your DreamSDK root (example:
C:\DreamSDK) - Used by Dreamcast build packaging scripts when generating/running
_nebula_build_dreamcast.bat
- Path to your DreamSDK root (example:
- MSVC
- Path to either:
- a Visual Studio root folder (example:
C:\Program Files\Microsoft Visual Studio), or - a direct vcvars batch file path (
vcvarsall.bat/vcvars64.bat)
- a Visual Studio root folder (example:
- Used by script runtime compile fallback when
cl.exeis not already in PATH
- Path to either:
Nebula validates these paths in Preferences and shows status (OK/missing). Save preferences to persist them in editor_prefs.ini.
- Keep editor/runtime parity tight
- Harden scene/material-slot serialization consistency
- Continue exporter/import cleanup for geometry stability
- Preserve pragmatic runtime behavior over feature bloat
New to the engine? See the Learning Path for a recommended reading order.
TODO: add license
