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/

  • how connected Time is computing so return this.player.position.x + '|' + this.player.position.y + '|' + new Date (). getTime () + '|' + this.id; with an example of what comes up? - Grundy
  • @Grundy new Date (). GetTime () on the client and on the server - Serge Esmanovich
  • what is new date (). getTime () ? - Grundy
  • @Grundy so I get time - Serge Esmanovich
  • one
    If you are talking about the fields that came from where in your code you can see where they come from, these serverTime and time. Maybe the clock on the client and on the server does not go the same way (which is most likely), and you get these two times on 2 different computers, respectively - Mike

0