How can Multiplayer Host re-broadcast at same speed?

Discussion and feedback on Construct 2

Post » Sat Nov 14, 2015 4:00 pm

I'm setting up some multiplayer code and I think I'm doing Ok, but I'm hung up on one bit...

For example: I'm sending all sprite X/Y change messages as mode "Unreliable", but I'm sending updates to sprite instance variables as mode "Reliable". How can the host re-broadcast at same mode/speed?
B
14
S
4
Posts: 297
Reputation: 1,637

Post » Sun Nov 15, 2015 5:28 pm

With unreliable the package is not checked for delivery, and thus not broadcasted again if it never arrived.

With reliable there is a verification of package arrival, and if the message had an error it is retransmitted.
This happens in milliseconds.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Sun Nov 15, 2015 6:11 pm

Thanks @lennaert

Yeah I do understand the difference in the modes. The problem I'm seeing is C2 provides no simple way for the host to re-broadcast messages to the peers at same speed. I'm using both speeds. Unreliable for sprite positional messages because it's fine if some get dropped here and there. But I'm using Reliable for sharing state information and instance var values. I've hacked around the issue by looking at the Multiplayer.Tag value and then determining what mode to use for re-broadcasting. Not awesome coding :-/
B
14
S
4
Posts: 297
Reputation: 1,637


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests