GitHub | Documentation | Become a Patron

Syncing Position Data rather than commands?



  • Looking through the documentation, it would seem that the general method is taking in commands from the clients and having the server updated across the network. What if instead of commands, I pass in positional data from the client and have the server update that.

    For example, positional data from a VR headset being sent to the server, then the server sending that same data across the network. Is Colyseus a good platform for the example mentioned?


  • administrators

    Looking through the documentation, it would seem that the general method is taking in commands from the clients and having the server updated across the network.

    That's right! Usually, the clients send commands and the server calculates what's necessary for movement and all.

    What if instead of commands, I pass in positional data from the client and have the server update that.

    Nothing stops you from doing this. It's not particularly recommended since the clients will be dictating the final data. In an authoritative server, the server should tell the rules to avoid hacking.

    Is Colyseus a good platform for the example mentioned?

    Probably. I haven't seen a VR application using Colyseus yet, but it should be totally feasible. Maybe Photon could be a bit easier since its client for Unity is way more mature than Colyseus' is at the moment.

    Cheers!



  • @endel
    Thanks for your reply. We're considering all possible solutions and Colyseus has been a good example to play around with. I know Client Prediction is on the road map for you folks but any idea how far along?