Skip to content

Release 0.19.0

Latest
Compare
Choose a tag to compare
@cBournhonesque cBournhonesque released this 28 Jan 01:58

0.19.0

Visualizer

The visualizer features uses the excellent bevy_metrics_dashboard to display graphs for every metrics registered in lightyear. There are metrics related to rollbacks, replication, messages, latency, etc. which can be used to more easily inspect what lightyear is doing.

image

Lag Compensation

Lag compensation is the notion of the server 'rewinding time' to process certain user actions like bullets fired, so that client actions in the predictive timeline can impact replicated entities in the interpolated timeline. This is usually used in FPS games.
The fps example (previously bullet_prespawn) showcases how to enable lag compensation for hit detection.

Screen.Recording.2025-01-27.at.5.49.39.PM.mov

In this example, the red player and the blue enemy are predicted, and the green enemy is interpolated.
Bullets are pre-spawned on the client directly in the predicted timeline so they can interact normally with the blue predicted enemy.
To handle collisions with the green enemy we have to use the new LagCompensationPlugin. You can see that the server maintains a history (white bounding box) of the past positions of the green enemy to perform lag compensation (rewind time when computing the collision).

Bug fixes

  • Variable input delay had been added but didn't work correctly in some situations. This should now be fixed.
  • DeltaCompression, where replication updates are sent as a diff from a previous update, should now work in all situations
  • Fixed a lot of cases that were causing extra rollbacks, especially related to PrePrediction and PreSpawning
  • Fixed bugs related to transferring authority between client and server (in particular using prediction/interpolation in combination with authority transfer)
  • Fixed some edge cases related to visibility management via the Room api
  • Fixed issues related to hierarchy, in particular the Confirmed hierarchy is now correctly synced to the Predicted/Interpolated entities

What's Changed

New Contributors

Full Changelog: 0.18.0...0.19.0