By Kevsoft on May 20, 2019 at 9:05 AM
  1. Kevsoft

    Kevsoft XLiveless Dev
    Staff Member Administrator

    Joined:
    Oct 24, 2017
    Messages:
    370
    Likes Received:
    379
    Trophy Points:
    63
    Hello fellow AOEO players!

    In the last couple of weeks we have been looking into how we could improve the connectivity between players. Given that all multiplayer games with the BANG Engine (AOM/AOE3/AOEO) are based on peer-to-peer the only way to currently play with each other is with the help of UPnP, port-forwarding or via a private VPN-System like Hamachi. Unfortunately UPnP doesn't always work and port-forwarding is a hassle to set up, especially for those who are not really tech-savvy.

    We decided to look into how other platforms like Voobly, GameRanger or AOE3 work and deal with this issue. To give an understanding why those platform offer better connectivity than we do, we have to look what techniques/technologies are possible:

    • Manual port-forwarding (Can be used with Celeste)
    • UPnP (Can be used with Celeste)
    • Relay-Server
    • NAT-Punchthrough (Coming up!)

    Manual port-forwarding
    Port-forwarding is the most complicated to setup but also the most reliable way to get people connected. If you port-forward you are basically saying the router: "Hey, map my external ip with the port 1000 to my internal-ip (my computer) with the port 1000". So if someone tries to connect on Port 1000 it will reach your computer.

    There are some problems though: First of all it is a hassle to set it up and secondly not everyone has admin access to the router. Especially if your outside of your Home-LAN (like Mobile Networks, Public WiFis, ect...). Those people then have to rely on UPnP or if that fails they have to use Hamachi which locks them inside a VPN-System.

    UPnP
    UPnP is a technology that allows applications to request temporary port-forwarding-mappings for application, basically as if your application would configure the router. Also this technology is not the best solution as the ports may already be reserved for other applications or other computers and that UPnP might be disabled completely or not available on the router you are logged in to.

    Relay-Server
    A relay server is basically a server that stands out as a middleman between the game connections. It is basically how Hamachi or VPN in general are working internally, but a Relay-Server is more application/service-specific. It would allow players to connect to each others regardless on what network/router they are behind as the relay server is a public server that just redirects the messages. So why haven't we implemented such a service?

    Well, first of all running such a service would mean extra cost for us. It would require running another public server that would probably eat lots of networking resources. The second reason is also in the interest of the players: latency. Having a server in between would mean extra latency between the players. To have a relay service with low latency guarantee it would require us to not only to setup one relay server but having to setup multiple ones around the world.

    Coming up: NAT-Punchthrough
    NAT-Punchthrough is a bit complicated to explain as it exploits a mechanism in the router that is widely used in P2P-Networking. Basically we send a networking request from UDP 1000 to our Celeste server. When the request is sent, your router will add a NAT-Entry. See it like a "callback-number", because obviously there must be a way that the Celeste service can send a response. Now we can tell other clients about this "callback-number" as they can also use this to send information to the other client. These NAT-Entries are temporary and only open between 30 seconds and 10 minutes from the last networking request sent (depending on the router), so these requests to the Celeste service has to be done just right before a multiplayer session is opened. If you're interested in this technique you can read about it here: http://bford.info/pub/net/p2pnat/

    The advantages with this technique is clear:
    1. Multiplayer games can be played even if the player doesn't have admin access to the router or if UPnP is disabled.
    2. Multiplayer games can be played even if the port 1000-1005 is blocked by the router.
    3. Multiplayer games can be played with the other ones having UPnP enabled or if they have manual port-forwarding active. So it doesn't matter if your co-op partner doesn't use NAT-Punchthrough.
    Possible disadvantages:
    1. It is harder to find out why a connection has failed. (Did the NAT-Punchthrough-Request was too early? Was it too late? Did the router block it?)
    2. It is not guaranteed to work, but the success rate is very very high across router manufactures.

    Coming with this update, NAT-Punchthrough will be enabled by default as the advantages outweighs the disadvantages. In the launcher you will still be able to switch back to UPnP/Manual-Mode in case NAT-Punchthrough doesn't work.

    How reliable is this technique?
    According to the paper about NAT-Punchthrough the success rate is roughly at 80%. It might be even higher, given that the paper was written back in 2005. In any case you can always switch back to other modes (WAN/LAN/Hamachi).

    What about players behind the same Network. Do I need to play in LAN-Mode?
    We haven't tested it yet, but in theory it should work. If, for example, the external port 1000 is already used by a player behind the same LAN-Network, then the router will assign you a different one and map it to your local port on your local ip address. If anyone can confirm that it works or doesn't work, then let us know.

    HELP! It doesn't work :(
    Beware! When you first try out this new network mode, the windows firewall will alert you if you want to allow a new connection. Because of this request your first connection attempt might fail. Even if your first connection attempt doesn't work you should attempt a second one as your fellow players you're playing with might have to accept this firewall request as well.

    What cases have been tested?
    * 1v1 Arena
    * 1v2 Arena (required a 2nd connection attempt)
    * 2v2 Arena
    * 1v1 Sparta
    * 2v2 Sparta (required a 2nd connection attempt)

    Conclusion
    I hope that with this new technique we sort out most of the connection issues. We will hope that we can optimize it in the future and sort out any issue that might come along the way.

    Thank you for reading and happy battling!

    - Celeste Development Team
     
  2. Loading...


Comments

Discussion in 'News' started by Kevsoft, May 20, 2019.

    1. WiriWout

      WiriWout Moderator
      Staff Member Moderator

      Joined:
      Nov 10, 2017
      Messages:
      110
      Likes Received:
      110
      Trophy Points:
      43
      If this turns out to work as well as stated here it will be amazing. Thanks a lot for your efforts!
       
      Ardeshir likes this.
    2. Exclusive0r

      Exclusive0r Immortal

      Joined:
      Nov 5, 2018
      Messages:
      396
      Likes Received:
      229
      Trophy Points:
      43
      Certainly sounds great to get more co op's going too ...
      Now I was thinking about this, but my angle was from Celeste Launcher and using Freelan open source

      https://www.freelan.org/#

      Open-source How else would you trust a software ?
      Freelan is free software, released under the GPLv3 license. By "free", we both mean free as in "free beer" and free as in "freedom". You will never pay a dime to download, use or update the software: everything comes for free, forever.

      You can easily access the source code and make sure what happens to your data. We believe this is paramount when dealing with security software: if the source-code is closed to your eyes, how can you be sure that it does what it claims ? How can you be sure it contains no security flaws ?

      Being free software means you can use freelan's code in your own free project to create awesome stuff ! Do whatever you want, and share it with others in turn !
      But now I read this it's like well let's try it :)
       
    3. CrimsonCantab

      CrimsonCantab Berserker

      Joined:
      Sep 14, 2018
      Messages:
      115
      Likes Received:
      99
      Trophy Points:
      28
      THIS. IS. HUGE!

      Connectivity Issues are the largest portion of the barrier-to-entry for new players trying out PvP, especially with 2v2. I agree that NAT Punch-through is the biggest bang-for-your-buck in terms of what options there are out there that we have not used yet.

      Good work, devs!
       
      Ardeshir and WiriWout like this.
    4. Ardeshir

      Ardeshir Immortal

      Joined:
      Apr 8, 2019
      Messages:
      985
      Likes Received:
      528
      Trophy Points:
      93
      Taking a second attempt to get a 2v2 lobby going is going to be much much better than not being able to 2v2 even after everybody has forwarded ports, and having to use hamachi-LAN anyway. Thanks for looking into and trying this folks!
       
    5. Kenji03

      Kenji03 Berserker

      Joined:
      Jul 17, 2018
      Messages:
      118
      Likes Received:
      108
      Trophy Points:
      43
      Thank you for this, this is the kind of Quality of Life updates I came back to AOEO hoping to find -- keep up the good work!
       
      TheSpaniard likes this.
    6. ThorkellMoon

      ThorkellMoon Spearman

      Joined:
      Dec 2, 2018
      Messages:
      5
      Likes Received:
      1
      Trophy Points:
      3
      Just wanted to give this a thumbs-up as someone who has multiple players in the same household. Looking forward to testing this out!
       
    7. TheSpaniard

      TheSpaniard Berserker

      Joined:
      Jan 15, 2019
      Messages:
      128
      Likes Received:
      238
      Trophy Points:
      43
      I know i'm late to the party, but.... now that this has been live for almost a month, do we have any data/statistics on improved connectivity? Or even anecdotal evidence of how this has improved connectivity? Any further information or updates?
       
    8. hARDCORE85

      hARDCORE85 Spearman

      Joined:
      Sep 15, 2019
      Messages:
      6
      Likes Received:
      0
      Trophy Points:
      1
      its look like to play online with a mate on same network/ router dont run!
      # I took my buddy in party - no problems
      # one player start a coop mission, sending a invite for mission to the other one -no problems
      # game message "Mission/ game will be created" shows on both players. After some seconds the loading message abort with entry in chat window "game cannot started" (sry i translate from german game language"

      We have do first:
      - Nat puntrough ist configured
      - game helpers -> Windows Firwall all valid
      - no seperate Portforwarding is configure on Router (useless if two players want use same ports...)
      - UPNP is enable on Router
      - both player can play online singleplayer mission
      - both Computer Windows 10
      - both player have start with new civilations lev ~5
      - there is no special antivirus or firewall software installed

      edit: we cannot added us as friends in this game. we didnt reseive a invate from each other
       
    9. hARDCORE85

      hARDCORE85 Spearman

      Joined:
      Sep 15, 2019
      Messages:
      6
      Likes Received:
      0
      Trophy Points:
      1
      we tested to play over hotspot via mobilphone and that runs! :)
       
    10. hARDCORE85

      hARDCORE85 Spearman

      Joined:
      Sep 15, 2019
      Messages:
      6
      Likes Received:
      0
      Trophy Points:
      1
      second run, other hotspot via mobile phone... didnt can play together! Same problems! Only we fix our problem with added us as friends... do it with the celeste launcher, not ingame! :)
       
    11. hARDCORE85

      hARDCORE85 Spearman

      Joined:
      Sep 15, 2019
      Messages:
      6
      Likes Received:
      0
      Trophy Points:
      1
      i had again trouble to play coop, but with hotspot! I could only soved it, do port forwarding on my router. my buddy play over the hotspot! :confused:
       
    12. Ardeshir

      Ardeshir Immortal

      Joined:
      Apr 8, 2019
      Messages:
      985
      Likes Received:
      528
      Trophy Points:
      93
      I'm not sure if you can yet play on the same network without switching to LAN mode (and removing the chance of say, 2v2ing or 3/4 v ai online together).
       
    13. serkanzz

      serkanzz Spearman

      Joined:
      Feb 17, 2020
      Messages:
      6
      Likes Received:
      2
      Trophy Points:
      3
      i m having disconnect issues, returning me to main menu, PLAY button.
      and no reason, no error messages.
      but i checked xlive.log file, i dont familiar with these messages, just saw :

      NAT Punchthrough Enabled ..

      an error, i dont know, what should i do !
       
    14. Ardeshir

      Ardeshir Immortal

      Joined:
      Apr 8, 2019
      Messages:
      985
      Likes Received:
      528
      Trophy Points:
      93
      Are you on cable or wifi? Has this error only just started or has it plagued you ever since you started/returned to aoeo? Do you get lag or disconnects in other games? Aoeo is notoriously reliant on consistent connections with minimal packet loss, so even if you don't dc in other games it may be happening in aoeo due to packet loss, but if you DO have regular disconnects in other games it's definitely going to be a problem.

      This might only have minor impact if you're on cable, but it will be a huge benefit if you're on wifi and can't use cable: Can you minimize the number of 3G/4G wireless devices connected to or physically around your modem router? Take phones, tv's and tablets off wifi when you're not on them and wanna play aoeo. Don't keep carkeys or garage door remotes within 10 metres of your modem, etc.

      NAT Punchthrough is just a setting in the multiplayer options in the launcher. That's used to ensure the right local IP (computer or other device) on a building's network is the one being sent the data from the other player/s in coop/pvp and the Celeste server.
       
    15. serkanzz

      serkanzz Spearman

      Joined:
      Feb 17, 2020
      Messages:
      6
      Likes Received:
      2
      Trophy Points:
      3
      Hi Ardeshir,

      Me on wifi.
      A little while ago started. About 2 weeks.
      I dont have lags.
      but maybe more device connected to wifi system :(

      "Don't keep carkeys or garage door remotes " ovvv,,, omg, i will consider these.

      btw: can i also manualy increase timeout time of Aoeo server connection ? :D

      And also when dc happens, which log file i should check ?

      Thanks for support.. You are good at your job.
       
      Ardeshir likes this.
    16. Ardeshir

      Ardeshir Immortal

      Joined:
      Apr 8, 2019
      Messages:
      985
      Likes Received:
      528
      Trophy Points:
      93
      I don't think so

      Probably just xlive.txt in your c:users/username/documents/spartan/ folder... gotta scroll to the bottom to get the most recent updates to it. It should be sorted by date and time.

      Hey thanks! Lets hope we can get this fixed for u
       
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice