Environment · Act I

For anything that can break as solid parts in pixel art. Build the thing as one rigid body from its own pixels. The physics sees an outline traced round them. When a pixel is destroyed, count what still holds together: one group is one body, two groups are two bodies, and each falls its own way.
Make my props rigid bodies built from their own pixels, so damage anywhere can split them in two.
Read the whole briefFold the brief
Make [my wooden bridges and crates] rigid bodies built from their own pixels, in my [side view] game. Use [my engine's 2D physics] for the bodies themselves. - A body is a set of pixels. Each pixel stores which body it belongs to and its place inside it. - Collider: trace the outline of the pixels (marching squares), simplify it (Douglas-Peucker, [1] px), triangulate. - Draw each pixel where its body puts it. Turn bodies with three shears, so no pixel is lost or blended. - [Fire] destroys pixels one at a time. - After each pixel lost, flood fill the body's pixels. One group: rebuild its collider. More: one new body per group. - New bodies keep the old one's speed and spin. A joint stays with the body that holds its pixel. - A group under [6] pixels is not a body: let its pixels fall loose. Show me the outlines as a debug overlay before anything burns.
Change what stands in [brackets] to fit your game.
- Anything that can be destroyed as rigid bodies in your game.
Not forSimulation-like destruction, things in the genre of Noita. For that, prefer grain simulation systems like the Sand Crumble technique.
Noita is built on this. In 2019 its developer Petri Purho described pixels that know their body, and shapes recalculated as pixels are destroyed.[1] Its bodies run on Box2D.[2] The outline steps follow a rebuild.[3] The bridge is this atlas's own.
- Noita: a Game Based on Falling Sand Simulation, 80 Level, 2019
- Road to the IGF: Nolla Games' Noita, Game Developer, 2019
- Peyton, Pyxis