HexagonalDiamond / pixelbuild

PixelBuild v2
Other
1 stars 0 forks source link

Player movement should be transferred to the server #4

Open HexagonalDiamond opened 9 years ago

HexagonalDiamond commented 9 years ago

Player movement should be transferred to the server at a specific rate (every 100 ms?), complete with client-side prediction.

HexagonalDiamond commented 9 years ago

Roadmap:

  1. Clients send key data whenever a key goes down or goes up and then the server processes the data and sends the data back to the clients which update the player position.
  2. Clients send key data whenever a key goes down or up and also update their representation with what they think would happen, then update their data using the authoritative server data.
  3. Clients send key data whenever a key goes up or down, predict the outcome, then when the server answer comes back, simulate what would have happened if you had known that the client was in this state and then had pressed the keys.
HexagonalDiamond commented 9 years ago

Step 1 is around halfway done: 05f8f3db5d3684858f06ba76624a63e0173a58fa