Multiplayer JavaScript game built with Node.JS - Separating players

前端 未结 3 1003
滥情空心
滥情空心 2020-12-12 14:02

I have a question which I cannot find an answer to.

I\'m experimenting with building a multiplayer game with Node.JS and Socket.IO. I have built a chat room as my fi

3条回答
  •  时光取名叫无心
    2020-12-12 14:41

    Another way to synchronize the X & Y coordinates of each player is to use the Lance. It is an open-source JavaScript library that handles position correction for multiple players with an authoritative server.

    It will be useful if you need to synchronize other things besides the coordinates, like the object name or the avatar properties. Or if your players have velocities.

提交回复
热议问题