Jump to content

MoveTo delta speed and online timing


Recommended Posts

So I'm making an online game with socket.io and phaser and I run into a little problem:

Everything moves faster on PC while android devices lag behind.

I use game.physics.arcade.moveToObject to move to a waypoint but the same problem occures with moveToXY and other methods.

Here is logic:

Two players are on the map in the same X position but different Y positions.

Player one on PC clicks on a location to the right a few pixels and starts moving to right on both screens of PC and Android device.

Player one arrives to desired location earlier on PC while still moving on Android.


Movement implemented with constant speed of 32 in update scope if player's current position is not equal to corresponded player's waypoint which is updated via websocket signal from server.

game.time.advancedTiming is set to true and desiredFPS to 35. This did help but only a little.


How should I approach this? Is there such a thing as delta speed? I could also periodically update player's location that server would keep track of but last time I checked there was no phaser module for node.js, so I can't really calculate player's location serverside.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...