> heh ... with associated objects, when you leave .. your objects get destroyed in those rooms.
>
> but euhm, This latency ... isn't this rather the host latency ? and the signalling server would never be able to predict this seeing as its location is not yours ?
>
> Your method of workaround actually sounds decent, seeing as you would get the latency between you and the host of each room.
>
> Downside is that during this action you would effect each games host and peers their performance for a few seconds as your stuff gets created and destroyed.
>
The main problem of the Sync Object while using this method of workaround is that the peer may not be in the same layout as the actual game layout, this usualy cause unexpected bugs when the multiplayer engine tries to sync objects for players in different layouts. (e.g. host is playing a match in the layout "game" and the peer is checking the latency in the layout "lobby", the engine will try to sync objects and associate objects in the wrong layout). Also this method can't check latency of full rooms and locked rooms because you can't join those rooms.
This expression should return the latency between the host (of each room) and the peer that calls the expression and not the latency between host and signaling server.
- Player calls request room list
- On room list triggers
- A For loop feeds an array with listroomname, listroompeercount, listroommaxpeercount, listroomstatus and listroomlatency (For each loopindex)
- When this multiplayer.listroomlatency(loopindex) is called a generic message should be sent to the signaling server,
- signaling server should send it to the target host (current index),
- target host send it back to the signaling server
- signaling server send it back to the caller of the expression containing the average time (in ms) that the message took to reach the host and return.
I meant the connection between the host and the peer wanting to know the latency.
To get the latency, you would actually have to transmit some data back and forth resembling the game data in order to get a decent estimate about latency between the peer wanting to know the latency and the host hosting the game.
To overcome the obstacle of on which layout is what ... simply add some checks for on which layout it resides. There is an expression LayoutName, which returns the current layout name.
LayoutName <> "lobby" should prevent it from checking while it is in the lobby