spaceship/audio
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Claude 885f977768 #229, #234: one voice per volley, and gas within reach of the spawn
#229 - a volley got louder for every ship in it.

Every hull owns its gun and asks for its own shot sound, so eight ships
firing on the same cooldown started eight voices playing the SAME sample in
the same frame. Those amplitudes add, so a full fleet was the loudest thing
in the game by a wide margin.

play() now takes a per-sound coalescing window. A volley is one event to the
ear, so it gets one voice. 70ms, which the test checks is inside the fastest
gun's 500ms cooldown - it collapses "six guns at once", never "six shots in
a row". PICKUP and ASTEROID_BREAK get one too: ore arrives in bursts when a
rock breaks and that is one pickup to the ear. Deaths and the boss scream
are left alone deliberately - several things dying together IS several
events.

test_sfx's pool-saturation case was driven by shots, which can no longer
saturate anything by design. It is driven by deaths now, which is what the
pool actually has to absorb, and it gained a case asserting a volley takes
one voice - measured against the real pool rather than the gate.

#234 - gas was not reliably in reach of the opening.

Gas giants are gated behind two independent noise fields, the SPACE biome
AND the planet roll, so whether any sat near the spawn was luck. Measured,
this seed lost: ZERO gas planets within four chunks, the nearest five away
past five rocky ones. Gas is an early need - the burner, ammunition - so the
opening cannot depend on the noise being kind.

SPAWN_GAS_GIANT_CHUNK at (2, -2), authored like OCTOPUS_BIOME_CENTER rather
than found by searching outward: a fixed chunk is reproducible from anywhere
without walking the map, which is what the rest of WorldGen is built on.

The override is applied AFTER every rng draw, for the same reason the dev
planting is - forcing one chunk must not shift what any other chunk rolls.
Confirmed by probe: the five other planets within four chunks are identical
before and after, and the distant gas giants at (-5,-4) and (0,-5) are still
where they were.

Both verified in reverse: without the window, "8 ships firing together
started 8 shot sounds"; without the chunk, "no gas planet within 4 chunks of
the spawn".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
2026-09-15 23:44:15 -04:00
..
masters #148: keep the theme's master in the repository 2026-08-29 13:54:37 +02:00
make_sfx.py Sharpen upgrades, mark the convoy's destination, and give the world sound 2026-09-05 12:16:17 +02:00
Music.gd #148: the main theme plays, and keeps playing 2026-08-29 13:05:21 +02:00
Music.gd.uid #148: the main theme plays, and keeps playing 2026-08-29 13:05:21 +02:00
Sfx.gd #229, #234: one voice per volley, and gas within reach of the spawn 2026-09-15 23:44:15 -04:00
Sfx.gd.uid #146: shots, deaths and collapses are heard 2026-08-29 13:05:47 +02:00
sfx_asteroid_break.wav Sharpen upgrades, mark the convoy's destination, and give the world sound 2026-09-05 12:16:17 +02:00
sfx_asteroid_break.wav.import Track the import metadata for the new sounds 2026-09-07 12:33:14 +02:00
sfx_black_hole.wav Sharpen upgrades, mark the convoy's destination, and give the world sound 2026-09-05 12:16:17 +02:00
sfx_black_hole.wav.import Track the import metadata for the new sounds 2026-09-07 12:33:14 +02:00
sfx_boss_scream.wav Expand and stage boss encounter 2026-09-03 22:00:26 +02:00
sfx_boss_scream.wav.import Expand and stage boss encounter 2026-09-03 22:00:26 +02:00
sfx_building_death.wav #150, #151: the sounds were a toy and a puff, and both were fair 2026-08-29 14:39:33 +02:00
sfx_building_death.wav.import #146: shots, deaths and collapses are heard 2026-08-29 13:05:47 +02:00
sfx_dialog.wav Restore landing fade and missing event sounds 2026-08-31 18:15:37 +02:00
sfx_dialog.wav.import Restore landing fade and missing event sounds 2026-08-31 18:15:37 +02:00
sfx_gas_blast.wav Sharpen upgrades, mark the convoy's destination, and give the world sound 2026-09-05 12:16:17 +02:00
sfx_gas_blast.wav.import Track the import metadata for the new sounds 2026-09-07 12:33:14 +02:00
sfx_pickup.wav Sharpen upgrades, mark the convoy's destination, and give the world sound 2026-09-05 12:16:17 +02:00
sfx_pickup.wav.import Track the import metadata for the new sounds 2026-09-07 12:33:14 +02:00
sfx_ship_death.wav #150, #151: the sounds were a toy and a puff, and both were fair 2026-08-29 14:39:33 +02:00
sfx_ship_death.wav.import #146: shots, deaths and collapses are heard 2026-08-29 13:05:47 +02:00
sfx_shot.wav #150, #151: the sounds were a toy and a puff, and both were fair 2026-08-29 14:39:33 +02:00
sfx_shot.wav.import #146: shots, deaths and collapses are heard 2026-08-29 13:05:47 +02:00
space_4.mp3 #148: the main theme plays, and keeps playing 2026-08-29 13:05:21 +02:00
space_4.mp3.import #148: the main theme plays, and keeps playing 2026-08-29 13:05:21 +02:00