[Multiplayer] Which ports does C2 use? [solved: NAT]

Discussion and feedback on Construct 2

Post » Wed Nov 25, 2015 12:48 pm

Hi everyone,

I'm currently developing a mutliplayer game and - the typical issue: Port forwarding!

I've tested connectivity with some of my friends, and just two out of 5 could connect properly with my game (btw, with the standard pong game, too - we've tested that for obvious reasons). When we use Hamachi Login (which establishes a virtual LAN), all connections are possible.

When no connection can be established, the "Kicked" message is present for the peer just upon login to the room.

So, I've read that C2 uses UDP.

Could someone tell me which ports must be forwarded / open to properly play a Construct 2 multiplayer game?

Thank you so much,

- Dominik
Last edited by dhoeke on Sat Nov 28, 2015 8:10 pm, edited 1 time in total.
B
5
S
1
Posts: 33
Reputation: 462

Post » Wed Nov 25, 2015 1:24 pm

@dhoeke

dhoeke wrote:Hi everyone,

I'm currently developing a mutliplayer game and - the typical issue: Port forwarding!

I've tested connectivity with some of my friends, and just two out of 5 could connect properly with my game (btw, with the standard pong game, too - we've tested that for obvious reasons). When we use Hamachi Login (which establishes a virtual LAN), all connections are possible.

When no connection can be established, the "Kicked" message is present for the peer just upon login to the room.

So, I've read that C2 uses UDP.

Could someone tell me which ports must be forwarded / open to properly play a Construct 2 multiplayer game?

Thank you so much,

- Dominik


Have you read the Manual entry for the Multiplayer Object?

Besides all the information regarding the plugin, it also links to 4 tutorials created by Ashley.

There is also this post from Ashley re: port forwarding:

Multiplayer does not use any specific port (see Multiplayer tutorial 1: concepts) so port forwarding will not help. You need to make sure your network configuration does not block large port ranges (so peer-to-peer traffic can work), and that all machines are connected to the Internet if you're using the Scirra signalling server. Beyond that it's entirely specific to your network configuration - you need to check the setup yourself (or whoever is the network admin) to ensure it's not blocking WebRTC connections.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
126
S
29
G
73
Posts: 5,086
Reputation: 51,992

Post » Sat Nov 28, 2015 8:07 pm

@zenox98

Thank you so much!

What I found out based on the information found in your links is, it all appearently has to do with NAT, Network Address Translation.

If you do not have NAT turned on in your router settings (plus, some routers even need a "dmz" feature to be enabled), then there is no connection possible. Port forwarding will not help because NAT means that the game uses a dynamic port range, not a fixed one. This is a common issue even for big games like Call of Duty. Since my router has this enabled by default, I never even came accross this topic.

Anyway, just leaving this here for fellow developers looking for the connectivity issue - turn on NAT in your routers, guys!
B
5
S
1
Posts: 33
Reputation: 462


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests