This is what the docs say about when room variables update:
The event is fired when room variables are updated in a certain room. A client receives these notifications only from the room(s) where he's currently logged in.
To optimize bandwidth only the variables that changed are transmitted.
But this seems to be a waste and doesn't really optimize the bandwidth at all . . . In what situation would you really need to know that a variable changed, yet not want the value that the variable was set to? The current method seems like a lot of unnecessary work. So the logic is as follows:
1) Something happens on server and variables change. Server sends notification to all the clients in the room of this change.
2) All the clients need the value of the changed variable so they all ask the server for the value.
3) Server returns the value to all the clients.
This doesn't seem optimized at all. It's almost double the amount of work. Why can't the server send the variables that changed as well as their value? Like this:
1) Something happens on server and variables change. Server sends variables and values to clients.
2) Clients get new values.
Or am i missing something entirely? Just something that's been bothering me recently. It seems like there would be a speed increase (or maybe I'm completely wrong) with sending an initial heavier packet as opposed to a roundabout trip from server to client.