A Physics Engine with Incremental Rollback for Multiplayer Games

· science · Source ↗

TLDR

  • Easel built a custom physics engine that snapshots only changed objects per frame, enabling rollback netcode for large multiplayer worlds.

Key Takeaways

  • Incremental rollback targets ~30 changed objects per frame instead of thousands, achieving 30-50x fewer snapshots than whole-world approaches.
  • Aggressive sleep logic puts bodies to sleep immediately at zero velocity and tracks force balance across stacks to avoid gravity keeping the world perpetually awake.
  • A lazy BVH with category-aware indexing minimizes unnecessary rebalancing and speeds up common queries like nearest-enemy lookups.
  • ForcefulStep uses position-correction (not velocity) to implement non-bouncy character stepping without bypassing the physics solver or killing knockback.
  • Continuous collision detection resolves collisions before sweeping for time-of-impact, avoiding the direction error seen in Rapier and the dynamic-dynamic gap in Box2D 3.0.

Hacker News Comment Review

  • The author confirms itch.io export works via an HTML iframe embedding the hosted easel.games version, keeping multiplayer and leaderboards intact.
  • No broader technical debate on the rollback architecture or physics solver tradeoffs has emerged yet.

Notable Comments

  • @BSTRhino: Author states no existing physics engine supports incremental rollback, framing the custom build as filling a real gap for large-world rollback netcode.

Original | Discuss on HN