How do I use a lobby server for a multiplayer game ?

Get help using Construct 2

Post » Fri Jan 06, 2017 4:23 pm

Hello everyone !

I'm working on a small multiplayer game, and I want the players to choose who they play with.

I already read @Ashley 's tutorial series about multiplayer, and @blackhornet 's tuto : https://www.scirra.com/tutorials/1003/tic-tac-toe-part-3-multiplayer-with-a-lobby but I don't really know how to set up the the server to do that... :-/


These are the issues I'm struggling with :

Number 1 : What should I use as lobby server ? Can I use a classic 1&1 webserver (like the one I use to test websites and other c2 games) or do I have to pay for an expensive game server even if the game is small and I just want the server to handle player groups ?

Number 2 : How do I set up the server to do that ? I'm good with game logic but server management isn't my strong suit and I'm a little confused ^^'

Number 3 : Should I use the signalling server hosted by Scirra or is it wiser to use my own not to depend on it ? How can I set up a signalling server for my games ?


EDIT : I guess I just found an answer for n°3 :-D
https://www.scirra.com/store/game-making-tools/multiplayer-signalling-server-161
I would probably need some help to configure it if I buy one though ^^

But first I still need to understand how to set up a lobby server ^^'
Any help would be greatly appreciated, I'm new at this and it's pretty complicated for me :-/

Thanks for your time and have a nice day ;-)
Hello !



I'm Steven, a 24 years old French graphic designer and programmer, and it's been 4 years since I started using Construct 2.
B
15
S
6
G
3
Posts: 70
Reputation: 2,573

Post » Mon Jan 09, 2017 4:37 pm

You can get cheap servers in the cloud from places like Amazon Web Services. Their cheapest servers run around 5USD/month, and when you first sign up, you can get a free server for a year.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Mon Jan 09, 2017 5:22 pm

Hello @gumshoe2029 and thanks for your advice, it might be helpful :-)
Can you answer my other questions ?

- Can I use a classic web server or do I need something more specific ? (If so, what do I need ?)
- How am I supposed to configure it ? It's not explained in the tutorial and I'm really confused here :-/
Hello !



I'm Steven, a 24 years old French graphic designer and programmer, and it's been 4 years since I started using Construct 2.
B
15
S
6
G
3
Posts: 70
Reputation: 2,573

Post » Tue Jan 10, 2017 6:42 pm

@Ratmaster
If you get the EC2 servers, they operate exactly like classic webservers (except the hardware is abstracted away). You just SSH into the Linux command console, download Linux packages (like Apache webserver), or use winSCP to upload files to the server.

Dabble with the free server before you actually buy one.

There is no tutorial for this, since we are the only ones (that I know of) that use AWS for our servers in the Scirra forums. I am hesitant to write a tutorial on this, because I don't want to step on @Ashley 's Scirra arcade store.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Tue Jan 10, 2017 9:13 pm

@gumshoe2029 thanks for your answer
I think I may have misspoken (since English is not my first language) and there is a confusion here :

- I already have a classic 1&1 web server for this whole project, and I have managed to create a classic chat room using @Ashley 's tutorial

- Next I tried to follow @blackhornet 's tuto : https://www.scirra.com/tutorials/1003/tic-tac-toe-part-3-multiplayer-with-a-lobby
I tested it (blackhornet's TTTMP-Client-130.capx with changed GAME_NAME, etc... exported and hosted on my web server) but it didn't work and I had an error message "No lobby server found" so I wanted to know how to run a lobby server at all times without having to let my computer on with a browser connected to the lobby page at all times...

Furthermore I think the free scirra's signalling server is really unstable, because I tried to run the chat example just now and I got this error message :
Signalling error: [object Event]
Disconnected from signalling server


So my questions are :
- How do I run the lobby server at all times on my web server without my computer on ?
- How do I use scirra's multiplayer signalling server ? https://www.scirra.com/store/game-making-tools/multiplayer-signalling-server-161 not to depend on the free and unstable one ?

I'm really sorry if I wasted your time because my questions weren't clear enough
Hello !



I'm Steven, a 24 years old French graphic designer and programmer, and it's been 4 years since I started using Construct 2.
B
15
S
6
G
3
Posts: 70
Reputation: 2,573

Post » Thu Jan 12, 2017 12:39 pm

The signalling server is designed to also function as a lobby server. Use the "request room listing" action and you get a list of available games that you can build a lobby around.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Thu Jan 12, 2017 2:06 pm

@Ashley thanks a lot for your answer, I didn't know it could do that and I think it might really help :-)
Just to be sure, what do you mean by "available games" ? Does that mean that you choose the maximum number of games that can be played at the same time when configuring the signalling server ?

Because that's what I want to do in my project :
1. The players start by connecting to a big lobby server, where every player is connected
2. - They can start a "public" game that everyone can join, or a "private" game that cannot be joined without an invitation, for 2, 3 or 4 players. They are then redirected to a waiting room with a chat and a button to invite other users (if they are not in a waiting room or a game).
- They can also "join an available game" to join an unfilled public waiting room
3. No one can join when the game is started, but guests can choose to "watch the game" if they want

If I understood properly, to run the signalling server I will need a dedicated server and not a classic web server right ?
Please can I have some advice to do what I described above ?
Hello !



I'm Steven, a 24 years old French graphic designer and programmer, and it's been 4 years since I started using Construct 2.
B
15
S
6
G
3
Posts: 70
Reputation: 2,573

Post » Thu Jan 12, 2017 4:39 pm

See the manual entry for how it works.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Thu Jan 12, 2017 5:39 pm

Ratmaster wrote:Just to be sure, what do you mean by "available games" ? Does that mean that you choose the maximum number of games that can be played at the same time when configuring the signalling server ?

Because that's what I want to do in my project :
1. The players start by connecting to a big lobby server, where every player is connected
2. - They can start a "public" game that everyone can join, or a "private" game that cannot be joined without an invitation, for 2, 3 or 4 players. They are then redirected to a waiting room with a chat and a button to invite other users (if they are not in a waiting room or a game).
- They can also "join an available game" to join an unfilled public waiting room
3. No one can join when the game is started, but guests can choose to "watch the game" if they want

If I understood properly, to run the signalling server I will need a dedicated server and not a classic web server right ?
Please can I have some advice to do what I described above ?


The signalling server is not a dedicated server for your use. It is a meeting place for peer-to-peer clients, nothing more. If you want a dedicated server, you have to set it up yourself on something like AWS (or other providers or setup your own server).

http://gamedev.stackexchange.com/questi ... ent-server
https://www.lynda.com/Network-tutorials ... 389-4.html
http://www.gamespot.com/forums/system-w ... -26276019/
https://technet.microsoft.com/en-us/lib ... 10%29.aspx
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Thu Jan 12, 2017 6:34 pm

@ashley
I already read the multiplayer manual entry (multiple times), but it doesn't explain how to run your own signalling server or what kind of server you need to use for this, and same problem for the "Multiplayer signalling server" Scirra store page, so it was a little confusing and that's why I asked for help ^^'

@gumshoe2029
This is good news ! I prefer not to run a dedicated server if I can because I need to limit costs ^^
In his tutorial, @blackhornet wrote "The lobby is a dedicated server/host that must be running at all times" so I thought I needed to use a dedicated server to do that ^^' (at least that's what I understood when I read that... :-p)

Well now I know I can do that, but I'm still confused about 2 things :

1. How do I install the signalling server on my web server ? (as I said it's not explained anywhere I read)

2. After installing it, what do I need to do in Construct 2 ? Do I have to connect every peer to a "global" room, and then connect them in a sub-room (I'm not sure how to say that ^^') with a limited number of places (here 2, 3 or 4) when they want to start a game together ? (and connect them back to the global room it they disconnect from the sub-room)
Hello !



I'm Steven, a 24 years old French graphic designer and programmer, and it's been 4 years since I started using Construct 2.
B
15
S
6
G
3
Posts: 70
Reputation: 2,573

Next

Return to How do I....?

Who is online

Users browsing this forum: koops and 8 guests