How do I Make Lobby in Multiplayer game ?

Get help using Construct 2

Post » Fri May 16, 2014 4:28 pm

I wanna make a online game with a lobby, so you can pick the room / create a room. How to make it ?
B
2
Posts: 6
Reputation: 162

Post » Fri May 16, 2014 4:31 pm

Awesome idea! Looking for this answer as well
Check out my games on Google Play:
BEAST ATTACK (1,000,000+ downloads!)
ZOMBIE BASH (Android) (Launched Feb 17)
ZOMBIE BASH (iOS) (Launched March 17)
B
55
S
18
G
2
Posts: 436
Reputation: 5,607

Post » Fri May 16, 2014 5:20 pm

This tutorial uses a simplified lobby: https://www.scirra.com/tutorials/1003/t ... th-a-lobby
Doesn't deal with room creation though.
ImageImageImage
B
71
S
22
G
240
Posts: 3,734
Reputation: 133,994

Post » Fri May 16, 2014 5:32 pm

thx blackhornet i will try it
B
2
Posts: 6
Reputation: 162

Post » Fri May 16, 2014 6:45 pm

I don't think there is any method presently available in construct to do this. The best you can do for the moment is have an room name list (dictionary) that the game cycles through joining each one until it finds one that isn't full. the host detects how many players are connected and when enough have logged in the game starts.

Other wise you would need to have your own website and working database with player logins, ids, room creation and game management to handle players that want to create, set room passwords and join rooms (that's what I'm currently setting up for my own games). Unfortunately this requires a pretty good deal of knowledge regarding web development and database design (its only a hand full of tables but the logistics is somewhat tricky).

However It also prevents me from running the game as a standalone App with out building the room creation/joining into the game (which im avoiding becuase that would be really difficult). So my games for now will all be purely web based to maintain session info and keep players synced to there rooms. My biggest fear though is the by the time i get it all up and running Ashley will have created some amazing plugin that will handle this and my work will be for nothing... for now though to my knowlede nothing is available to manage room creation/joining
B
20
S
7
G
1
Posts: 221
Reputation: 2,077

Post » Mon Jun 16, 2014 5:10 pm

I made something similar for my new game, a single room with a fixed name where all available players join to find others faster.
But when I disconnect from the server and reconnect I cannot join the room again. I tried it many times but I am always stuck at logging in and it does not join the room. Does anyone know why?

From my debuglog:
Connecting to Matchmaking Server...
Connected! - Logging in as User 'Bl4ckSh33p'
Logged in succesfully.
Joined room!
You are the HOST!
Disconnected from Matchmaking Server...
Connecting to Matchmaking Server...
Connected! - Logging in as User 'Bl4ckSh33p'
Logged in succesfully.
<<<<< joining room a second time does not work??

Here is the code (most parts just copied from the Chat example)
http://img5.fotos-hochladen.net/uploads ... tfvmsq.jpg

Why can't I join a second time? :(
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
55
S
16
G
6
Posts: 727
Reputation: 9,253

Post » Mon Jun 16, 2014 5:33 pm

I just tried it with adding a disconnet and connect button to the chat example. It seems you cant reconnect to a room if you just use Disconnect from signalling server.
When I add "Disconnect from Room" and then "Disconnect from Server" in one event it seems to work. When I reconnect I am Host again. Is this working as intended or a bug? If you completely disconnect, why can't you join the room again? Do I have to wait for a "timeout" to be able to reconnect to it when I did not properly leave the room? But no error is shown from the Server.
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
55
S
16
G
6
Posts: 727
Reputation: 9,253


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Lancifer, richcoz81 and 29 guests