Little question about Rooms in the multiplayer plugin

Get help using Construct 2

Post » Wed Jul 09, 2014 8:08 pm

Hey
@Ashley:

From the doc :
Auto-join room
Join the first available room with the given game, instance and first room name. The player must be connected and logged in to the signalling server. The first player to join a room becomes the host. Be sure to use a unique name for the Game. For example if "myroom" is full, it will try "myroom2", "myroom3", etc. This effectively arranges all joining peers in to games of a particular size. If the room is locked when full, then late-joiners are not allowed; if left unlocked and a peer leaves after the game starts, a newly joining peer may be added back to the game to top it up to the Max peers again. Upon joining, On joined room triggers.


I'm a bit confused:
1) Why must i specify the room name if the engine already looking for an available room automatically?
2) I wonder also how to manage several rooms rather than using a same room name like what you done in the tutorial? database is needed in that case?
3) Can Auto-join room create new rooms if it can't find any available room ?

Best regards.
B
11
S
3
Posts: 32
Reputation: 816

Post » Thu Jul 10, 2014 10:16 am

Any help by any member will be appreciated.
B
11
S
3
Posts: 32
Reputation: 816

Post » Thu Jul 10, 2014 12:56 pm

1) The name is what it appends numbers after if the room is full. So if you specify "myroom" and "myroom" is full, it will continue to try "myroom2" and so on. You have to specify a base name so you don't accidentally try to use rooms being used for other purposes. You might for example want to have 2 different types of room that can be auto-joined.

2) What is it exactly that you want to manage?

3) Yes, that's what auto-joining rooms is for.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Thu Jul 10, 2014 4:46 pm

1) The name is what it appends numbers after if the room is full. So if you specify "myroom" and "myroom" is full, it will continue to try "myroom2" and so on. You have to specify a base name so you don't accidentally try to use rooms being used for other purposes. You might for example want to have 2 different types of room that can be auto-joined.




3) Yes, that's what auto-joining rooms is for.


I understand now, thanks!
B
11
S
3
Posts: 32
Reputation: 816


Return to How do I....?

Who is online

Users browsing this forum: blue visionary, OBLIVION and 12 guests