Bash.tv → GitHub → itch.io

Player movement that feels tight in platformers, top-down games and grid games. Walking and running with acceleration and friction, jumping with coyote time, jump buffering and variable height, faster falling, air control, wall slide and wall jump, double jump, dash, ladders and one-way platforms, normalized 8-direction movement, tile-by-tile grid movement with input queueing, and frame-rate in...

Download skill (.zip) Files on GitHub

Player movement

Drop-in: assets/movement.js (15 tests: same jump height at 30, 60 and 144 fps; short hops; coyote time; jump buffer; wall slide and wall jump; dash; normalized diagonals; grid queueing). Collision comes from game-physics moveAndSlide.

import { platformer, PLATFORMER, topDown, TOPDOWN, GridMover } from "./core/movement.js";
import { moveAndSlide } from "./core/physics.js";
const cfg = { ...PLATFORMER, ...config.player };                    // tune in config.js
const collide = (b, dx, dy) => moveAndSlide(b, dx, dy, level.isSolid, TILE);
// fixed step:
platformer(player, {
  x: input.stick().x, jump: input.down("jump"), jumpPressed: input.pressed("jump"), dashPressed: input.pressed("dash"),
}, cfg, dt, collide);

Pick the controller

Game Controller Key numbers
Platformer platformer maxSpeed 220–300, jump 550–700, gravity 1600–2200, fallMult 1.4–2
Top-down action / twin-stick topDown maxSpeed 180–260, accel high (snappy)
Puzzle, RPG, roguelike on tiles GridMover 6–10 tiles/s
Vehicles see racing-game-development  

What makes it feel good

Extras

Check

Play at different frame rates (the controllers use dt; physics should use a fixed step), try every edge (corners, ledges, under ceilings), then tune one number at a time (game-mechanics). Record final values in the design doc.