Sending to server
setInterval(()=> { this.sendMessage(this.input.constructInputBitmask().toString()); }, Math.round(1000 / 30)); Immediately send back the answer
private message() { var self = this; this.socket.on('message', function (msg: string) { self.io.emit('message', self.getPosition(msg)); }); } Time is calculated so return this.player.position.x + '|' + this.player.position.y + '|' + new Date().getTime() + '|' + this.id; return this.player.position.x + '|' + this.player.position.y + '|' + new Date().getTime() + '|' + this.id;
An example of what is coming
Point{ id:4216 serverTime:1475948760658 time:1475948761854 deltaTime:1196 x:290 y:130 } Real ping to VPS Minimum = 60 ms, Maximum = 109 ms, Average = 76 ms Here what was actually doing http://194.135.88.82.73000/