Skip to content

Wire jetpack into level W2#10 (lift-off) - #145

Merged
sv-tmueller merged 1 commit into
mainfrom
feat/134-jetpack
Aug 16, 2026
Merged

Wire jetpack into level W2#10 (lift-off)#145
sv-tmueller merged 1 commit into
mainfrom
feat/134-jetpack

Conversation

@sv-tmueller

Copy link
Copy Markdown
Owner

Summary

Wires a jetpack mechanic into level-25.json (lift-off, World 2 #10) so the player can traverse the 6-row vertical gap between spawn (row 9) and exit (row 3).

Changes

  • Added a mechanics entry to src/levels/world2/level-25.json with type "jetpack" and params { maxFuel: 300, thrustPower: 260 }.
  • The jetpack adapter (createJetpackMechanic in src/mechanics/adapters.ts) equips on creation and applies upward thrust while jump is held, consuming fuel per step.

Verification

  • npm run typecheck — passes
  • npm run lint — passes
  • npx vitest run — all 1340 tests pass (83 test files)
  • ✅ Level parses correctly via parseLevel — the worlds.test.ts suite validates every level (including W2/level-25) loads without errors, confirms dimensions/spawn/exit/tiles.
  • ✅ Mechanics field is structurally validated by validateMechanics (checks id/type/params/duplicate-ids) and the jetpack factory is registered in the mechanic registry (src/mechanics/register.ts).

Validator note

The reachability validator intentionally does NOT model jetpack flight — modeling free-flight thrust would make the validator far too permissive (any reachable-by-flying cell becomes trivially "valid"). As a result, lift-off will not pass the reachability validator. This is expected by design, not a regression.

Closes #134

Add a jetpack mechanic entry to level-25.json so the player can fly
up the 6-row vertical gap between spawn (row 9) and exit (row 3).
Params: maxFuel=300, thrustPower=260.

The reachability validator intentionally does NOT model jetpack flight
(it would be far too permissive), so lift-off will not pass the
validator — this is expected by design.

Refs #134
@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
pitfall Ready Ready Preview Aug 16, 2026 7:08am

@sv-tmueller
sv-tmueller merged commit f034678 into main Aug 16, 2026
6 checks passed
@sv-tmueller
sv-tmueller deleted the feat/134-jetpack branch August 16, 2026 07:15
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.

feat(mechanics): wire jetpack into scene + fix W2#10 lift-off

1 participant