All examples · Physics · As Markdown, for AIs

Falling crates, retro

What this example shows

The starting point of retro physics, nacatamalon/retro-physics2d: bodies that never turn, moved in pixels a fixed step at a time and stopped against each other axis by axis, the way the old games did. Boxes stay square to the screen and balls stay round, so a pile comes to rest exactly, pixel on pixel, and the same pile comes out on every machine. There is nothing to load: no WebAssembly, no waiting.

A scene asks for it with useRetroWorld2d (gravity in pixels per second squared, down being +y), and each object with useRetroBody2d: 'static' never moves, 'dynamic' falls and is pushed. Click to drop more.

Starting
Starting
—