All examples · Physics · As Markdown, for AIs

Platformer feel

What this example shows

A platformer's feel from four fields of a retro body, none of them worked out by hand each frame. acceleration: the pad pushes, so the hero speeds up instead of starting at full speed. drag: with the pad let go it slides to a stop. maxSpeed: one top speed for running and another for falling, per axis. blocked: down to know it may jump, up for a head that hits a ceiling.

Let go of jump early for a short hop: the upward speed is cut while it is still rising. Arrows to run, up or Z to jump.

Starting
Starting
—