I searched for this but couldn't find it exactly.
I need to synchronize time between clients in a real-time game. I've identified and implemented 2 different ways of doing this, but need help determining which is best for bandwidth:
Version 1
Code: Select all
Have the host update their time to a RoomVariable that the remaining clients are synched with on ROOM_VARIABLES_UPDATE.
Version 2
Code: Select all
Have the host send an ObjectMessageRequest that all the other clients are listening for and update accordingly.
I suspect they'll more-or-less be equal, but couldn't confirm that ObjectMessageRequest is sent to the server since what I'm really wanting to do is talk to the other clients (and ignore any uneccessary host->server communications where possible) and ObjectMessageRequest allows me to do just that. However, it is sent using SmartFoxServer.send() method which is documented as
//Sends a request to the server.