Commit graph spaceship/BuildingField.gd
Author SHA1 Message Date
Loïc Wisniewski
fc32e26d1b Fleet carries mined ore until it delivers it to the mothership
Forgejo #14, part 1 of #12. Rock.gd credited GameState.rocks on pickup,
so ore was banked instantly from anywhere on the map and a mining run
had nothing at stake. Ore now goes into GameState.fleet_cargo and only
becomes spendable when the fleet reaches the mothership.

Delivery lives in BuildingField because that node already knows where
the buildings are and already answers "is the fleet standing on one?",
using the fleet CENTROID - the same stable single-number test Planet
and Building use, rather than per-ship collision that flickers as ships
jostle in formation.

Cargo lives in the GameState autoload so it survives Main.tscn being
torn down on every trip to a planet's surface - cargo mined ON a
surface would otherwise be dropped the moment the player took off.

test_resources_and_buildings asserted the old behaviour (gathering a
rock raises `rocks`) and now asserts the new one. That is a spec
change, not a weakened test - the gathering assertion itself is intact.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-11 15:55:45 +02:00
Loïc Wisniewski
85814ce88c Initial commit: SpaceshipTest, a top-down space RTS in Godot 4.7.1
A fleet of neon-outlined ships explores a procedurally generated, seeded
infinite world: tap/joystick steering, pinch zoom, formation pivoting,
planet landings, an ore economy with extractors and haulers, and player
built structures (mothership, ship crafter, command centre).

All art is hand-drawn with draw_* calls rather than textures, and the
backgrounds are camera-relative shaders so they stay precise at large
world coordinates.

Includes a 35-test headless suite (tests/run_tests.sh) plus screenshot
tooling that renders real frames through Xvfb and Mesa softpipe, since
--headless has no GPU.

Excluded from version control: .godot/ (import cache, and it holds
export credentials), builds/, android/build/ and packaged APKs - all
regenerable, and ~325 MB combined.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 18:41:58 +02:00