Commit Graph

5 Commits

Author SHA1 Message Date
Brian Fertig e6a37c1b3a Add trash can/tent/cat smashables, spray paint/backpack bonus items, and
- Expand smash-items spritesheet from 6 to 12 frames (8x2 grid) with new trash can, tent, and cat props plus their smash sound effects
- Expand bonus-items spritesheet from 12 to 18 frames (9x2 grid) with new spray paint and backpack collectibles plus their firework sounds
- Add level12 ("Curb Check") as a designed level and levels 13-20 as placeholder stubs to fill campaign 2's 10-level map
- Give campaign 2 a custom 3-row serpentine layout on the level select screen to differentiate it from campaign 1's two-lane design
- Update editor preview rendering to handle multi-row spritesheet grids and expose the new item types in the placeables panel
2026-08-26 19:40:26 -06:00
Brian Fertig ed81a465ee Add smash/bonus SFX and rebuild level07 with items & bonuses
- Add per-item sound keys to `SmashItemManager` and `BonusItemManager`, playing a dedicated clip on smash/collection (load-tolerant via `cache.audio.exists`)
- Preload new FX clips: `smash-{tv,chair,cone}` and `bonus-{cash,ctc,guitar}`
- Rebuild level07 terrain/layout with updated items, bonus placements, goal, and camera bounds
- Move level01 item positions to match new layout
- Update smash-items sprite sheet (PNG/PSD)
2026-08-23 12:01:14 -06:00
Brian Fertig 8e5398e898 **Fix smash items knocking kids out by excluding kidCategory from collision mask**
The previous fix only exempted the bus's `busCategory` from smashed item collisions, leaving items still colliding with and ejecting kids riding at the open top of the compartment. This commit:

- Adds `~this.bus.kidCategory` to the initial collision filter in `_buildItem`, so new smash items are ghost-to-kids from creation
- Updates the post-smash mask update to also clear `kidCategory` (previously only `busCategory` was cleared), preventing a regression where item↔kid collisions would silently re-enable after the smash animation

Items remain solid against terrain and other props, preserving normal landing/physics behavior while ensuring their impact can no longer contribute to ejecting kids.
2026-08-22 17:09:53 -06:00
Brian Fertig d9b6a754d8 Fix bus collision with smashed items by clearing bus category from item mask 2026-08-22 15:29:56 -06:00
Brian Fertig d6e998027b Add smashable props (TV/chair/cone) with physics-based launch on bus collision
- New SmashItemManager entity that spawns items from level data, detects bus contact, swaps to smashed frame, and applies up-and-forward impulse with tumble
- Add `SMASH_ITEM` config block for launch speed/angle/spin, density, friction, restitution, and float height
- Extend asset manifest and spritesheet (6 frames: intact/smashed TV, chair, cone)
- Level editor gains "Smashables" section to place/delete items via click on preview map; exports `items` array in level data
- Level editor can now import bundled or file-based levels, preserving exact terrain while locking section editing; metadata and items remain editable for re-export
- Score scene reveals smashed item count as a bonus line (+50 each) between kids and time tally
- PlayScene wires SmashItemManager lifecycle and passes smashedCount to score scene
- README documents smashables feature, editor workflow, and import behavior
2026-08-22 14:55:50 -06:00