A Physics Engine with Incremental Rollback for Multiplayer Games
a day ago
- #multiplayer-games
- #physics-engine
- #game-development
- Easel's new custom physics engine uses incremental rollback, snapshotting only the parts of the world that change, enabling large multiplayer games with thousands of objects.
- The engine features sleep optimization, where bodies sleep immediately at zero velocity to avoid unnecessary calculations, and handles gravity by monitoring balanced forces to keep stacks awake until equilibrium.
- Spatial indexing with a Bounding Volume Hierarchy (BVH) is optimized to minimize snapshotting and rollback, and includes category tracking for efficient queries like finding the nearest player.
- Non-bouncy stepping is integrated into the solver via ForcefulStep with restitution=0, treating stepping similarly to position correction to prevent bounce back without damping knockback.
- Continuous collision detection is supported, with improvements over other engines like Rapier and Box2D, allowing accurate mid-air collisions between fast-moving objects.
- Bodies can move themselves even without colliders if given velocity or turnRate, useful for game elements like floating billboards, diverging from strict physics for game engine flexibility.