Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Releases: proepkes/UnityLockstep

Cleanup & Refactoring, Layered-architecture, Server-UI

14 Feb 19:24
bf1af9a
Compare
Choose a tag to compare

This release contains mostly refactorings. The project is now split into 3 layers:

Core: Contains Entities and Components. It also provides an infrastructure for the upper layer to add features into. The infrastructure (class: World) allows to rollback changes that were made by the features.

Game: Contains features that change the state of the simulation. For example: spawning & moving game-entities.

Network: Handles network traffic. Provides a networked command-queue which is consumed by the simulation.

In addition this release includes a method to dump all commands to a file. A dump can be used for replaying games or debugging a desync. Currenty dumps are written to "C:\Log" (make sure the directory exists before creating a dump).

Also this release contains a prototype server UI, see Wiki for more information.

Change-rollback working

04 Feb 22:14
0eccbe6
Compare
Choose a tag to compare
Pre-release

Days of debugging finally paid of. This release adds full rollback functionality for changes that happened during prediction when input arrives from the past. (Lesson learned: if components were added, they have to be removed when rolling back. Sounds trivial, I know!). The debugging left a little mess behind, so the next updates will be refactorings/cleanup.

Another good thing: A new feature for debugging was added. It is possible to dump the whole gamestate. A full dump consists of a few smaller dumps:

  • All active game-entities
  • All input-entities
  • A serialized log that lets you replicate a whole game with input simulation as it was ingame, see the dump-tests for an example.

Clientside prediction and rollback, navigation disabled

29 Jan 17:14
aedd763
Compare
Choose a tag to compare

This release splits the server into a separate project so development on the simulation can continue while the server is running.
This release adds a first prototype for clientside prediction and rollback. The client runs the simulation with local commands. If remote input arrives, the simulation will roll back to the remote frame and fast forwards with the new input to the last local frame. Rollback only works for spawning entities so far, navigation feature is therefore disabled and will come back in the next release.

Buffering commands

27 Jan 12:53
994423c
Compare
Choose a tag to compare
Buffering commands Pre-release
Pre-release

This release adds two buffers to the Simulation (one local, one remote). Commands are stored into the remotebuffer (adding lag compensation) and will be executed when the input from server arrives. Input that arrives later than the current local tick will not be executed which may lead to desyncs (in other words: the lag was higher than the lag compensation).

The next steps are:

  • rolling back to the received input and fast forward the simulation to the current local tick
  • the buffer from the server was removed but should be added again because: if a client receives an input he should be sure that it contains the input from all other clients for the given frame. this way the prediction for one frame can only miss once

Initial Release

25 Jan 16:05
3e1a018
Compare
Choose a tag to compare
Initial Release Pre-release
Pre-release

A first working protoype. Frames get executed as soon as they arrive, which works for local network, Lag and packetloss is directly noticeable due to the stuttering simulation.