No description
  • GDScript 96.3%
  • GDShader 2%
  • Shell 0.8%
  • Python 0.6%
  • HTML 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Claude fb3587173d #225: save the run, and offer to resume it
JSON at user://savegame.json rather than a binary resource: a save that can
be opened in a text editor is diagnosable from a bug report, and
ResourceSaver would tie the file's shape to GDScript class layout, which is
the thing that keeps changing.

The run is not plain data, which is the actual work here. A tagged codec
carries Vector2, Vector2i, PackedStringArray and the Inventory objects
nested inside `buildings`. explored_chunks is keyed by Vector2i and JSON has
no such key, so every key carries its own type prefix ("v2i:3,-4") - without
that a planet id could come back as a chunk coordinate.

WHAT is saved is an explicit list of 30 fields, not a dump of GameState's
58 vars. A dump would carry transient junk - which pointer last touched the
screen, whether a dialog holds the camera - and would break silently on
every rename. The cost is that new progression must be added to the list;
the benefit is that forgetting is a missing feature, not a corrupt save.

Versioning, as the ticket asked. MIGRATIONS walks a save up one version at a
time; MIN_SUPPORTED_VERSION is how a break too messy to migrate gets
DECLARED rather than bodged. A save that cannot be walked forward is refused
with a player-readable reason, because a save that loads subtly WRONG is
worse than one that refuses and says so. Adding a field needs no bump: it
arrives missing from old saves and keeps its new-game value (case F).

The menu offers Continue only when there is something to offer. A save this
build CANNOT open is still shown, disabled, with the reason underneath -
silently hiding someone's run reads as lost rather than incompatible.

Autosave every 30s, plus on close and on Android's app-pause, since the
phone kills backgrounded apps with no warning. Skipped during the prologue.

That autosave writes to the same user:// path every test that loads
Main.tscn shares, so it could make Continue appear and shift the menu stack
under test_main_menu depending on what ran first. That test clears the save
before building the menu.

Verified by breaking it: neutering the key decoder fails with "chunk keys
came back as [v2i:-11,0, v2i:3,-4]".

Still absent, deliberately: no save-on-demand button, and no route back to
the menu from in-game, so a resume currently needs a relaunch.

175/175.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
2026-09-09 21:32:23 +02:00
android Initial commit: SpaceshipTest, a top-down space RTS in Godot 4.7.1 2026-08-10 18:41:58 +02:00
audio #224: refuse to build a structure on top of another 2026-09-09 12:57:28 +02:00
boss Take planets by killing what defends them 2026-09-05 13:31:25 +02:00
buildings Keep the export probe, and the uid files beside the new scripts 2026-09-07 16:40:45 +02:00
controllers #225: save the run, and offer to resume it 2026-09-09 21:32:23 +02:00
core #225: save the run, and offer to resume it 2026-09-09 21:32:23 +02:00
enemies Tune and optimize boss encounter 2026-09-03 11:49:51 +02:00
fonts Skill tree, node-based building animation, bigger UI, and a 19x faster test suite 2026-08-11 15:00:41 +02:00
logistics Research the Fleet Office, and give it one hull 2026-09-05 21:57:53 +02:00
planets Build the accretion disc once per spawn, not twice 2026-09-08 22:35:41 +02:00
PlanetSetups Take planets by killing what defends them 2026-09-05 13:31:25 +02:00
resources #84: move 215 root files into a folder hierarchy 2026-08-21 19:44:14 +02:00
shaders Tune and optimize boss encounter 2026-09-03 11:49:51 +02:00
shots Remove the one-way ore API superseded by the transfer menu 2026-08-12 13:07:52 +02:00
surface Find the planet setups in an exported build 2026-09-07 13:55:41 +02:00
tests #225: save the run, and offer to resume it 2026-09-09 21:32:23 +02:00
ui #225: save the run, and offer to resume it 2026-09-09 21:32:23 +02:00
vessels Research the Fleet Office, and give it one hull 2026-09-05 21:57:53 +02:00
vfx Stop redrawing what only needs moving 2026-09-08 11:35:45 +02:00
world Teach where research data comes from, and say so when it runs out 2026-09-06 16:24:09 +02:00
.gitignore Add a WSL path to the test runner 2026-08-22 14:40:44 +02:00
export_presets.cfg Fix the web build: a wasm trap on integer % 0, and buttons that never fired 2026-08-19 01:08:09 +02:00
icon.svg Initial commit: SpaceshipTest, a top-down space RTS in Godot 4.7.1 2026-08-10 18:41:58 +02:00
icon.svg.import Initial commit: SpaceshipTest, a top-down space RTS in Godot 4.7.1 2026-08-10 18:41:58 +02:00
project.godot Smooth boosted fleet travel 2026-09-04 20:01:56 +02:00
ui_theme.tres Skill tree, node-based building animation, bigger UI, and a 19x faster test suite 2026-08-11 15:00:41 +02:00
web_shell.html Fix the web build: a wasm trap on integer % 0, and buttons that never fired 2026-08-19 01:08:09 +02:00