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

Offline Oewyn

  • Sr. Member
  • ****
  • Posts: 330
Re: Multiplayer how to?
« Reply #15 on: October 02, 2009, 10:56:17 am »
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.

No, it was after the UDP changeover that i began noticing problems.

The problem may be that I initially attempt to connect to the server before it's put up, and then all subsequent attempts seem to fail.  After a client restart the 1st attempt always seems to fail and the 2nd one goes through.  With the connection debugging messages re-added to the UDP stack, i might be able to give you more information, but right now all that happens is it eventually times out and brings me back to the join game menu.

Offline Cydonia

  • Jr. Member Mark III
  • **
  • Posts: 96
Re: Multiplayer how to?
« Reply #16 on: October 26, 2009, 05:02:34 pm »
Hi

I got contacted by another German newbie who seked my help (he's bad at english^^). He couldn't connect with his friend. I never played multyplayer before and I wanted to find out how anyway, so now I'm looking for the solution, becuase it doesn't work for me neither^^

-connecting via Hamachi
-firewalls off
-direct IP connecting with the hamachi IP

....
"Server connection was lost or could not be established!"
appears after some time.

we're quite puzzled

...


Oh, it just worked... we can't explain, why. I changed an option in windows, but i don't think this made a difference. I guess we just had luck, or bad luck before^^

But about the thing, that puzzled me:

When I looked in the LAN games list, there was no game. I hosted a game, cancelled, and then found my game in the list. thats nothing spezial, I know^^ but one thing was weird: The host's IP was "192.168.1.4". Thats my home-LAN IP, not online IP or hamachi IP. so I thought i the game always tried to connect via my real LAN and decided to ignore hamachi^^

A friend told me to change the priority of my networks and I put hamachi on the top in the windows vista settings. I rebooted. I think my changes did NOTHING because my IP as host in the list remained "192.168.1.4". BUT IT WORKED!!! We could then direct-connect in both directions via hamachi. Maybe the rebooting and restarting of the game amde a difference, or hamachi had an error or whoonearthknows what changed!

Bear in mind that only I changed the order of the networks in windows, but the connection was possible BOTH ways.

So I really don't know what's going on right now and on whose side the problem is, since I didn't try to conenct to anyone else...

I got to go to bed now, so I can't test on this anymore right now^^
But this guy told me, even though we could now connect, he still can't connect to his friend.

I think that's all I can tell you right know^^ If it works for me now, it's fine, but I'll stick to it until the other players both can play together and I'll translate the possible solutions into German for them^^

I will tell you if anything changed or helped asap.


thx for helping :)
Germany, timezone +1

Thank you for chosing Value-Rep!

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 #17 on: October 26, 2009, 05:09:28 pm »
Hi Cydonia,

Thanks for your post.  Glad to see that you got it working, though I'm not sure what the specific issue was there.  A couple of notes:

1. Generally speaking, your computer will recognize itself as 127.0.0.1, or as its local LAN address, rather than as the Hamachi address or other public address.  This is simply standard for networking in general, and would not affect other people's ability to connect to you via Hamachi or through your public IP.

2. Again generally speaking, most of the time the auto-detection of games across Hamachi will not work. That's because the auto-detection requires some broadcast-type messages that Hamachi tends not to transmit.  Hamachi usually only transmits messages that are specifically sent to a given machine on the other side, if that makes sense.  So this would make you have to do the Direct IP Connect for Hamachi addresses, same as over the Internet, in most cases.  Adjusting the priority order of the LAN connections, as you did, isn't something I'd expect to have an effect on that, but if it does then cool. :)

3. Sometimes the network won't connect the first time, and that's the cue for the client to simply try connecting again if they get the "Could not connect" message.  That second time almost always works.  I'm not sure if this is a bug in the network library we are using or what, but this is something that affects a fair number (but not all) of players.  It seems to be below the level of the game itself, whatever the issue is, so we're having trouble pinpointing that too accurately.

Hope that helps!  Do let me know if you have any other questions.
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 Cydonia

  • Jr. Member Mark III
  • **
  • Posts: 96
Re: Multiplayer how to?
« Reply #18 on: October 28, 2009, 02:22:56 pm »
Ok, it works now.

All 3 of us could connect. What did we do?

Nothing^^


"3. Sometimes the network won't connect the first time, and that's the cue for the client to simply try connecting again if they get the "Could not connect" message. "

I guess that's what did the job^^


And about this "network priority settings": I set it back to the previous settings and it did still work. So as expected, this setting changed nothing^^ I thought I'd found some really big problem for you to solve, but I didn't. Sorry ;D
Germany, timezone +1

Thank you for chosing Value-Rep!

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 #19 on: October 28, 2009, 02:25:25 pm »
No problem -- thanks for the added info!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!