Skip to main content

Crate dotzuki_runner

Crate dotzuki_runner 

Source
Expand description

Generic runtime for zero-Rust game projects.

A game project is a directory with a .dotzuki-editor.json manifest, a dataRoot holding maps/<MapId>/ directories (Tiled map.tmx.json + tileset.png + objects.json sidecar + per-map script.scene), and a scenes directory with story .scene files. See docs/reference/project-manifest.md for the full contract.

This crate boots such a project without any game-specific Rust:

  • manifest — serde model of .dotzuki-editor.json;
  • projectproject::LoadedProject: manifest → DSL compile → script registry + storyline routes + entry scene/map resolution;
  • mapmap::RuntimeMap: TMX layers, collision grid, objects sidecar (NPCs/warps/signs);
  • tilesettileset::PngTileset: a tileset.png atlas sliced into per-tile RGBA pixels, addressable by 1-based Tiled GID;
  • gamegame::RunnerGame: the playable runtime (overworld + scene VM + dialogue/choice UI), implementing dotzuki_app::GameLoop for window mode and exposing windowless update/draw for headless use;
  • headlessheadless::run_headless: a windowless frame driver with auto-A input and PNG screenshots (native only);
  • watchwatch::ProjectWatcher: notify-based file watching for dotzuki run --watch hot reload (feature watch);
  • vfsvfs::ProjectFiles: the virtual file system every project read goes through (vfs::DiskFiles native, vfs::MemoryFiles for the WASM shell);
  • audioaudio::RunnerAudio: optional music/SFX playback for scene audio commands (dotzuki-audio APU + cpal; silent when a project has no data/audio/ tracks or no output device is available);
  • battle — the generic, data-driven battle system (manifest battle section → record-driven combatants, party switching, battle-usable items, the standard damage formula, a menu/narration turn loop, startBattle scene integration);
  • savesave::GameSave: versioned JSON save/load at <project>/.dotzuki-save.json, written at stable overworld points.

Re-exports§

pub use audio::RunnerAudio;
pub use battle::hooks::validate_ruleset;
pub use battle::Battle;
pub use battle::BattleOutcome;
pub use game::RunnerGame;
pub use game::RunnerOptions;
pub use game::SCREEN_H;
pub use game::SCREEN_W;
pub use headless::run_headless;
pub use headless::HeadlessOptions;
pub use map::EncounterConfig;
pub use map::EncounterTableEntry;
pub use map::EncounterZone;
pub use map::MapObjects;
pub use map::NpcDef;
pub use map::RuntimeMap;
pub use map::SignDef;
pub use map::WarpDef;
pub use project::LoadedProject;
pub use save::GameSave;
pub use save::PlayerSave;
pub use save::DEFAULT_SAVE_FILE;
pub use save::SAVE_VERSION;
pub use tileset::PngTileset;
pub use vfs::DiskFiles;
pub use vfs::MemoryFiles;
pub use vfs::ProjectFiles;
pub use watch::ProjectWatcher;

Modules§

audio
Audio playback for dotzuki run: RunnerAudio.
battle
The generic, data-driven battle system for dotzuki run (parties + items).
game
The dotzuki run game runtime: RunnerGame.
headless
Headless driver for RunnerGame — run frames without a window.
manifest
Serde model of .dotzuki-editor.json, the single manifest of a zero-Rust game project. See docs/reference/project-manifest.md for the full contract.
map
Runtime map loading for zero-Rust game projects.
project
Zero-Rust game project loading: manifest → DSL compile → script registry.
save
Save/load for dotzuki run: GameSave, a versioned JSON snapshot.
tileset
tileset.png atlas slicing for zero-Rust game maps.
vfs
Virtual file system for project content: ProjectFiles.
watch
File watching for dotzuki run --watch: ProjectWatcher.