Commit graph spaceship/Asteroid.gd
Author SHA1 Message Date
Loïc Wisniewski
4cc9c417ca Asteroids can be shot apart for the ore inside them
Asteroids were pure hazard: the only thing one could ever do was cost you a
ship. They now take damage like anything else and break open, dropping ore the
fleet can fly over and collect - the one resource reachable in open space
without conquering anything, and something for the new fire stick to do out
there.

Two ways to destroy one, deliberately not equivalent. Shot apart yields the
ore; flown into does not - the rock shatters against a hull rather than being
mined, and a ship or a shield charge has just been spent on it. Without that
split a shield vessel could farm asteroids by ramming them.

Asteroid.take_damage() matches Enemy's contract exactly, so every weapon that
already knew how to hurt an enemy hurts an asteroid through the same branch
rather than a second special case: bolts, the laser sweep, and the gas bomb's
blast all pick both groups up together.

Dropped ore carries the asteroid's own drift, so it reads as debris rather
than as a spawned pickup, and it expires after a minute. Rock grew an optional
lifetime for that, defaulting to 0 (never) so hand-placed surface rocks are
unchanged - a planet surface is bounded and authored, open space is not, and a
field shot up and abandoned would otherwise leak nodes for the session. Rock's
header note that asteroids and rocks are never on screen together is no longer
true and now says so; the hexagon-versus-lump shape language matters more now
that they sit side by side, not less.

Five weapon tests silenced the asteroid field but never cleared what it had
already placed. That was harmless while asteroids were untouchable and is not
any more - two of them assert exact hit counts, and a drifting rock in the
beam would have made those fail intermittently.

Suite 111/111.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 10:27:40 +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