Skip to content

examples: apply the transition-card lesson to the slingshot (+ demo cleanup)#73

Merged
SethMorrowSoftware merged 1 commit into
mainfrom
claude/zealous-hypatia-v52yu7
Jun 21, 2026
Merged

examples: apply the transition-card lesson to the slingshot (+ demo cleanup)#73
SethMorrowSoftware merged 1 commit into
mainfrom
claude/zealous-hypatia-v52yu7

Conversation

@SethMorrowSoftware

Copy link
Copy Markdown
Owner

What & why

You asked me to review the other demo stacks and improve them with the lessons learned since they were written. I dispatched four review agents (demo, slingshot, spike-gamekit, contraption-builder), verified every finding against the actual code, and implemented only what held up.

The headline: the slingshot had the platformer's exact visible-build seam — and worse. Every level change ran b2kClear/b2kTeardown/sgWipeStage on screen before lock screen, and each transition path hid its translucent banner overlay right before tearing down, so the player watched the old tower dismantle against a bare card.

Changes

Slingshot — a transition cover (the platformer's pfCardShow/pfCardReveal lesson, ported):

  • A dedicated opaque cover sgCard + sgCardText (built once in buildSgUI, kSgUIVersion 1 → 2), raised above everything.
  • sgCardShow covers with a LEVEL n / 3 title before the teardown — wired into all four transition callers (retry, next-level, win-replay, the 13 level jumps).
  • The rebuild paints behind it; sgCardReveal holds a beat then fades it out via a generation-guarded send-driven blendLevel ramp.
  • Kept separate from the translucent sgShade banner so neither juggles the other's blendLevel; the initial openCard build is left to the menu (a gSgCardActive gate). No illustrated art — a plain tinted cover is enough here.

Demo — removed the dead newStaticBar factory (defined, never called).

What I deliberately did NOT change (and why)

Honesty matters more than a bigger diff — two agent-flagged "issues" were false positives I verified and dropped:

  • Contraption "10 Hz redundant banner relayout"playElapsed() returns 0.1s tenths (format("%.1f", …)), so the value genuinely changes every 100 ms; gating it would be a no-op. Reverted.
  • Demo newPoly "returns the wrong handle" — it already does return tRef (the control ref). No bug.

The contraption-builder's per-frame loop is otherwise already playbook-clean (one-snapshot caching, sleep-skip, 4 Hz HUD, on-change FPS), and spike-gamekit is self-declared throwaway scaffolding (line 18: "not an example of Kit style") whose per-frame costs are intentional — it exists to measure them. Both left untouched on purpose.

Verification

  • python3 tools/check-livecodescript.py — all stacks clean, embedded Kit in sync.
  • Example-side only — no Kit touch, no harness bump.

⚠️ Needs an OXT pass

The slingshot cover needs an engine pass to confirm it masks the rebuild and to tune the hold (~600 ms) / fade timing — same as the platformer card did.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HkN9P6YodA65ZuhDDuuQks


Generated by Claude Code

…leanup)

Reviewed the other demo stacks against the lessons codified since they were
written. The one clear lesson-gap was the slingshot: it had the platformer's
"visible build seam" (and worse - it hid its overlay before tearing down), so
every level change dismantled the old tower in view.

- Slingshot: add a dedicated opaque transition cover (sgCard + sgCardText,
  kSgUIVersion 1->2) shown BEFORE each rebuild (all four transition callers:
  retry, next-level, win-replay, the 1-3 level jumps) and faded out after via a
  generation-guarded send-driven blendLevel ramp - the slingshot twin of the
  platformer's pfCardShow/pfCardReveal, minus the illustrated art. Kept separate
  from the translucent sgShade banner; the initial openCard build is left to the
  menu (a gSgCardActive gate).
- Demo: remove the dead newStaticBar factory (defined, never called).

The other stacks needed no change, and two agent-flagged items were false
positives I verified and dropped: the contraption banner "10 Hz redundant
relayout" actually shows 0.1s tenths (genuinely 10 Hz), and the demo's newPoly
"wrong handle" already returns the control ref. The contraption per-frame loop
is otherwise playbook-clean; spike-gamekit is self-declared throwaway
scaffolding whose per-frame costs are intentional.

Example-side only; no Kit touch, embedded Kit in sync. Static gates clean.
The slingshot cover needs an OXT pass to confirm + tune the hold/fade timing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HkN9P6YodA65ZuhDDuuQks
@SethMorrowSoftware SethMorrowSoftware marked this pull request as ready for review June 21, 2026 22:10
@SethMorrowSoftware SethMorrowSoftware merged commit 78a9f8d into main Jun 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants