Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Project tour

Start here. New to the codebase? Read this book in this order:

  1. Project tour – this page: the crate map and where to change X.
  2. Architecture – the full crate graph, app assembly, state machines and frame flow.
  3. Building & running – toolchain, cargo commands, examples, the web build, and how to contribute a change.
  4. Then pick the guide for your change: Add a ship section or Extend the scenario engine.

This page only orients you: the crate map and where to change X. For exact symbols per concept, use the Concept index.

Nova Protocol is a 3D space game built on Bevy 0.19 with avian3d physics. You build ships out of modular sections (hull, controller, thruster, turret, torpedo bay), fly them with real Newtonian thrust and a diegetic GOTO/ORBIT/ STOP autopilot, work inverse-square gravity wells, and fight with deliberate angular radar lock-on. On top of the game sits an event-driven scenario/modding engine (RON data) and a web site + WASM build. It is a Cargo workspace: the root nova-protocol crate is a thin shell; all the real code lives under crates/.

Crate map at a glance

Slugs are the workspace members. One line each – see Architecture for responsibilities and the dependency graph.

CrateOwns
nova-protocol (root)src/main.rs clap CLI + entrypoint; src/lib.rs re-exports nova_core.
nova_coreWiring only: AppBuilder assembles the whole plugin stack. No gameplay.
nova_gameplayThe shared gameplay layer under the ship: integrity, damage, gravity, the SFX engine, juice, objectives, mesh/transform rigs, entity markers. Owns GameStates/PauseStates/GameMode.
nova_shipThe ship and how it is flown: sections, input (player/ai/radar), flight and its autopilot verbs, the camera rigs, the PD controller, the ship’s soundtrack.
nova_hudThe flight HUD: one module per widget (crosshairs, target inset, ammo readout, objective markers, comms panel, keybind dock). Reads the ship, never drives it.
nova_osNOVA OS logic: the terminal model, shell grammar and app runtime. No bevy UI.
nova_os_uiThe NOVA OS cockpit monitor the player opens with Tab: CRT terminal UI, forwarded pointer, and the map/ship apps. A peer of the HUD, added by nova_core.
nova_scenarioScenario engine: events, filters, actions, variables, world, loader, objects.
nova_eventsShared game-event kinds + entity identity components (gameplay <-> scenario).
nova_assetsbevy_asset_loader setup; loads glb/textures/shaders/sounds; owns the mod merge + prefs.
nova_moddingBundle/content/catalog asset loaders and the Content routing enum.
nova_mod_formatPure serde types for the mod formats (engine-free); re-exported by nova_modding. The static mod portal is built by scripts/gen-portal.py.
nova_editorThe ship editor scene (NovaEditorPlugin), shown in GameMode::Sandbox.
nova_menuMain menu + the ESC pause overlay; hands off to Playing.
nova_inputThe bindings registry: the one table of named actions and the sources each holds, the shared rebind capture, and the by-name dispatch. A leaf under every rig and every rebind surface.
nova_uiShared theme, skin, themed widgets, screen composition, unit formatting. A leaf: every UI-drawing crate (nova_gameplay, nova_hud, nova_os_ui, nova_menu, nova_editor, nova_assets) draws from it.
nova_debugDebug-only plugin (inspector, overlays); compiled under the debug feature.
nova_infoExposes APP_VERSION, injected by build.rs.
nova_autopilotScripted automation drivers + the run-completion protocol. Bevy-only, game-agnostic.
nova_probeDev tool (not in the shipped game): the in-game half of the run-harness - the capability plugins an example wires (frame time, timeline, invariants, world snapshot, scene census, frame cost).
nova_probe_cliDev tool: the host half - spawns runs, grades artifacts, renders reports; the probe run/report CLI.
nova_perf_webDev tool: the wasm app probe run --platform web boots and measures.
nova_authoringOffline content pipeline: the Rust builders for built-in scenarios/sections, content -- gen (writes assets/base/**/*.content.ron), content -- lint.
nova_meta_genBinary under tools/ (web-build tooling, not a game crate): writes default .meta sidecars for web assets (Trunk post_build hook).

Want to change X? Start here

The highest-value table. Verified paths; follow the linked page for depth.

I want to change…Start inRead
A ship section behaviorcrates/nova_ship/src/sections/Ship sections, Add a ship section
Damage types / how a round travelscrates/nova_gameplay/src/damage.rsShip sections
Integrity (disable/destroy)crates/nova_gameplay/src/integrity/Ship sections
How a body wears its damagecrates/nova_ship/src/sections/damage_*.rs + crates/nova_gameplay/src/integrity/{erosion,carve}.rsShip sections
How an asteroid carves, and what it costscrates/nova_scenario/src/objects/asteroid_carve.rsScenario engine
Flight / autopilot verbscrates/nova_ship/src/flight/
Player input / AIcrates/nova_ship/src/input/{player,ai}/
Radar targeting / lock-oncrates/nova_ship/src/input/targeting/
Gravity wellscrates/nova_gameplay/src/gravity.rs
The HUD (widgets)crates/nova_hud/src/
The NOVA OS monitor / its appscrates/nova_os_ui/src/
A scenario event/filter/actioncrates/nova_scenario/src/{events.rs,filters.rs,actions/}Scenario engine, Extend the scenario engine
Scenario objects / loadingcrates/nova_scenario/src/{objects/,loader/}Scenario engine
Mod loading / mergecrates/nova_assets/ + crates/nova_modding/Mod files, Publish a mod
A built-in scenario or sectioncrates/nova_authoring/src/ (builders), then content -- genCreate your first scenario
The ship editorcrates/nova_editor/
Shared UI theme / widgetscrates/nova_ui/
The web site / wikiweb/Building & running

The boot path in one glance

AppBuilder (in crates/nova_core/src/lib.rs) is the single place the app is wired – DefaultPlugins + window/log/asset/render setup, then the plugin stack (assets, gameplay, ship, scenario, HUD + NOVA OS monitor, editor, menu, debug). The state machines:

  • GameStates { Loading, MainMenu, Playing } – top-level lifecycle.
  • PauseStates { Unpaused, Paused } – the ESC overlay, nested in Playing.
  • GameAssetsStates { Loading, Processing, Loaded } – the asset pipeline that gates entry; on OnEnter(Loaded) the app hands off to MainMenu/Playing.

Gameplay systems run an explicit chain configured identically in Update and FixedUpdate; avian3d physics runs on a fixed timestep in FixedPostUpdate. The plugin order, exact sets, frame flow, and the Update-vs-FixedUpdate rule live in Architecture – start there once the shape clicks.

flowchart LR
    player["Player / AI input"] --> game["Game crates<br/>(nova_ship + nova_gameplay + nova_core)"]
    game --> scenario["nova_scenario<br/>(events / filters / actions)"]
    data["Data (RON)<br/>scenarios + mods"] --> assets["nova_assets + nova_modding"]
    assets --> game
    scenario --> game
    game --> screen["Rendered frame + HUD"]