-
Notifications
You must be signed in to change notification settings - Fork 48
Motion Prediction
bolrog edited this page Apr 28, 2021
·
12 revisions
This is an experimental feature that uses the high rendering rate achieved with the FPS fix to extrapolate player position between server updates.
The method doesn't add any lag, but may mispredict the motion during 1/25th of a second, after which it tries to gradually compensate for the prediction error.
The result is as if the game runs at a higher frame rate, the smoothness only being limited by your machine. It runs very nice at 120Hz.
As far as I'm aware this has never been achieved before with Diablo II.
Enable with
-dxtestmop
This is an early work in progress. Known bugs/limitations:
- Only works on 1.12, 1.13c, 1.13d so far.
- Perspective mode not supported.
- Only extrapolates player position, so mobs, NPCs etc still move at 25 fps.
- Will blow up with -dxnovsync. Don't use it without a framerate limiter.
- Player-attached spells/auras will "jitter" in resolutions other than 960x540.
- Merc portraits will "jitter".
- Use at your own risk. Limited testing means it may crash the game, delete your save files, sell your computer on eBay etc.
Research needed going forward:
- Find DrawImage/DrawShadow/DrawText in the other game versions for detouring.
- Find unit structs in other game versions.
- Predict motion of all units, not just the player.
- Investigate if it's possible to inject predicted client side positions into D2Gfx, rather than moving the vertices in the renderer.