Repository navigation
feat(platformer): draw the Approve Shield as a bubble around Hoppy - #110
Conversation
Picking up the shield used to tint Hoppy's sprite green while player.shield was true, which read as a status effect rather than a shield. The player now owns a ShieldBubble child drawn in front of the sprite: a translucent light-blue ellipse with a chunky highlight that breathes while the shield holds and swells and fades when the shield absorbs a hit or is otherwise lost. The shield flag is now a property whose setter raises or pops the bubble, so every existing path (level pickup, damage(), the comment-trap burst, tests that set it directly) stays unchanged in behaviour. The green tint is removed for the shield only; the LGTM boost tint, hit flash and invulnerability blink are untouched. Death clears the bubble instantly. Adds tests/platformer_shield.gd (headless) and a preview image, and notes the bubble in the three platformer docs.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Summary
Collecting the Approve Shield in Enchanted Repo, Bay Area Blitz and Orbital Ops used to tint Hoppy's sprite green while
player.shieldwas true, which read as a status effect rather than a shield. The player now owns aShieldBubblechild (modes/platformer/shield_bubble.gd) drawn in front of the sprite: a translucent light-blue ellipse with a chunky pixel highlight that breathes gently while the shield holds, and swells and fades (0.22 s) when the shield absorbs a hit or is otherwise lost. Death clears it instantly.shieldis now a property whose setter raises or pops the bubble, so every existing path (the level pickup,damage(), the comment-trap burst, tests that set the flag directly) keeps its behaviour. The shield still absorbs exactly one hit with no health loss.The green tint is removed for the shield only. The LGTM boost tint, hit flash and invulnerability blink are unchanged.
Independent of #108 (
fix/enchanted-ground-seams): none of the files it touches are edited here.Testing
uv run --python 3.12 --no-project python tools/tests/run_tests.py --godot /Applications/Godot.app/Contents/MacOS/Godot -k platformer -k enchanted -k orbital -k bay: 12 passed, 1 failed. The failure isorbital_ops_smoke"Spawn settles on visible station floor", and it fails identically withmain'splayer.gdswapped back in, so it is pre-existing and unrelated to this change.tests/platformer_shield.gd(headless, auto-discovered): bubble hidden on spawn, raised on pickup (via setter and via the real Bay Area pickup), no green modulate, pops on an absorbed hit with no health loss, hidden after the pop, boost tint and i-frames still work, re-raise while popping, cleared on death. 16/16 pass.python3 tools/checks/exit_leak.py --godot …: all 11 scenarios pass.gdlintclean on the new and changed scripts (one pre-existing long line inplayer.gd:74left alone).--always-on-topin Enchanted Repo to look at the bubble on a real pickup and pop.Screenshots / video
Checklist
feat(runner): ...,fix(platformer): ...)ASSETS_LICENSES.mdwith a redistributable license (no new assets; the bubble is drawn in code, the preview image is a project screenshot)docs/are updated if behavior or controls changedSummary by CodeRabbit