Skip to content

Add platformer statechart example - #8

Merged
SandroMaglione merged 1 commit into
mainfrom
codex/add-platformer-example
Aug 1, 2026
Merged

Add platformer statechart example#8
SandroMaglione merged 1 commit into
mainfrom
codex/add-platformer-example

Conversation

@SandroMaglione

Copy link
Copy Markdown
Member

What changed

  • Add a compact playable SVG platformer example driven by @typeonce/effect-machine.
  • Model top-level locomotion, facing, and wall-contact regions in parallel.
  • Model Airborne as nested parallel motion and airJump regions.
  • Represent double-jump readiness entirely as GroundLock, WallLock, Ready, and Spent states with scoped timers.
  • Coordinate wall and double jumps through typed internal events while keeping physics and rendering in a small adapter.
  • Add a live statechart, state-local telemetry, controls, and standalone documentation/tooling.

Why this is stacked

This PR targets codex/fix-nested-parallel-targets because entering Airborne exercises the corrected complete nested-parallel target API. Once PR #7 merges, this PR can be retargeted to main without changing its example-only diff.

Verification

  • pnpm --dir examples/platformer check
  • TypeScript and Vite production build passed.
  • Browser-tested ground jump, readiness timer, one-shot double jump, rejected third jump, diving with spent capability, and reset.
  • No browser warnings or runtime errors.

Base automatically changed from codex/fix-nested-parallel-targets to main August 1, 2026 13:12
@SandroMaglione
SandroMaglione force-pushed the codex/add-platformer-example branch from 239be48 to f916c00 Compare August 1, 2026 13:12
@SandroMaglione
SandroMaglione marked this pull request as ready for review August 1, 2026 13:12
@SandroMaglione
SandroMaglione merged commit 4d8598f into main Aug 1, 2026
2 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.

1 participant