Multiplayer - Join Room / Max Peers value

Get help using Construct 2

Post » Wed Mar 26, 2014 12:16 pm

Hi,

I want to give access to my game for 4 users at the same time.
I thought use the max peers parameters of multiplayer object (join room).

I've made a test with max peers value at "1", but I can connected 2 peers (1 host & 1 peers for example).

Is this parameter for limit peer in room?

Thx
Regards
B
5
S
1
Posts: 10
Reputation: 595

Post » Wed Mar 26, 2014 1:06 pm

Can't you test with value at 2 and try to connect 2/3 peers ? :D
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Wed Mar 26, 2014 1:33 pm

Ok thanks, Host is not considerate as peer in the parameters. So Max peer: 2 --> 1 host + 2 peers max

Thx! :)
B
5
S
1
Posts: 10
Reputation: 595

Post » Wed Mar 26, 2014 1:48 pm

The max peers count includes the host. If you set it to 1 it is ignored, because nobody would be allowed to connect, defeating the point of using the Multiplayer object. If you set it to 2 then at most one peer can join, since with them and the host it's 2 peers, and subsequent peers trying to join will receive an error saying the room is full.

Don't forget the value is only used from the host. If two peers join a room, one with max peers 5, and the other with max peers 10, the value is taken from whoever became host.
Scirra Founder
B
399
S
236
G
89
Posts: 24,523
Reputation: 195,378


Return to How do I....?

Who is online

Users browsing this forum: Artcadev and 44 guests