Skip to main content
GameDev.net gamedev.net
Official Announcement

This is an official announcement from Box2D. Information comes directly from the source.

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Box2D
Box2D Official
· 3 months, 2 weeks ago

Replay

Briefing

Box2D has gained a new replay system designed to make hard-to-reproduce physics bugs much easier to chase down. Instead of relying on a text dump of world setup, recordings now capture an initial snapshot plus the sequence of Box2D API calls that follow, including body creation/destruction, impulses, forces, ray casts, queries, and world steps.

The practical win is reproducibility. A developer can start recording at any point, run the game for a few seconds, then save a compact binary .b2rec file and hand it off for debugging. The replay viewer then rebuilds a live b2World from that recording, showing contact points, impulses, velocities, and other simulation data while preserving determinism checks through recorded hashes.

Key frames are generated on load to speed up scrubbing through long recordings. They’re stored as runtime-generated snapshots rather than baked into the file, with the system balancing memory budget against seek performance. That makes the viewer more usable on busy scenes, even if the recordings themselves can still get large for complex worlds.

The same work also exposes snapshot and restore APIs, which opens the door to rollback-style workflows. There are limits: full determinism still depends on deterministic game code, snapshots can be expensive for large worlds, and partial-world snapshots aren’t supported. Even so, this is a meaningful debugging and tooling upgrade for anyone shipping gameplay on Box2D.

“I wanted recording to be easy for a game to implement.”

— Box2D maintainer · Explaining the design goal behind the new recording API
Original source
Read on Box2D
At a glance
what
Box2D adds a replay system that records a world snapshot plus API calls, queries, and step data for deterministic bug reproduction.
who
The system was developed for Box2D by its maintainer and is surfaced through the Box2D samples app replay viewer.
when
The feature is part of the push toward Box2D v3.2.
impact
Developers can capture compact recordings, replay live physics state, and share files to reproduce bugs without full game context.
Signal Positive

Strong tooling upgrade for debugging and replay

Discuss

Follow box2d updates

See relevant stories in your personalized news feed.

Sign in to follow

Continue on GameDev.net

Useful next steps related to this story.

Game development news without the noise

One useful weekly briefing. No daily flood.

Sending your confirmation email…

Discussion

Loading comments...