SpaceGod.Game
SpaceGod
This repo is SpaceGod.Unreal (renamed from
SpaceGod, US-T451). Its development tools live in the sibling repo SpaceGod.Studio.
The real Sol system in Unreal Engine 5, played co-op, written in C++. The planets, dwarf planets, moons and asteroids sit where they really are for today's date, placed from JPL orbital elements, and you and your friends fly around them together on one shared clock.
This repo was ported twice from Unity.SpaceGod, once in C++ and once in C# (UnrealSharp), and the two ports raced head to head (docs/RACE.md, US-T60/US-T69). The C++ track won on nearly every measure that mattered and was promoted to be the one SpaceGod project going forward; the C# and original-Unity copies are kept only as historical reference. Nothing here reads a sibling repo: a fresh clone builds and runs with only Unreal Engine 5.8 and Visual Studio's C++ tools.
Scope
The whole finished product (every epic, feature and story, built or not, and what is never in it) is docs/SPEC.md. The current finish line, SpaceGod 1.0's playable Fly-this loop, is docs/RELEASE.md; co-op 1.1 and the finished game 1.2 follow it.
Deploy and play
| Script | What it does |
|---|---|
run.bat
|
The Desktop shortcut's target: opens run.ps1's menu. Arguments pass through to run.ps1.
|
deploy.bat
|
Asks 1) Deploy & Run (run.ps1 -Redeploy -RunRelease) or 2) Run (run.ps1 -RunRelease; deploys first if there is none). deploy.bat --deploy only deploys.
|
run.ps1
|
The MindAttic run menu (deploy-lib Invoke-AppRun): 1) Redeploy packages DebugGame and Shipping (tools/package.ps1) into R:\MindAttic\Apps\SpaceGod.Unreal\Debug and \Release and refreshes the Desktop shortcut SpaceGod; 2) Run Debug; 3) Run Release. -Redeploy, -RunDebug, -RunRelease skip the menu; -DryRun shows the steps.
|
Every game these scripts start records: they pass -capture video hq (see Recording below).
./run.ps1 -Redeploy -RunRelease # deploy and play ./run.bat # what the Desktop shortcut runs: the 1) Redeploy / 2) Run Debug / 3) Run Release menu ./deploy.bat # the 1) Deploy & Run / 2) Run menu
Requirements
- Unreal Engine 5.8 (found via
UE_ROOT, the registry, the Epic launcher's install list, or<drive>:\Games\UE_5.8; seetools/engine.ps1). - Visual Studio 2022 with the "Game development with C++" workload (MSVC x64 tools).
- MindAttic.Media.Capture checked out next to this repo:
Cpp/SpaceGod.uprojectloads its MindAttic.Media.Capture.Unreal plugin, andtools/package.ps1publishes its capture agent into the package (the .NET 10 SDK builds it). From source,-captureuses the installed agent (%LOCALAPPDATA%\MindAttic\Capture\bin). ffmpeg on PATH to record video with-capture(not bundled).
Building and running from source
./tools/build.ps1 # the editor target (UBT, MaxParallelActions 4) ./tools/play.ps1 # a game window from the editor binaries ./tools/play.ps1 -Mode host # host on UDP 7777 ./tools/play.ps1 -Mode join -Address 192.168.1.20 # join a host ./tools/package.ps1 -Configuration Shipping # Builds/Cpp/Windows/SpaceGod.exe ./tools/bench.ps1 # the headless Bench: 5 scenarios, digests checked ./tools/play.ps1 -Mode coop-smoke -PackageDir Builds/Cpp/Windows # two packaged instances, co-op checked ..\Prose\consumer-kit\kit.ps1 push --map --prune # catalogue the universe into Prose's 'spacegod'; pull/apply bring story back (docs/PROSE.md)
Opening Cpp/SpaceGod.uproject in the editor works too; Cpp/Content/Python/init_unreal.py imports the colour maps from Cpp/SourceArt/Textures/ on first open (the results are committed under Cpp/Content/).
Co-op is on the main menu: Host Co-op starts a new game or a save that others can join (it lists this machine's addresses and the UDP port, 7777 unless -Port=), and Join Co-op takes a host's address and keeps the recent hosts per profile; a failed join comes back to that page saying why. A packaged game also hosts with -CoopHost and joins with -CoopJoin=<address>. In game, Host in the ` console turns a solo session into a hosted one, and open <ip> joins one.
The Bench
Bench/Cpp runs the simulation Core headless over Bench/scenarios.json (sol-idle, high-warp, economy-year, battle, galaxy-ftl) and writes a digest of the whole state. tools/bench.ps1 checks each against Bench/expected-digests.json, the digests Unity.SpaceGod's own C# Core produces, so the C++ Core is proven bit for bit the original. See Bench/README.md.
Co-op
One player hosts a listen server and the others join it. The server owns the simulation clock (the date, the time warp and pause), so everyone sees the planets in the same places; any player can change the time, and everyone is told who did. Each player flies their own camera and sees the others as green markers labelled with the body they are near. The scale switch, orbits and labels are your own and don't affect anyone else.
Recording (MindAttic.Media.Capture)
Off unless asked (docs/CAPTURE.md):
SpaceGod.exe -capture video # record the whole run (.mkv + .mp4 on exit) SpaceGod.exe -capture video screen 10 # and a PNG every 10 s SpaceGod.exe -demo -capture video # the scripted tour, each stop a screenshot SpaceGod.exe -capture -capture-config my.json # your own rules instead of the shipped ones
Output goes to R:\MindAttic\Media\Capture\SpaceGod\. The game raises its gameplay events (battles, arrivals, gate jumps, trades, hails, saves, co-op joins...) so the shipped rules save replays of victories, defeats and a lost ship, and screenshots of arrivals and discoveries. While capturing, Alt+F9 takes a screenshot, Alt+F10 starts or stops a recording and Alt+F11 saves the last 30 s.
How the plugin works
Recording is the MindAttic.Media.Capture.Unreal plugin (MindAtticMediaCapture), which lives in the sibling MindAttic.Media.Capture checkout (unreal/). Cpp/SpaceGod.uproject enables it and lists ../../MindAttic.Media.Capture/unreal in AdditionalPluginDirectories; SpaceGod.Build.cs depends on the MindAtticMediaCapture module. C++ can't load .NET, so the plugin starts the capture agent (capture.exe host) beside the game and drives it over stdin/stdout; the agent runs the same CaptureEngine Unity uses and exports the session when the game quits (the detached export means the game never waits on it).
- Off unless asked. Nothing starts unless
-captureis on the command line. - Where the agent is.
tools/package.ps1publishes it from the sibling checkout to<package>/Capture/capture.exe(the .NET 10 SDK builds it). An editor or uncooked run uses the installed agent (%LOCALAPPDATA%\MindAttic\Capture�in\capture.exe);MINDATTIC_CAPTURE_HOSToverrides both. The .NET 10 runtime must be installed to run it. - ffmpeg on PATH for video and replays (not bundled). Screenshots alone don't need it.
- Project settings.
Cpp/Config/DefaultGame.ini, section[/Script/MindAtticMediaCapture.MindAtticCaptureSettings](editor: Project Settings > Plugins > Media Capture):AppName(the folder underR:\MindAttic\Media\Capture, hereSpaceGod) andDefaultsFile=Content/Capture/SpaceGod.capture.json, the shipped rules.Captureis staged as non-UFS so a packaged game finds the file. - No window. Under
-RenderOffScreen(or-capture-source=frames) the plugin reads the GPU frames back and feeds them to the agent, so video, screenshots, markers and events work without a window;-capture-source=windowforces window capture.-CaptureStatslogs feed cost every 5 s.-nullrhirenders nothing and can never give images. Example:tools/play.ps1 -Mode dogfight -Offscreen -Seconds 30. - Game side.
Cpp/Source/SpaceGod/CaptureEvents.his the event catalogue the game raises through the plugin'sMindAtticCapture.h;CaptureRunnerandCaptureBackendwire it in. From Blueprints the same calls are onUMindAtticCaptureLibrary(Raise, Marker, screenshots, recording, replay, preview sets).
Comms radio
Radio messages travel at light speed from where they were sent, and the lines heard are spoken by Piper (else the Windows voice) on a background thread. docs/COMMS_RADIO.md covers the TTS limits, the propagation design and its costs, the 0.25 ms frame budget, the radio settings and the sg.Radio / stat SpaceGodRadio commands.
Light Society
The galaxy's people hold opinions on five topics, move the worlds by them and show on the galaxy map's OPINION tab: docs/LightSociety.md.
Controls
Unity.SpaceGod's own bindings, unchanged (in game, H / F1 shows them all).
Layout
Cpp/Source/SpaceGodCore/: the engine-independent simulation (pure C++20 onCs/Cs.h, no Unreal types), a file for file port of Unity.SpaceGod'sCore/.Cpp/Source/SpaceGod/: the Runtime port.UnitySpaceApp(+ one.cppper C# partial) drives the Core each frame;Camera/,Input/,UnityCompat/(Unity's value types and statics in C++),Coop/,Game/(the Unreal framework classes).Shared/Plugins/SpaceGodRender/: the original's shaders ported to Unreal, the materials built on them, and the imported Resources (textures, ship models, data).Bench/: the headless runner and its scenarios.tools/: build, package, play, bench and race scripts.Cpp/Content/Capture/: the shipped default capture rules the MindAttic.Media.Capture.Unreal plugin hands its agent.tools/unity_extract.pyandShared/Plugins/SpaceGodRender/Content/Python/spacegod_import_resources.pyare optional one-time import tools that read the original Unity project or player; their output is committed, and nothing in the build runs them.- The game needs no level: it plays on the engine's empty
/Engine/Maps/Entryand builds everything at runtime.
History
docs/MIGRATION.md (how the port was made), docs/FAITHFULNESS.md, docs/PERSISTENCE.md and docs/RACE.md (the C++ vs C# race that this repo won) are kept as the record of Unreal.SpaceGod, the pre-split project this repo was promoted from; some of them still describe the C# track, which lived in the repo's own history before the split and now lives on only in the archived candidate repos. docs/USER_STORIES.md is this repo's ticket log, carried over unbroken from Unreal.SpaceGod through the split and the promotion.
Pages in this repository
- Ambience: the sound of space (US-T448) — Under the flight sounds (US-T242), the fights (US-T241) and the score (US-T243) there is now a soundscape for space itself. It plays on…
- SpaceGod — Project Bible — SpaceGod is a co-op space game in Unreal Engine 5.8 (C++ only) where the player is an unseen god over a simulated galaxy who can drop into…
- Capture: recording SpaceGod through MindAttic.Media.Capture (US-T72) — The one spec all three copies follow: SpaceGod.Unity.CSharp (the reference, written here first), SpaceGod.Unreal.CSharp and SpaceGod. A…
- Comms radio — How SpaceGod's radio works: what speaks the lines, how a message travels at light speed to the listener, what it may cost a frame, and the…
- Controls inventory (US-T183) — One table per area: action, key, where it works, menu path. The in-game Help screen (Core/ControlsHelp.cpp) is the player-facing copy of…
- World effects: exhaust clouds and the rest (US-T447) — The owner: "needs more special effects and cloud exhaust".
- Faithfulness audit: both remakes against Unity.SpaceGod (US-T48) — The goal is a perfect replica of Unity.SpaceGod in C++ (Cpp/) and in C# (CSharp/). This audit checks every feature the original ships…
- Flight models: the standardization audit — One function flies every hull in the game: IFlightModel::Step(PilotState&, ShipCombat, HullDynamics, PilotTuning, PilotInput, gravity, dt)…
- Flight feel: targets per family (US-T734) — What flying and fighting should feel like at the stick, as numbers, for each FlightFamily; where each number stands today in code; and how…
- The frontier (US-T449) — Past the neighbourhood people know, the galaxy grows less charted, less travelled and stranger the farther it lies from Sol. Everything…
- The god view: no collision, and inside things (US-T442) — The command view's free camera (free swim, the god view) has no collision. It swims through planets, moons, stars and hulls, and from…
- SpaceGod canon: human history, 2100 to 3026 — This is SpaceGod's own universe. It is not Prose's GLMZ and shares nothing with it (US-T857). The game is set in 3026: a new game opens on…
- The HUD: drawers, docking and the HUD key — The HUD keeps a quiet screen until it is asked for more. Every one of its panels is a drawer: a window that can be pulled out from any…
- Light Society and the Populace — Light Society is a game-agnostic agent-society library (Cpp/Source/SpaceGodCore/LightSociety/, namespace MindAttic::Society). The Populace…
- Somnolith visual spec (shared: Unity.GridGame and SpaceGod) — In SpaceGod the Somnolith is a non-canon easter egg (US-T860): see docs/HISTORY.md.
- Unity.SpaceGod → Unreal.SpaceGod migration — Goal (US-T4): a perfect replica of Unity.SpaceGod in Unreal Engine 5.8, built twice — once in native C++, once in C# — both co-op, then…
- Parity with SpaceGod.Unity.CSharp (US-T70) — SpaceGod is meant to be the same game as SpaceGod.Unity.CSharp, the reference, and SpaceGod.Unreal.CSharp, so that any one of the three…
- Persistence in the C++ Core (US-T20) — Unity.SpaceGod saves the game by serialising the whole simulation (SaveData: clock, galaxy, session) with ObjectGraph, a reflection-driven…
- Possession: the show, and the possessed view (US-T446) — The owner: "the effect of SpaceGod inhabiting/possessing a person/ship/station needs to be an impressive show: an almost imperceptible…
- SpaceGod and Prose (US-T171, US-T236) — SpaceGod keeps its story in Prose, the MindAttic narrative engine, through Prose's standard conduit (RFC 0017), the same one GridGame…
- The race: C++ against C# (US-T46) — Unreal.SpaceGod is Unity.SpaceGod remade in Unreal Engine 5.8 twice (docs/MIGRATION.md):
- SpaceGod.Unreal — Release charter — SpaceGod: a co-op space game in Unreal Engine 5.8 (C++) where an unseen god over a simulated galaxy drops into any ship or craft and flies…
- research/LightSociety-design — Paper summary: docs/research/LightSociety-paper.md.
- research/LightSociety-paper — Source: arXiv 2506.12078v2 (owner copy on the Desktop; pdftotext; sections 2.1, 4.1, 4.2, 4.5, 4.7 matter most).
- research/rewind-short-track — Research and design proposal only. No code was changed for this. It builds on docs/REWIND.md (US-T99), which covers the long-horizon…
- research/UltimateSpaceshipsCreator — Date checked: 2026-11-05
- research/UltimateSpaceshipsCreator-SecondCheck — Independent second check of the open questions raised about Ultimate Spaceships Creator (USC), its Expansion and Space Stations Creator,…
- Rewind: measurements for the time-reversal budget (US-T99, phase 1) — US-T99 proposes rewinding the session to any earlier moment from deterministic keyframes plus an intervention log: keyframes are denser…
- Roles x features (US-T167) — Every system has to work with every way the player can be embodied without colliding with it. This is the matrix: what each feature does…
- Gameplay-scale proportion sheet (US-T179) — ScaleModel::ShipLength is now one linear map for all hardware (ships, stations, gates, harvesters, wrecks, debris, pods): realistic =…
- SpaceGod.Unreal — Product specification — Place in the ecosystem (docs/ECOSYSTEM.md): a product, one of the studio's games.
- Third-party art — Art packs from the owner's own asset libraries (Fab, Unity Asset Store). Their licences allow use in the game but forbid redistributing…
- True scale: audit and plan (US-T713) — The goal: a 1.8 m soldier, a 16 m fighter and a 3.2 km carrier drawn side by side at their real proportions (the fighter 1/200 of the…
- Vehicle data (US-T452) — Data/Vehicles/Vehicles.json is the one data file that describes every vehicle the game draws: which model each hull class, local-traffic…