Skip to content
Docs
How disko works

The world and ticks

Discs and walls; collision groups; and why everything advances in fixed, deterministic ticks.

Bodies and walls

The world is two-dimensional and made of a few shapes:

  • Discs move: players, balls, pucks. They have a radius, a mass, damping (how fast they slow down) and bounciness.

  • Walls run through points, each edge straight or curved. Nothing pushes a wall, but it can move along a path, and then it pushes what it meets.

  • Joints tie two bodies together at a distance.

  • Crossings are lines that report when a disc passes them, such as a goal line. They do not block anything.

Collision groups decide who collides with what. Each object belongs to groups and lists the groups it accepts: a goal net that accepts only the kick group stops the ball but lets players walk through.

Layers decide what is drawn above what, and visuals add text and rings that follow a body, such as a player's name.

Ticks

The world advances in ticks, 60 per second. Each tick, the room applies every player's input, moves the bodies, resolves collisions and runs the rules. The same state and the same inputs always give the same next state: the simulation is deterministic. That is what lets the room be the single source of truth, lets the Studio replay a run exactly, and lets the same project behave identically in Play and in a public room.

Timers in the Studio count in seconds but advance by ticks, and Every tick rows run once per tick. In code, game.on("tick") is the same moment.

See World and physics for the full model.