Build a third-person platformer
Goal
Make a floating star course with double jump, air dash, wall slide/jump, coyote time and jump buffering using the third-person controller.
Files you will edit
src/course.tssrc/level.json
Steps
Copy
templates/platformer. It castschar.heroand supports keyboard, gamepad and touch. Configure its controller insrc/course.ts:tsimport { createThirdPersonController } from 'gameable'; const controller = createThirdPersonController(undefined, { jumpAction: 'jump', dashAction: 'dash', coyoteSeconds: 0.12, jumpBufferSeconds: 0.14, dashSpeed: 14, dashSeconds: 0.16, dashCooldown: 1, wallSlideSpeed: 2, wallJumpSpeed: 7, });These options require physics character bodies. Keep
features.characters.motion.carry: falseso the controller drives travel. Reset the controller in init and after respawning; update it in a system. The template declares named jump/dash actions for all three input families.controller.state.platforming.cooldownis seconds until dash is ready.Place MovingPlatform, JumpPad, CheckpointVolume, TriggerBox and Star actors in
src/level.json. Ferry and LaunchPad add fitted meshes to MovingPlatform and JumpPad; Spinner composes rotatingMovement. Put checkpoint centres above platforms and the kill volume below the course, above scenery. The template counts stars, requires all at the flag and preserves the session best on Retry.
Verify
Run npm test and npm run build:guest. Jump twice, dash, wall jump, collect all stars and finish. Fall before and after the checkpoint; verify respawn, continued timing and dash cooldown. Retry restores pickups and keeps best time.