Skip to content

0.14.0 Don't crash game on drop, better ping, cache optimized

Latest
Compare
Choose a tag to compare
@hopskipnfall hopskipnfall released this 23 Oct 08:31
· 1 commit to master since this release

Major changes in this version:

  1. When a user drops from a game, if two or more players remain the game will not stop #133

This is how things worked from version 0.11.2 and before, but was lost when we moved to running the entire server on a single port. This has not been thoroughly tested and there is a rare edge case where the game may pause for up to one minute before continuing. If you notice strange behavior when a game ends, please let us know.

  1. Ping calculation is more accurate

Until now, ping has been measured at only millisecond-level precision and the average ping was calculated by truncating instead of rounding.

  1. Significant performance boost for the game data cache

The protocol uses a cache to avoid sending multiple packets of identical game data. After some inspection I realized that the specialized data structure being used was almost optimally inefficient 😂 I made some small changes which reduce cache lookup time by about 80% in practice. I haven't run the full suite of performance tests for comparison with previous versions, but it's possible this results in a noticeable improvement.

Other changes:

  • I switched from Dagger to Koin for dependency injection. This removes the need for annotation processing, which speeds up build times and removes nearly all generated sources. This was a big hurdle to making it possible to comfortably edit the server code using VS Code.
  • Some game data processing code that was previously synchronized with locks had the locks removed (presumed unnecessary), which may have a performance benefit.
  • Some changes in how dependencies are defined means the jar is close to half the size.
  • I some changes that may mitigate lag spikes experienced when a user joins the server (please provide feedback on this).

As always if you notice bugs feel free to create a GitHub issue or post in the Kaillera Reborn Discord server.

PRs

Full Changelog: 0.13...0.14