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

0 favourites
  • 4 posts
From the Asset Store
Find pleasure in juggling balls with this basic HTML5 template
  • 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
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • dhoeke

    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:

    [quote:20p4rtw9]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.

  • 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!

  • I have the same problem

    But should changes be made only to the signaling server or even to peer networks? Because if it has to be done on peer networks it becomes a problem, it's impossible

    I think I understood that I could use websocket or similar but I have to review the whole game, now that it works at 99% it's a real problem

    Thanks for any suggestions

    Mimmo

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)