Skip to content

Platformer: add physics-based runner jump arcs#342

Open
smcga wants to merge 3 commits intomainfrom
codex/modify-jump-mechanics-for-platformer
Open

Platformer: add physics-based runner jump arcs#342
smcga wants to merge 3 commits intomainfrom
codex/modify-jump-mechanics-for-platformer

Conversation

@smcga
Copy link
Copy Markdown
Owner

@smcga smcga commented Apr 8, 2026

Motivation

  • The runner previously snapped vertically between platform heights, producing jarring "teleport" jumps instead of natural platformer arcs.
  • Introduce a lightweight physics simulation so the mascot follows an arc on rises while preserving aesthetic bobbing and timing behavior.

Description

  • Added a RunnerJumpState type and updateRunnerJumpState function implementing launch, gravity, fall-speed cap, and landing snap logic in src/renderer/effects/platformerScroll.ts.
  • Integrated the jump-state into PlatformerScrollEffect.render, computing hop from the simulated y and resetting state on large time gaps/seeks to avoid glitches.
  • Kept existing visual rendering (buildRunnerSprite bobbing/shading) and did not change effect params or registry keys so docs extraction remains stable.
  • Updated unit tests in src/renderer/effects/platformerScroll.test.ts to cover jump-state launch, rise/fall behavior, and clean landing.

Testing

  • Ran the focused unit tests with npm run test -- src/renderer/effects/platformerScroll.test.ts, and all tests passed.
  • Ran the docs check with npm run docs:check, and the effects docs validation passed.

Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codexperimental Ready Ready Preview, Comment Apr 8, 2026 1:04am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant