Author Topic: Multiplayer how to?  (Read 15859 times)

Offline ehendricks

  • Newbie Mark II
  • *
  • Posts: 14
Multiplayer how to?
« on: September 29, 2009, 06:10:20 am »
Sorry to be postin up a storm, but I'm new to the whole multiplayer gaming gig :)

Anyways, I'm lookin to play AI Wars across a network with a friend.  However, I just can't get it to work.  Can anyone offer me a how to on it?  I've got the Hamachi VPN setup, and I'm reasonably geek-literate, but I'm having no luck here.  Thanks again, guys.
Eric

Offline Fiskbit

  • Arcen Games Contractor
  • Master Member Mark III
  • *****
  • Posts: 1,752
Re: Multiplayer how to?
« Reply #1 on: September 29, 2009, 07:51:44 am »
One thing to check is that you're both using the same port (set in settings) and that that port is forwarded on the host's machine (it doesn't matter for the clients). If that's not it, could you be a little more specific about what is happening?
Have ideas or bug reports for one of our games?  Click here to get started with Mantis for Suggestions and Bug Reports.  Thanks for helping to make our games better!

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Multiplayer how to?
« Reply #2 on: September 29, 2009, 08:40:07 am »
The process on a LAN is:
------------------------

1. Host starts game (through lobby or through loading a multiplayer saved game).

2. Client connects to host, either by manually typing in the IP address, or by selecting it in the results list from when it searches on the LAN.

Possible Problems:

A. Client and server have different ports selected in the Settings window (this would only be the case if one of the players had changed this in the past).

B. Client and server are not on the same game version (both must be the same).

C. Client or server has a software firewall, like the Windows Firewall, ZoneAlarm, or something else that is either blocking AI War or the AI War port.  AI War's setup process opens the Windows Firewall port if you use our installer, but if you have something else you might need to either temporarily disable it to test, and then add an exception once you have confirmed the firewall is the issue.

The process over the Internet is:
--------------------------------

1. Host starts game (through lobby or through loading a multiplayer saved game).

2. Client connects to host, either by manually typing in the host's public IP address, or by manually typing in the host's virtual IP address on a VPN solution like Hamachi.

Possible Problems:

A. Any of the problems from the LAN section might still be the issue here, but additionally:

B. Using the wrong IP address.  For Hamachi, the IP addresses always start with 5.whatever, and are shown right in Hamachi.  For a direct connection, use something like http://www.whatismyip.com/

C. If not using VPN software like Hamachi, then you probably are having to traverse a router with NAT on the host's network.  This requires port forwarding for the AI War port.


Those are pretty much the common pitfalls, I can't think of anything else that would generally cause a problem with a game like this.  Hope that helps!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline ehendricks

  • Newbie Mark II
  • *
  • Posts: 14
Re: Multiplayer how to?
« Reply #3 on: September 29, 2009, 07:52:49 pm »
Much appreciated guys.  I'll give her  a run tonight!

Offline ehendricks

  • Newbie Mark II
  • *
  • Posts: 14
Re: Multiplayer how to?
« Reply #4 on: October 01, 2009, 12:28:43 am »
I gave it a shot, but I couldn't get it to work.  When I tried a direct IP connect, it would simply bump me back to the main screen.  It wouldn't show my server IP on the server list, but when I did the direct IP it would show my own IP as a server.  Very confused...

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Multiplayer how to?
« Reply #5 on: October 01, 2009, 12:34:51 am »
If you started a server on the client, that could explain why it temporarily showed the IP of the client in the server list.

The client needs to type in the IP address of the host.  If it doesn't work, and just kicks you back to the main screen, then either:
1. You have entered the wrong IP.
2. A firewall is in your way.  See my notes above.  If you've got Symantec Security Suite, or something like that as far as "Antivirus plus more" goes, you may have a firewall you aren't even aware of.  You'll want to consult the documentation for your specific software to see how to add exceptions, it's pretty easy with most of them.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline irongamer

  • Newbie
  • *
  • Posts: 3
Re: Multiplayer how to?
« Reply #6 on: October 01, 2009, 05:04:05 pm »
Tried to start a multiplayer game using the demo with a friend last night.

1. We both forwarded the correct port on our routers.
2. Windows 7 firewall already added AI War for inbound traffic.
3. I added outbound traffic in Windows 7 firewall for AI War.
4. We checked our IP's, successful tracert as well.
5. Could never connect.

We just get the connecting box and then it just dumps us to the main menu.
That means it couldn't find the host right? There is no feed back.

I know my friend has a vpn setup so maybe he didn't configure stuff quite right.
My tracert to his ip worked fine, his went all over the place however...

Does this just sound like a vpn issue on his end?


PS

I am trying out Security Essentials (http://www.microsoft.com/Security_essentials/) from Microsoft.
But I don't think it is causing the problem.
« Last Edit: October 01, 2009, 05:06:36 pm by irongamer »

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Multiplayer how to?
« Reply #7 on: October 01, 2009, 05:19:03 pm »
Did you forward the UDP port, or the TCP port?  The UDP port is the one that needs to be forwarded.

It's a good point that there is no feedback when the connection fails; I think that's a result of the switch to UDP last month, and I've added an issue for that:  http://arcengames.com/forums/index.php/topic,1588.0.html.  The game certainly used to give feedback in those situations, but when I redid the network apparently that got lost.

The connection process for this game is remarkably simple, in it's simplest form.  It creates a single connection across a single UDP port between the client(s) and the host.  A lot of games use many different ports in large ranges, which makes things very uncertain and challenging.  Not so here.  If you have the UDP port forwarded properly, and you're unable to connect, then some other software is blocking it. 

Could be the VPN connection on your friend's machine, if it is set to route all traffic through the VPN, or it could be a hardware or software firewall.  Using Hamachi can often bypass the complexities that arise because of all the various security software and hardware that people use nowadays, but even that's not a guarantee when it comes to software firewalls.  My suggestion would be to temporarily turn off all of the security-related processes possible, until you find the one that is blocking you.  Then re-enable it, and figure out how to add an exception.

Personally I just use the windows firewall and a NAT router, but my alpha players use McAffee, Norton, and ZoneAlarm; each one required an exception to be added, of course, but beyond that have worked fine.  Depending on the program -- and there are so many at this stage -- adding an exception can be easier or harder to do, but most are not too bad.

Sorry I can't be more specific, but assuming you are forwarding UDP and not TCP (and assuming that you are on a recent version of the demo -- older versions were TCP, actually; you can Check For Updates in the demo same as the main game, if you are on something older than 1.301), then it boils down to the other software and hardware security devices on your machine and network.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Oewyn

  • Sr. Member
  • ****
  • Posts: 330
Re: Multiplayer how to?
« Reply #8 on: October 01, 2009, 05:23:13 pm »
This actually has been happening to me as well recently.

It will take a lot of attempts before I am able to connect to my friend's game.  Sometimes Restarting the client (not the one hosting) and attempting to reconnect works.  I meant to bug this a while back, but never got around to it.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Multiplayer how to?
« Reply #9 on: October 01, 2009, 05:49:30 pm »
This actually has been happening to me as well recently.

It will take a lot of attempts before I am able to connect to my friend's game.  Sometimes Restarting the client (not the one hosting) and attempting to reconnect works.  I meant to bug this a while back, but never got around to it.

Really? Has anyone else here had this?  This is the first I have heard of such an issue.  I would guess packet loss as a culprit here, but it is hard to know for sure.  Were you one of the players with really bad lag back prior to the udp changeover?
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline irongamer

  • Newbie
  • *
  • Posts: 3
Re: Multiplayer how to?
« Reply #10 on: October 01, 2009, 08:26:21 pm »
The UDP port is the one that needs to be forwarded.

Excellent. Ok, I was reading in another post that it only used TCP and not UDP. Was a little confused until you mentioned it was a recent change.

I was talking with my friend and he had not forwarded his UDP port. So we'll give it another spin. Thanks!

Offline Oewyn

  • Sr. Member
  • ****
  • Posts: 330
Re: Multiplayer how to?
« Reply #11 on: October 01, 2009, 09:09:07 pm »
This actually has been happening to me as well recently.

It will take a lot of attempts before I am able to connect to my friend's game.  Sometimes Restarting the client (not the one hosting) and attempting to reconnect works.  I meant to bug this a while back, but never got around to it.

Really? Has anyone else here had this?  This is the first I have heard of such an issue.  I would guess packet loss as a culprit here, but it is hard to know for sure.  Were you one of the players with really bad lag back prior to the udp changeover?

No, I don't really have packetloss issues with the person who I play with, and our pings are great, usually less than 75ms, we usually play w/ network +0.

It seems like it has gotten worse in the most recent updates, but i remember having issues before 1.14 where restarting the game would sometimes help.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Multiplayer how to?
« Reply #12 on: October 01, 2009, 09:26:43 pm »
No, I don't really have packetloss issues with the person who I play with, and our pings are great, usually less than 75ms, we usually play w/ network +0.

It seems like it has gotten worse in the most recent updates, but i remember having issues before 1.14 where restarting the game would sometimes help.

Are you playing on wireless?  If you were having trouble before the changeover to UDP, that is most curious -- two entirely different network stacks having the same issue is strange indeed.  Makes me wonder if a network driver is out of date, or if there's something else interfering. Not that I think the AI War code is infallible or anything, I just haven't heard of this issue until now, and a lot of people play, and if it was on two totally different sets of code that is particularly apt to make me look elsewhere.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline irongamer

  • Newbie
  • *
  • Posts: 3
Re: Multiplayer how to?
« Reply #13 on: October 01, 2009, 11:36:10 pm »
Got multiplayer working.

We both did everything right expect for enabling UDP forwarding.
My router has to set them individually, instead of one option of TCP & UDP. Thought it was a single option, oops.

Thanks for the replies.

May have a handful of purchases coming your way if I can get my friends into it.

We love co-op games (about darn time we see more of these). Almost zero micro management! Great game.  ;D

Offline Revenantus

  • Arcen Games Staff
  • Hero Member Mark III
  • *****
  • Posts: 1,063
Re: Multiplayer how to?
« Reply #14 on: October 01, 2009, 11:37:06 pm »
Great to hear. Have fun. :)