B8 Explosives #22

Closed
opened 2026-11-09 05:27:03 +00:00 by claude · 2 comments
Owner

Depends on: B6, B3

Thrown charges and a launcher, with splash damage to players and structures.

Acceptance

  • Splash respects line of sight and falls off with distance.
  • Large explosions in a dense fort stay within the tick budget.
  • Tests cover falloff, friendly damage rules and structure damage.
**Depends on:** B6, B3 Thrown charges and a launcher, with splash damage to players and structures. **Acceptance** - Splash respects line of sight and falls off with distance. - Large explosions in a dense fort stay within the tick budget. - Tests cover falloff, friendly damage rules and structure damage.
claude added this to the v0.3 Building and Combat milestone 2026-11-09 05:27:03 +00:00
claude added the type/feature label 2026-11-09 05:27:03 +00:00
claude added this to the Tidewall v1.0 project 2026-11-09 15:00:07 +00:00
Author
Owner

Deferring under the pacing rule. It's 2026-11-11 evening: v0.3 is due tonight and v0.4 (eight issues) tomorrow, with v0.5 to v1.0 behind it, so the build is more than a day behind. B8 has no priority label, and nothing in the core (multiplayer, tide, building, offline play) depends on it. The powder keg already exists as a carryable, lootable item; throwing and blasting it is what's left. It stays open in v0.3 and comes back if there's time, before H3's balance pass ideally.

— tidewall-build

Deferring under the pacing rule. It's 2026-11-11 evening: v0.3 is due tonight and v0.4 (eight issues) tomorrow, with v0.5 to v1.0 behind it, so the build is more than a day behind. B8 has no priority label, and nothing in the core (multiplayer, tide, building, offline play) depends on it. The powder keg already exists as a carryable, lootable item; throwing and blasting it is what's left. It stays open in v0.3 and comes back if there's time, before H3's balance pass ideally. — tidewall-build
eric closed this issue 2026-11-14 14:04:58 +00:00
Author
Owner

Done in 238e8e4.

What changed

  • New src/sim/explosives.gd. Fire with a keg held throws one from the stack, lobbed along the look direction. A keg drops down whatever it strikes, rests where it lands, falls again if its support is destroyed, and blows when its 3 s fuse runs out. A keg dropping straight down ignores players, so it can't come to rest on someone's head.
  • The blast reaches blast_radius, measured to the nearest point of each body, piece or prop.
    • Terrain, pieces, props and fixed solids shield what is behind them. Players don't. A player is hit if the middle of their body or their head is in sight.
    • Damage falls off linearly to BLAST_EDGE_FACTOR (0.3) at the edge, times the keg's tier.
    • Players take damage armor first, credited to the thrower.
  • Friendly damage rule: the thrower takes BLAST_SELF_FACTOR (0.5) of their own blast and never gets credit for hurting themselves. Solo has no teammates, so everyone else takes full damage. Duos (M7) will add one team rule that covers guns and blasts together.
  • Pieces and props take structure_damage, so a keg breaches a driftwood breakwater in one or two throws. Everything the blast reaches is worked out before any damage is applied, so one destroyed wall can't expose another in the same blast.
  • Client: kegs in flight and lying lit are drawn with the item models (EntityView). A blast emits an explosion event for A7's effects, and an impact that the sound director already plays as keg_blast.
  • GDD, README and PLAY.md describe it.

Tests: 14 in test/sim/test_explosives.gd, plus 1 in test_match_view.

  • the throw, landing, and fuse timing
  • fire-rate throws until the stack is empty
  • falloff at 1, 3 and 5.5 m and nothing at 7 m
  • armor and tier
  • the self-damage share and credit
  • a wall, a ridge, and a wall in front of another wall each shielding what's behind them
  • a head in sight over a wall being enough
  • a breakwater breach
  • a keg falling when its floor goes, dropping at a wall's foot, and dropping past a head
  • tick budget: four captain's-tier kegs blowing on one tick inside a 5×5×3 stone fort take about 5.3 ms under nice, against the 12 ms budget, and the test asserts that limit

make check passed (679). make match passed and replays to the same hash.

Capture: tools/capture.sh items_kegs (new scenario). I opened it and checked it: from behind a player holding a keg, with a finished stone wall ahead, one keg in mid-air near the wall's top and one lying at its foot. There's no fuse spark or blast effect yet; that's A7 (#47).

Not done here

  • The launcher, and bots that throw kegs. Both are follow-up #83. Bots still carry kegs without throwing them.
  • Measuring the blast on real hardware. Only the simulation's cost was measured.

— tidewall-build

Done in 238e8e4. **What changed** - New `src/sim/explosives.gd`. Fire with a keg held throws one from the stack, lobbed along the look direction. A keg drops down whatever it strikes, rests where it lands, falls again if its support is destroyed, and blows when its 3 s fuse runs out. A keg dropping straight down ignores players, so it can't come to rest on someone's head. - The blast reaches `blast_radius`, measured to the nearest point of each body, piece or prop. - Terrain, pieces, props and fixed solids shield what is behind them. Players don't. A player is hit if the middle of their body or their head is in sight. - Damage falls off linearly to `BLAST_EDGE_FACTOR` (0.3) at the edge, times the keg's tier. - Players take damage armor first, credited to the thrower. - **Friendly damage rule:** the thrower takes `BLAST_SELF_FACTOR` (0.5) of their own blast and never gets credit for hurting themselves. Solo has no teammates, so everyone else takes full damage. Duos (M7) will add one team rule that covers guns and blasts together. - Pieces and props take `structure_damage`, so a keg breaches a driftwood breakwater in one or two throws. Everything the blast reaches is worked out before any damage is applied, so one destroyed wall can't expose another in the same blast. - **Client:** kegs in flight and lying lit are drawn with the item models (`EntityView`). A blast emits an `explosion` event for A7's effects, and an impact that the sound director already plays as `keg_blast`. - GDD, README and PLAY.md describe it. **Tests:** 14 in `test/sim/test_explosives.gd`, plus 1 in `test_match_view`. - the throw, landing, and fuse timing - fire-rate throws until the stack is empty - falloff at 1, 3 and 5.5 m and nothing at 7 m - armor and tier - the self-damage share and credit - a wall, a ridge, and a wall in front of another wall each shielding what's behind them - a head in sight over a wall being enough - a breakwater breach - a keg falling when its floor goes, dropping at a wall's foot, and dropping past a head - **tick budget:** four captain's-tier kegs blowing on one tick inside a 5×5×3 stone fort take about 5.3 ms under `nice`, against the 12 ms budget, and the test asserts that limit `make check` passed (679). `make match` passed and replays to the same hash. **Capture:** `tools/capture.sh items_kegs` (new scenario). I opened it and checked it: from behind a player holding a keg, with a finished stone wall ahead, one keg in mid-air near the wall's top and one lying at its foot. There's no fuse spark or blast effect yet; that's A7 (#47). **Not done here** - The launcher, and bots that throw kegs. Both are follow-up #83. Bots still carry kegs without throwing them. - Measuring the blast on real hardware. Only the simulation's cost was measured. — tidewall-build
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: claude/tidewall#22