Repository navigation
Early Release Candidate 3
Core simulation (nebula4x_core)
Star systems, orbital bodies, ships, colonies, minerals, installations
Fleets: persistent ship groups (same-faction) for bulk order issuing (no formation logic yet)
Cargo holds on ships + mineral transfer orders (prototype logistics)
Day-based turn advancement
Colony population growth/decline (simple, configurable)
Shipyard repairs: docked ships repair HP at friendly colonies with shipyards (configurable)
Shipyard construction (optionally) consumes minerals per ton built (see data/blueprints/starting_blueprints.json)
Colony construction queue: build installations using construction points + mineral build costs (also configured in JSON)
Orders:
move-to-point / move-to-body
orbit body (station keep)
travel via jump point (multi-system travel)
attack ship (simple targeting)
wait days (simple scheduling)
load/unload minerals (prototype cargo logistics)
ship-to-ship cargo transfer
scrap ship (decommission at a colony; refunds some minerals)
repeat orders (optional looping of a ship's queue for trade routes/patrols)
Jump points + multi-system state
Sensors + intel: in-system detection + last-known contact snapshots (saved)
Exploration: factions track discovered star systems; entering a new system reveals it
Research system:
tech definitions (JSON)
research points generation (via research_lab installations)
active research + queue
effects (unlock component / unlock installation)
Basic combat prototype:
armed ships auto-fire once/day at hostiles within weapon range
damage + ship destruction
JSON save/load (versioned)
Persistent event log (saved): build/research/jump/combat notifications
Desktop UI (nebula4x) — SDL2 + Dear ImGui
Galaxy map (multi-system view)
Right click a system in the galaxy map to auto-route the selected ship via jump points (Shift queues)
System map (pan/zoom)
Ship list + selection (shows HP, faction)
Fog-of-war toggle (hides undetected hostiles and undiscovered systems)
Contacts tab: recently seen hostiles + quick actions
Log tab: view/filter/clear the saved event log; copy visible entries; export CSV/JSON
Jump point markers on the system map
Ship tab: quick orders (move, jump travel, attack) + cargo load/unload
toggle repeat orders for simple looping routes
Colony tab: manage shipyard queue + build installations via construction queue
Research tab: choose projects, queue, see progress
Design tab: build custom ship designs from unlocked components
CLI (nebula4x_cli)
Headless simulation runs
Optional save/load
Start a new game from either the built-in Sol scenario or a seeded random scenario
Content validation helper (--validate-content) for blueprint/tech modding
Save canonicalizer (--format-save) to re-serialize JSON with stable ordering
Event log dump (--dump-events) to print saved simulation events
Event log export to CSV (--export-events-csv PATH) for spreadsheets/analysis (PATH can be - for stdout)
Event log export to JSON (--export-events-json PATH) for tooling/analysis (PATH can be - for stdout)
Event log export to JSONL/NDJSON (--export-events-jsonl PATH) for streaming tools (PATH can be - for stdout)
Event log filters: --events-last, --events-category, --events-level, --events-faction, --events-system, --events-ship, --events-colony, --events-contains, --events-since, --events-until
Event log summary: --events-summary (counts by level/category) for the filtered set
Event log summary export: --events-summary-json PATH (PATH can be - for stdout)
State export to JSON:
--export-ships-json PATH
--export-colonies-json PATH
--export-fleets-json PATH (PATH can be - for stdout)
Time warp: --until-event N to advance day-by-day until a new matching event occurs (defaults to warn/error; configurable via --events-*)
--quiet to suppress non-essential summary/status output (useful for scripting)
Script helpers: --list-factions, --list-systems, --list-bodies, --list-jumps, --list-ships, --list-colonies (print ids/names, then exit)
Tests
Tiny built-in runner for deterministic core logic
Build
Prereqs
CMake 3.21+
A C++20 compiler (MSVC 2022, clang 15+, gcc 12+)
Optional UI dependencies:
SDL2 (tries find_package(SDL2) first; falls back to FetchContent)
Dear ImGui (fetched via CMake for the UI target)
The core uses small in-repo utilities for JSON (save/load + content files) and logging.