Side-scrolling platformer
Goal
Adapt templates/side-scroller: double jumps, platforms, patrols and checkpoints.
Files you will edit
src/game.ts— controls, camera and round rules.src/level.json— actor placement.
Steps
- Keep
characterMovement({ planeZ: 0 }),char.heroand the template's jump budget. - Tune
sideScrollCamerabounds; reset it on respawn. - Place axis-aligned
SoftPlatformactors. Their half extents are[2, 0.15, 1]before actor scale. Descending characterMovement capsules land on top. - Down+jump calls
dropThroughPlatform(hero.entity); allow room below. - Give platforms and pads mesh assets. Mesh
props.scaleaffects only the look.
Verify
Run npm test. Test keyboard, gamepad and touch: double jump, rise through a soft floor, land and drop; check lives, respawns, stomps and the goal route.