flint

2D physics · v0.9

Deterministic 2D physics, one fixed timestep at a time.

flint is a small, dependency-free 2D rigid-body module for game engines. It runs on a single fixed timestep with integer-anchored math, so the same inputs produce the same bytes on every machine — the foundation for lockstep multiplayer and frame-perfect rollback.

Timestep
1⁄60 s, fixed
Math
integer-anchored
Replays
bit-identical
flint
Two rigid bodies at the moment of contact A falling square body A rests on a wide ground body B. The overlap region is highlighted, two contact points sit on the shared surface, and a contact normal points up out of B into A. A dashed velocity vector enters A from above. A B n d v
A collision manifold: two contact points, one shared normal n, penetration depth d. The solver resolves it before the next tick.

Fixed timesteps

The world advances in whole ticks of a constant dt. No variable-step drift, no spiral of death: an accumulator drains time in fixed slices and the renderer interpolates the remainder.

Honest manifolds

Narrowphase returns a compact contact manifold — points, normal, depth — that the sequential-impulse solver warm-starts each frame. Stacks settle; jitter stays bounded.

Rollback-safe state

Integer-anchored math and a strict iteration order make every step reproducible. Snapshot the world, restore it, re-simulate — the bytes match, so lockstep netcode and replays just work.