Page 1 of 1

Bandwidth Consumption Practices

Posted: 06 Jul 2011, 19:51
by Gloryride
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.

Posted: 07 Jul 2011, 10:56
by Bax
All requests are sent to the server which then dispatches them to the involved clients. Direct connection is not possible. So the two methods behave essentially in the same way.