Wire levers into switchboard (W2#7, level-22) - #146
Merged
Conversation
Add lever mechanics to the switchboard level and adjust geometry so the path from spawn (row 9) to exit (row 5) is reachable. Geometry changes: - Add one-way platform at row 8, cols 3-5 (mid-ascent stepping stone) - Extend one-way platform at row 6 from cols 10-12 to cols 5-12 and add a second segment at cols 14-18 (upper pathway to exit) This creates a reachable staircase: row 9 -> row 7 (via row 8 platform) -> row 5 (via row 6 platforms) -> exit at (17,5). Mechanics: - lever-gate: pressure plate at (4,7) on the ascent path - lever-release: pressure plate at (10,5) on the upper platform Both levers use toggleOnContact=true. They serve as visual indicators for the shifting-wall trap; the lever state is not yet consumed by the trap system, so the geometry is designed to be independently solvable via the reachability validator. Closes #135
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Closes #135
Wires lever mechanics into the switchboard level (world2/level-22.json) and adjusts the level geometry so the path from spawn to exit is reachable.
Changes
Level geometry adjustments (
src/levels/world2/level-22.json):The original level had a 4-row vertical gap (spawn at row 9, exit at row 5) with only a single one-way platform cluster at row 6 (cols 10-12) and a shifting-wall trap pillar at col 15. The geometry was unreachable — the player could walk along row 9 but had no way to ascend to the exit.
Added one-way platforms to create a reachable staircase:
Path: spawn (2,9) → walk right to (5,9) → jump up to (5,7) → jump up to (5,5) → traverse right along row 5 platforms → exit (17,5). All jumps satisfy the reachability validator's combined constraint (|dc|/4 + rise/2 ≤ 1) with ceiling clearance verified.
Lever mechanics added:
lever-gate: pressure plate at pixel (64, 112) = tile (4, 7), on the ascent pathlever-release: pressure plate at pixel (160, 80) = tile (10, 5), on the upper platformBoth levers use
toggleOnContact: true(pressure-plate style). They are conceptually linked to the shifting-wall trap (the lever "opens the wall"), but since the lever state is not yet consumed by the trap system, the level geometry is designed to be independently solvable — the reachability validator (which doesn't model levers) confirms the path is reachable through static geometry alone.Verification
npm test)npm run lint)npm run build)