Skip to content
Vuk Cvetković
GamesBuilt:

AccretionBeta

Let a body fall. Two of the same merge into the next one up, from the Moon through the planets to the Sun, and the space fills whether you are ready or not.

Score0
Best0
NextMoon

Out of room

Something has been resting above the line for too long. There is no ceiling here, only a line, and a body that stops above it has nowhere to go.

Move to aim and press to drop. Arrow keys aim, Space drops.

How to play

  1. Aim, then drop

    Move across the top to line a body up and press to let it go. Only the five smallest ever arrive, so everything past Earth has to be built.

  2. Two of the same touch and merge

    They do not have to be pressed together or held: the moment two equal bodies come to rest against each other they become the next one up, and a merge that lands next to another sets off a chain.

  3. Build sideways, not upwards

    A body dropped onto a tall pile rolls, and where it lands is not where it was aimed. Keeping the larger ones along the bottom is most of the game, because they are the ones with nowhere left to go.

  4. The line is a delay, not a wall

    Nothing stops a body going above it. It is only over when one has landed up there and is still there half a second later, so a splash is survivable and a settled Jupiter is not.

How it is built

No canvas, no physics library and no dependency of any kind. A body is a div with a border radius, its colour is a gradient in the same stylesheet as the rest of the page, and the frame writes one transform onto each. So the planets scale with the page, stay sharp at any zoom, and cost nothing to serve. A general physics engine would on its own weigh five times what this whole game does.

The solver takes many small steps rather than a few large ones, eight to every frame. In each of them every contact is solved as a stiff, heavily damped spring, the bodies move, and then every contact is solved again, rigidly, which takes back whatever speed the push gave them. So an overlap is corrected without ever becoming a bounce, and a pile at rest is perfectly still. A contact is found while there is still a gap, so a falling planet stops exactly at the surface it lands on rather than sinking in and being pushed back out.

The rest is what makes it read as heavy rather than springy. Friction acts between the two surfaces, spin included, so a body that skids starts to roll. A hard landing soaks up the spin it arrived with, so a planet that clips another on the shoulder comes to rest beside it instead of rolling across the field. An impact is spent where it happens and never carried into the next step, which is what keeps a large body from bouncing off a small one. And a planet balanced on the crown of another is tipped off it at once: the balance may be real, but a planet standing on another like a snowman reads as stuck.

The simulation runs in its own space of 1200 by 1650 units and never learns how big it is being shown. One transform on one element scales the whole field onto whatever width the page has given it, so a resize changes that single number and nothing else - not a radius, not a position, not a step. The frame draws each body between the last two steps, so a 120Hz screen gets a new position every time it refreshes. The sky behind it is drawn once, when the site is built: three hundred stars as dots along a few paths, nebulae made of fractal noise, and four layers that slide at different speeds as you aim.

Esc