I started using the groupSpecifier to communicate two players in a game I'm developing. Before, I was using a server to exchange their farID's, now I'm using the netGroup groupSpec, and it's working ok.. but, I got this weird issue:
The first 2-8 seconds of netStream.sends commands, I got like a 2 seconds delay, after that, the communication is almost instantaneous.
Dont know why this is happening, but I dont want to fully implement netGroup if I'm gonna have this kind odd behaviors...
Do anyone know why this could be happening?, when I used NetStream.DIRECT_CONNECTIONS this didn't happen.
Little update: seems like it's not about how much time I need to wait for it to start working properly, it's about how many sends commands I perform (between 0 and 10, seems quite random).
the delay you're seeing is the "pull-mode" delay while the group builds (trivial) minimum-latency spanning trees for the "push mode" of the multicast stream. the push mode probes need some amount of data to flow as well as time to pass for the probes to be tried.
for more information on what's going on, watch
multicast starts at around 36:25 but i recommend watching the whole thing.
if your groups are going to be smallish (not more than about 10-14 members) and you're sending data, you'll find netGroup.sendToAllNeighbors() will always be low latency, but the sender will be sending the data to all peers (other peers won't be helping out) and it won't get to everyone once the group gets larger than about 14 members. for more information about that, what
Thanks, that video was quite useful.