platformer: asset-expansion Phases D + E (defeat juice, snakes, lava serpent)#62
Merged
Merged
Conversation
Pure polish on the one shared slime-family defeat path, so it lifts every level at once. - A stomped foe now FADES OUT over its ~700ms linger (blendLevel ramps 0 -> ~96) instead of blinking off. The sprite is a button (b2kSpriteNew returns its long id), so blendLevel fades its icon; reset to 0 before the sprite is freed so a reused control is never born transparent. The window is short and only a stomped foe or two ever fade at once. - The spook foes show a proper DEAD pose instead of a hit-flash: the bat bat_hit.png -> bat_dead.png, the mimic grassBlock_hit.png -> grassBlock_dead.png (same sheet as the live foe, so always present when it is). The slimes/snail/block-slime already played their _flat/_shell/_rest squash poses, and the telegraphing foes already idle on rest frames (barnacle_*_rest, block_rest, bat_hang), so this is the remaining gap. Example-side only (no Kit change, no harness bump). Static gates clean, audit 0 findings. Needs the OXT pass (the fade reads, the dead poses show). Second skins + a defeat poof are optional follow-ups. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X92APxUJUMue3bAzXiX9V2
Four little pale dust motes now arc out of a squashed foe - the classic stomp poof, on top of the fade + dead poses already in Phase D. Built on the proven pooled-debris pattern so nothing is created mid-game: pfMakeDustPool pre-spawns eight tiny b2kSpawnBall bodies parked off-world (every level, after the hero exists so the no-collide is valid); pfDustBurst flings four of them out of the squash point (captured from the foe's body before it is removed); pfTickDust re-parks them ~0.5s later. The motes ARE the art - small light balls, no new frames - and b2kSpawnBall births them in the camera group, so they scroll with the world and b2kMoveTo handles the scroll for free. The burst fires from pfSquashSlime (the kill/dissolve path; snails shell via their own case, no poof on a mere shelling). Example-side only (no Kit change, no harness bump). Static gates clean, audit 0 findings. Needs the OXT pass (the poof reads at a stomp). A defeat "pop" + the second skins remain optional follow-ups. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X92APxUJUMue3bAzXiX9V2
Two more juice items on top of the fade + dust-poof. DEFEAT POP: the squashed art now also arcs UP (~50px, ease-out) as it fades, instead of just dissolving in place. The squash point is captured in pfSquashSlime (gSlimeDeadX/Y) and the linger in pfTickSlimes drives the pop + the blendLevel fade off one elapsed clock. Snails shell via their own path, so only true kills pop. SECOND SKINS (bestiary variety): - pfMakeCritter gains an optional trailing pSheet (default "foes"), so it can field the spooks-sheet .png slime skins. - A GREEN and a BLUE slime (slimeGreen/Blue, spooks) reskin two L1 slimes, gSpooksOK-gated (a normal foes slime without the sheet, so no downgrade to a bare box for the no-spooks case). - The RING worm (worm_ring_*, native foes - always present) reskins L2's worm. New "wormring"/"slimegreen"/"slimeblue" anim defs. tools/audit-platformer.py: two same-index makers are a conditional reskin (if gSpooksOK / else), one foe not two - skip the patrol-overlap warn for same-index pairs. Back to 0 findings across 7 levels. Example-side only (no Kit change, no harness bump). Static gates clean. Needs the OXT pass (the pop reads; the green/blue/ring skins show + are aligned; slimeBlue's walk pair may want a tweak). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X92APxUJUMue3bAzXiX9V2
A new slime-family kind "snake" with its own tick: it crawls the floor and AUTO-REVERSES at a pit edge or wall, so you place it without hand-tuning a band. - pfTickSlimes gains a "snake" case: one b2kOverlap floor-probe AHEAD-and- BELOW the body each frame (sits past the snake's own box, so empty = a ledge -> flip); pMinX/pMaxX are the outer safety bound. Gravity keeps vy, so it hugs the floor. - Kind "snake" falls through to the classic stomp verdict (top = squash, side = hurt), so it is stompable and the Phase-D defeat juice (dead pose, poof, fade, pop) carries it for free. - pfMakeSnake pIdx,pX,pMinX,pMaxX,pTopY,pSkin picks plain / snakeLava / snakeSlime (all spook-sheet .png art), self-gates on gSpooksOK, and reuses pfMakeCritter's new sheet param. New snakewalk/snakelava/ snakeslime anim defs. Deployed: a LAVA SNAKE on L4's lava-pit bank (turns at the chasm and the lava) and a plain SNAKE on L3's second ice platform (turns at the spike pit), both clear of the other ground foes. Example-side only (no Kit change, no harness bump). Static gates clean, audit 0 findings. Needs the OXT pass (the slither reads, snakes turn at edges and never fall in, art aligns). snakeSlime + more placements + the audit's pfMakeSnake branch are the next Phase-E steps. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X92APxUJUMue3bAzXiX9V2
Replace L4's collapsing bridge (which never read right) with a rising lava serpent and rework the lava beat: - Widen the lava pit to a 512px chasm (2944..3456, was a 192px strip), crossed in two ~160px hops over a new middle stepping-stone (pf_lavastep, deck y490). Bank slabs + tiling + sign/grass adjusted. - New pfMakeLavaSerpent / pfTickLavaSerpent: a bodiless snakeLava sprite that rises out of the lava, arcs across on a sine path and sinks back in, peaking at the stepping-stone so it contests the rock you must land on. Created before the lava tiles so the y576 tile row occludes its submerged body (reads as rising from / sinking into the lava), with a visibility toggle backing the no-tile fallback. The head's strike zone is a proximity-poll knockback (the saw rule, gotcha 16). Self- gates on gSpooksOK; absent the sheet the pit is a plain two-hop gap. - Remove the collapsing-bridge maker/tick/globals wholesale (only L4 used it). Audit drops its collapse tracking; pf_lavastep registered as a landing surface. - pfMakeSnake is now the plain low crawler only (no pSkin variant); the tall rearing snakeLava/snakeSlime art is the serpent above. L4's broken snakeLava call removed; the approach keeps a plain slither snake. - Grounding fix: the spook slime/snake skins fill their frames edge to edge (zero padding, measured against enemies.png), so feet-on-ground is the plain geometric pFullH/2 - frameH*0.9/2, not the FOES soft-bottom sink that floated them ~9px. Needs an OXT pass to confirm to the pixel. Static gates clean (no smart quotes, handlers/blocks balanced, kit in sync); audit-platformer 0 findings across 7 levels. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X92APxUJUMue3bAzXiX9V2
…on crate)
Two L4 fixes from the OXT pass:
- The lava serpent never rose. pfTickLavaSerpent computed its emergence
with sin(kPI * tP), but kPI is declared ~900 lines LATER in the script
(every other kPI use is after its definition; this was the only forward
reference). OXT's stricter compiler leaves a forward constant ref
unresolved, so the term collapsed to 0 every frame: tEm stayed 0, the
head y stayed at the lava surface, and the tick took its "submerged,
stay hidden" branch forever. Use the literal pi instead - the serpent
now actually rises, crosses and sinks.
- The fire slime ("the lava creature") jammed against the powder-keg
crates: its patrol band ran to 3600 (body right edge ~3624) into the
crate pyramid at 3644. Pull the band back to 3484..3560 so it patrols
the bay clear of the crates.
Static gates clean; audit-platformer 0 findings across 7 levels.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X92APxUJUMue3bAzXiX9V2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Carries the platformer through Phase D (defeat-animation juice) and Phase E (snakes / the slither beat) of the asset-expansion plan, all example-side — no Kit change, no harness bump.
Phase D — defeat juice (one shared slime-family defeat path, so it lifts every level)
blendLevel0 → ~96) with an ease-out pop, instead of blinking off. Reset to 0 before the sprite is freed so a reused control is never born transparent.bat_hit→bat_dead, mimicgrassBlock_hit→grassBlock_dead).pfMakeDustPool/pfDustBurst/pfTickDust, the pooled-debris pattern, nothing created mid-game).worm_ring_*,slimeBlue/Green*) via a new sheet param onpfMakeCritter.Phase E — snakes & the serpent pit
snakekind + slither tick — a floor crawler that auto-reverses at a pit edge or wall (one floor-probeb2kOverlapper frame). Stompable like a slime; the Phase-D juice carries it for free.pfMakeSnakeis the plain low crawler; deployed on L3 and L4's lava-pit approach.snakeLavaserpent rises out of the lava, arcs across and sinks back in on a sine path, peaking at the stone so it contests the rock you must land on (pfMakeLavaSerpent/pfTickLavaSerpent). Created under the lava tiles so its submerged body is occluded; the head is a proximity-poll knockback (the saw rule). The collapsing-bridge maker/tick/globals were removed wholesale.enemies.png), so their bind offset is the plain geometricpFullH/2 - frameH*0.9/2, not the FOES soft-bottom sink that floated them ~9px.Verification
check-livecodescript.py— PASS (no smart quotes, handlers/blocks balanced, embedded Kit in sync)audit-platformer.py— 0 findings across all 7 levelsNeeds the OXT pass — that the serpent reads as rising from / sinking into the lava, its head reaches the stepping-stone at the peak, the two hops are clearable, and the spook sprites sit on the ground to the pixel (art alignment is statically unverifiable).
🤖 Generated with Claude Code
Generated by Claude Code