max-mapper / voxel-server

multiplayer server for voxel-engine
74 stars 25 forks source link

Refactor: split out replaying player input from storing server updates #5

Closed gabehollombe closed 11 years ago

gabehollombe commented 11 years ago

Before I dig into possibly improving the client-side input prediction, I've just been familiarizing myself with the code. While giving it a quick look, I saw that storeServerUpdate() seemed be doing two things: storing the server update, AND re-playing player input. It feels like these should be separate concerns (so that we can re-play player input on client render frame loops and not when the server sends more data). To that end, I did a small refactor contained in this pull request.

max-mapper commented 11 years ago

ahh, good point