The Forums Are Now Closed!

The content will remain as a historical reference, thank you.

Demigod: Understanding RTS multiplayer and why it sucks

By on May 6, 2009 1:03:23 PM from JoeUser Forums JoeUser Forums

This post here gives a good understanding of where we’ve been.

But here I want to discuss the technical issues that have plagued the built in MP match-making. 

I’m going to start this by sounding like a weasel but it is also the truth: The Demigod MP match-making is basically the same as nearly every other RTS out there. It’s no better or worse. The difference – the fatal difference – is the demographic of who is trying to play multiplayer is radically different and the number of people playing multiplayer is radically different. In short, Demigod’s built in MP, as it is today and has been since launch, is no better or worse than other RTSs on the market today.

Now, before some of you hit the flame key, let’s talk about why the experience of people using the built in MP match making has sucked so bad.

First person shooters vs. Real-Time Strategy Games

In games like Call of Duty or Counterstrike or Left4Dead, you are largely dealing with people picking a server from a list, typically based on ping time, and joining it. The only connection one needs to make is to that server and that server has typically been set up to be as easy to connect to as possible.

In a real-time strategy game, like Supreme Commander or Company of Heroes the connections are peer-to-peer. Each player has to connect to each other player. 

GPGNet (Supreme Commander)

In Supreme Commander, Gas Powered Games developed GPGNet.  The way it worked is that a person would create a game. Subsequent people would connect to the host and then enter the lobby. The game would then try to connect each of the players up and if they failed to connect to one another, they would get a yellow ping and the host would have to eject them.

However, the demographic of Supreme Commander is significantly different from the demographic of Demigod (as SupCom players here can probably tell you).  Casual players of SupCom played mostly single player and the people who played SupCom online tended to be technically savvy and knew to port forward 6073 (that’s the port it used).  And people who didn’t know what they were doing either quickly got ejected from games or learned to set up their routers.

Demigod

Demigod’s setup is similar to GPGNet with a couple critical differences.  First, to get into the lobby you currently have to connect to everyone who is in the lobby before getting into the lobby.  However, if you enter the lobby at the same time as someone else, you will get a yellow (or red 0) ping to them. If you can’t connect to them, someone will have to leave and try again or need to be booted out. 

Super NAT

To improve connectivity we worked with RakNet to develop a kind of Super NAT Facilitator. The idea is that we would make it so that everyone could connect to each other and avoid the whole "people need to open their ports” thing entirely because we knew Demigod would be a multiplayer heavy game.  Unfortunately, the system developed is resource intensive on the servers and when thousands of people showed up, the system started to fall apart.

The result is that people could not connect to people easily inside of the lobby because of the increasing lag (not ping lag but lag from the servers being overloaded) and users would just sit there waiting in frustration to get into a game.

During the first week, we basically lost out because of the well known warez users hitting validation and check for updates so we couldn’t even begin to dig into the issue of the NAT servers being overwhelmed until last week.

Super NAT fails

But we have encountered edge cases that have turned out to be catastrophic. Over the past year it seems, an increasing number of ISPs (we believe, we don’t have proof so I’m not naming names here) are trying to shape their bandwidth use and doing things that make peer-to-peer connections more problematic (bit torrent uses P2P).

The net effect is that some people can only literally connect to 1 or 2 people and are then blocked by their ISP.  So what happens? Other people try to join a game and they cannot connect to that guy who is in the lobby because that guy can’t accept any more connections. So then the Super NAT goes into play to try to find a way which in turn takes more and more resources on the NAT. You get even a handful of those types of users and it gets to be a real problem.

Blocking Port 6000

Then we find out that some routers block incoming traffic to port 6000. If you very quickly get a “NAT connection failed” that is why. You will need to tell your router to knock it off – port forward UDP traffic from port 6000 to your IP (or just have it unblock that port).  I only know of a few routers that do this (Some Dlinks for instance).

So why is this taking so long to fix for those people?

The reason we have to connect to players in the lobby before putting them into the lobby is because Demigod, not us, handle the in game connections.  We hand off the connection (the socket) to Demigod once users are connected.  So we’ve had to spend time developing something that will let us connect people who are in the lobby even which is some very specialized coding.

We have also had to work on setting up Proxy servers for people who just can’t connect and that’s been no trivial thing either.

The build we put up tomorrow is expected to let people get into the lobby as long as they can connect to the host and then connect people once they are in the lobby first by trying direct connect (that’s if you port forward 6000 to 6200 to your PC’s IP) and then if that doesn’t work to use NAT facilitation and if that doesn’t work Proxy servers. But it’s complex with a lot of moving parts being developed by a team that has been working non-stop for weeks.

Will everyone be happy?

No. Because there are people out there for whatever reason just can’t connect to other people on the Internet.  There aren’t many of them but at least we can work with them and see what we can do without those users impacting everyone else.

So that’s where we’re at.

Personally, I think this kind of stuff should be built into the OS.  As a game developer, I can’t even begin to express how frustrated I am that we have to do all this.  If this were an Xbox game or a PS3 game, we wouldn’t have to do any of this. We’d simply hand the user off to the manufacturer’s already included super mega system and it would take care of it.  I could rant for hours on (as you can imagine, I’m extremely tired) how ridiculous that our reputation, game reviews, and our technical competence are being brought down based on how quickly we can implement something that should already exist by the OS maker (maybe Games for Windows Live will eventually evolve into this I hope).

We expect to put up a new BETA of this tonight and if all goes well release it tomorrow afternoon. That’s the plan. It’s not a promise. Given what I’ve learned in the past 3 weeks, when it comes to Windows networking, router manufacturers, and ISPss never assume anything.

+912 Karma | 96 Replies
May 6, 2009 2:53:58 PM from Demigod Forums Demigod Forums

Quoting Annatar11,
In that case it should route you to a proxy which will be able to connect. But if you can't connect to the proxy..
I am not sure if that will be the case. As far as I understand it, every player must connect to the NAT facilitator at some point, to get any connection information in the first place. Be it for direct connect, NAT faclitation or proxy connect.

May 6, 2009 2:56:23 PM from Demigod Forums Demigod Forums

Quoting Ron Lugge,



More like he's irrational on the subject.  It's a very minor bug, but he's blowing it far out of proportion because it's the bug he's decided to hate.

Au contraire.  It is surely irrational to say that a main feature of the game remaining fundamentally broken and unusable after 3 weeks, and creating colossal imbalances against players who are not victimized by the bug in a particular game , is a 'minor' bug'.  Ditto saying that nothing is wrong with it continuing to be neglected.  It seems that Stardock fans, and more importantly, the devs, are blowing the issue way out of proportion by pretending it is 'minor' and sweeping it under the rug week after week.

May 6, 2009 2:56:55 PM from Demigod Forums Demigod Forums

// bah, forum was weird again

May 6, 2009 2:57:54 PM from Demigod Forums Demigod Forums

Currently yes, but that's what I think they're changing? Right now everything goes through the NAT server, but it sounds like they're changing it into a 3-step system. If you have proper port forwards, it won't need to go through the NAT Facilitator. If you don't, then it will try. If it can't get that to work, it'll go to the proxy.

Here's what we've built:

1. If you open ports 6112 to 6200 and port forward them to your IP on your router (this is for people who are familiar with this stuff) you'll get what is called direct connect.

2. If you don't do this, we will try to do a quick NAT connect. This takes longer but works for most people.

3. If NAT fails, you will be connected to our Proxy server system.  This is not going to be super desireable at first because the physical location of the Proxy server is going to make the difference between a good and a lagfest.  When the proxy server is nearby (east coast US player for instance to the east cost proxy server) it's perfectly good.  But, for instance, if you're in Japan and it uses a proxy server in Singapore, you're adding 200ms to your latency which can make the game a total lag nightmare.  so this is clearly your last result.

...

Now, right now, the current version of Demigod uses a connectivity server that ONLY does option 2.  That's because it was decided early on that users shouldn't have to open ports.  This, IMO, should NEVER have been the first option because when you force even technically sophisticated users into this system, you end up having a LOT of unnecessary connections to these NAT servers.

May 6, 2009 3:01:05 PM from Demigod Forums Demigod Forums

I have the ports forwarded and the current beta build of Demigod is already using step 1 (direct connect). However, in order to be able to direct connect, you first need the connection information of the other player in order to directly connect them. You get that info from the NAT facilitator.

May 6, 2009 3:11:12 PM from Demigod Forums Demigod Forums

although i don't think the favor point bug is minor i do think that Stardocks team should be working on the connection issue first. What's the point in fixing the favor points if there are people who can't even play games to get favor points.

May 6, 2009 3:13:39 PM from Demigod Forums Demigod Forums

Im not so sure about that Spooky, if you are direct connecting it should be pretty fast like within seconds. I dont think the NAT resonds that fast.

May 6, 2009 3:17:48 PM from Demigod Forums Demigod Forums

GPG is working on the favor points. Lots of things happen in parallel.

May 6, 2009 3:23:06 PM from Demigod Forums Demigod Forums

Quoting tassox33,
Im not so sure about that Spooky, if you are direct connecting it should be pretty fast like within seconds. I dont think the NAT resonds that fast.
Where would Demigod get the connection information from, if not from the NAT facilitator? This is the first thing that Demigod connects to, when trying to connect to a game. There is no fail safe for that. The NAT facilitator would provide you the connection information and then Demigod will try to set up the connection between you and the player directly. If that fails, the facilitator will do its Super NAT punch through thing. If that fails it will tell Demigod to connect to a proxy server.

May 6, 2009 3:29:20 PM from Demigod Forums Demigod Forums

Ok your right i misread what you were saying. If you cannot connect to someone through the NAT, does that also mean that you cant get info from the NAT for direct connect also?

 

May 6, 2009 3:37:13 PM from Demigod Forums Demigod Forums

Quoting tassox33,
Ok your right i misread what you were saying. If you cannot connect to someone through the NAT, does that also mean that you cant get info from the NAT for direct connect also?

 
The problem is not that I can't connect to someone through the NAT facilitator. I do not even get to the point where the game would actually try to connect to anyone. I am simply unable to connect to the NAT facilitator (or, more correctly, I can connect, but then do not receive any information from the NAT facilitator anymore for unknown reasons, get disconnected and am unable to reconnect).

May 6, 2009 3:55:15 PM from JoeUser Forums JoeUser Forums

Spooky: That's what I'm saying you need to port forward port 6000 to your IP.  I bet you have a Dlink right?

May 6, 2009 4:01:41 PM from Demigod Forums Demigod Forums

Personally, I think this kind of stuff should be built into the OS.  As a game developer, I can’t even begin to express how frustrated I am that we have to do all this.  If this were an Xbox game or a PS3 game, we wouldn’t have to do any of this. We’d simply hand the user off to the manufacturer’s already included super mega system and it would take care of it.  I could rant for hours on (as you can imagine, I’m extremely tired) how ridiculous that our reputation, game reviews, and our technical competence are being brought down based on how quickly we can implement something that should already exist by the OS maker (maybe Games for Windows Live will eventually evolve into this I hope).

Absolutely, I'm so shocked that DirectX has avoided this vital part of the gaming industry for so long.  Every game maker having to build a communications system, messaging and message handling in to their games from the ground up is rediculous.

May 6, 2009 4:14:26 PM from Demigod Forums Demigod Forums

Quoting Frogboy,
Spooky: That's what I'm saying you need to port forward port 6000 to your IP.  I bet you have a Dlink right?
No, it's a Zyxel P-2602HW-D1A with a custom firmware from the ISP. Forwarding port 6000 won't change anything, since I already tried being directly connected to the Internet (DMZ of the router modem), but it doesn't change anything (same thing happens, according to the ImpulseReactor.log). Also, the current beta update connects on port 6002 to 6004 (or so) to the NAT facilitator servers, as far as I know?

I've talked with CariElf about this problem, but we haven't pinned down it yet. I am able to connect to the NAT facilitator, initially. But after that, I do not receive anything from the facilitator anymore and then it's reported as a lost connection. I am also unable to reconnect the the NAT facilitator after that, since the last connections hasn't timed out yet on the Modemrouter. You can see my logs in my thread.

I also sent the ImpulseReactor.log and the CVPMultiplayerEngine CSV to CariElf as she asked me too and additionally sent her some stuff I captured with Wireshark.

May 6, 2009 4:17:20 PM from Demigod Forums Demigod Forums

Quoting Frogboy,
Spooky: That's what I'm saying you need to port forward port 6000 to your IP.  I bet you have a Dlink right?

His post said he did: https://forums.demigodthegame.com/347837

As a programmer I feel for the MP/NAT/Router issues. But everyone knows getting into this it's going to be tough. C&C had atleast a solid month or more of connection issues, games not working, games lagging out...etc. This has occured all the way back to TA in 199x. 

You worry about ISP's touching the packets. Your real concern should be flaky NAT implementation on older Routers that simple drop all pinned NAT connection when they run out of the limited memory they were given. I've owned a router where I could only play MP UDP P2P games with no more than 6 concurrent connections. I new as soon as I execeeded it, all connections were dropped.

I think where Stardock has dropped the ball is in giving us a tool to make this easier. 

People like myself are the "super-nodes" in this support network. All my friends will come to me when this shit doesn't work. I'm the one that has to painstakingly walk them through "what's your current ip, what's your routers ip, did you port forward blah blah blah", "draw me your network...". You know the drill.

Frogboy & Co., you need to take us into account. Leverage us. Give us the tools to help us help you.

There should be a single, simple, .Net app that allows us to test what ports are working, communication to Game lobby servers and login servers. It should display verbose logging of anything relating to the underlying network layer. It should use as much of the true code as possible (don't just make a portcheker with C# and System.Net ).

GIVE US A UNITEST FOR MP NETWORKING. I understand there's complexity in socket-handoff and the code is in multiple libraries. But build us as close to an approximation of full unit test as you can. Allow me to run the test and type in my friends IP, allow him to run the test and type in my IP. Allow us to tweak stuff until we get it working. Give us solid feedback on what's failing as far as the lib knows and where. Let me ping him with UDP packets and know instantly the ports not forwarding.

I don't mean this to be purely a portforward-checker app. This should actively try to open connections and login to startdock stuff that's needed during game making. Go ahead and let us change the default ports from this app as well.

And, while everyone doesn't have a friend like me, you may as well code into your server the ability to do basic echo response requests ( for logged in users only of course, let's not build a DoS machine ) so people can port check themselves.

 

 

 

 

May 6, 2009 4:24:31 PM from Demigod Forums Demigod Forums

Quoting Haree78,

Absolutely, I'm so shocked that DirectX has avoided this vital part of the gaming industry for so long.  Every game maker having to build a communications system, messaging and message handling in to their games from the ground up is rediculous.

MS built it already, it was DirectPlay, Majority of game developers balked at it, It never got the support from MS or the development community it needed to flourish. Plus, 10 years ago, there was a certain "Not Written Here" syndrome from games devs towards anything external.

DirectPlay NAT no longer even exists in Windows Vista. The replacement was "Games for Windows - Live", which no longer handles the lower level networking code.

 

 

May 6, 2009 4:33:07 PM from Demigod Forums Demigod Forums

One quick question please. I thought you said in an early post to port 6100 to 6200 open?  Should I be porting 6000 to 6200 now?

 

 

I know it says it in the post but I just want to make sure. I want to use my newly learned porting skills more ^^.

May 6, 2009 4:55:52 PM from Stardock Forums Stardock Forums

[quote quoting="article"]
If this were an Xbox game or a PS3 game, we wouldn’t have to do any of this. We’d simply hand the user off to the manufacturer’s already included super mega system and it would take care of it.
[/quote]

That's not even close to true, unfortunately. The consoles' networking, as with many other facets of development, generally isn't much better... just horrible differently.

May 6, 2009 4:59:29 PM from Demigod Forums Demigod Forums

Very interresting read, thanks Frogboy

 

SupCom online tended to be technically savvy and knew to port forward 6073 (that’s the port it used)

You sure? When i used to play supcom in the beginning, i remember it was said to open port 6112. Was it changed later?

 

Personally, I think this kind of stuff should be built into the OS. As a game developer, I can’t even begin to express how frustrated I am that we have to do all this. If this were an Xbox game or a PS3 game, we wouldn’t have to do any of this. We’d simply hand the user off to the manufacturer’s already included super mega system and it would take care of it. I could rant for hours on (as you can imagine, I’m extremely tired) how ridiculous that our reputation, game reviews, and our technical competence are being brought down based on how quickly we can implement something that should already exist by the OS maker (maybe Games for Windows Live will eventually evolve into this I hope).

I know very little about these things, but cant you as a publisher send some sort of request to M$ ? Since im sure it would be helpful for so many users and developers.

 

 

May 6, 2009 5:00:47 PM from Demigod Forums Demigod Forums

Quoting Ron Lugge,

More like he's irrational on the subject.  It's a very minor bug, but he's blowing it far out of proportion because it's the bug he's decided to hate.

You're just... wow.

There's no point in trying to explain anything to you guys. You are so stuck in the "man, they're working on it!", "come on, cut them some slack!" and "dude, the connection issues are much worse than your issues" that you could not possibly comprehend what people of differing views are saying.

My only advice to you and others like you is to stop before you reply to this post, think about it for a moment and then hopefully decide to take a more objective stance when reviewing posts people make regarding this subject. That's very unlikely to happen, though, because you've shown that you cannot read a post and take it into consideration. You will simply continue saying what you've already said. In through one ear, out the other.

May 6, 2009 5:08:33 PM from Demigod Forums Demigod Forums

Quoting Gallifray,
One quick question please. I thought you said in an early post to port 6100 to 6200 open?  Should I be porting 6000 to 6200 now?

I was wondering the exact same thing.

May 6, 2009 5:12:48 PM from Demigod Forums Demigod Forums

Well. . .  I suppose the bright side of this is that Stardock is going to have a lot more experience with this sort of thing which will only help with upcoming games and I am sure this is causing them to write new code that can be utilized later as well.

Take your time guys. I have waited this long. A bit more won't matter much. I still love the game.

 

 

May 6, 2009 5:27:56 PM from Demigod Forums Demigod Forums

Quoting comanoodle,
You're just... wow.

There's no point in trying to explain anything to you guys. You are so stuck in the "man, they're working on it!", "come on, cut them some slack!" and "dude, the connection issues are much worse than your issues" that you could not possibly comprehend what people of differing views are saying.

My only advice to you and others like you is to stop before you reply to this post, think about it for a moment and then hopefully decide to take a more objective stance when reviewing posts people make regarding this subject. That's very unlikely to happen, though, because you've shown that you cannot read a post and take it into consideration. You will simply continue saying what you've already said. In through one ear, out the other.
They can play the game. You can even disable favor items in the options so that favor has no effect at all on gameplay. This makes it a fairly small bug now in comparison.

Networking issues keep people from playing the game at all. They're not even to the point of having a problem with favor. Yes, favor is important, but fixing the game for those who can't play is more important.

 

May 6, 2009 5:40:08 PM from Demigod Forums Demigod Forums

Sounds good - can I suggest you forget the beta cycle, its not making it clear whether their is a resolution or not. I'm in Monday's beta - it looks goo dbut I suspect its working because no one else is playing it

 

BTW if you want to see how MP can be  done from a friends/clans/stats and joining angle get a copy of WIC - it is easily the best setup - including its ability to set aside a server for clan matches.

 

Tals

May 6, 2009 5:48:24 PM from Demigod Forums Demigod Forums

Quoting comanoodle,

Quoting Ron Lugge, reply 21
More like he's irrational on the subject.  It's a very minor bug, but he's blowing it far out of proportion because it's the bug he's decided to hate.
You're just... wow.

There's no point in trying to explain anything to you guys. You are so stuck in the "man, they're working on it!", "come on, cut them some slack!" and "dude, the connection issues are much worse than your issues" that you could not possibly comprehend what people of differing views are saying.

My only advice to you and others like you is to stop before you reply to this post, think about it for a moment and then hopefully decide to take a more objective stance when reviewing posts people make regarding this subject. That's very unlikely to happen, though, because you've shown that you cannot read a post and take it into consideration. You will simply continue saying what you've already said. In through one ear, out the other.

 

Fact is, if I couldn't connect at all with DG I would have got my money back. So far favour is broken and so are achievments but I haven't taken it back and got a refund. I just play online, learn the game and enjoy 95% of it until favour gets sorted.

And yes, I get really ticked off when my achievments and favour points are lost. Still, its 5% of the game at best. Get some perspective!

Stardock Forums v1.0.0.0    #108435  walnut2   Server Load Time: 00:00:00.0000953   Page Render Time:

Stardock Magazine | Register | Online Privacy Policy | Terms of Use

Copyright © 2012 Stardock Entertainment and Gas Powered Games. Demigod is a trademark of Gas Powered Games. All rights reserved. All other trademarks and copyrights are the properties of their respective owners. Windows, the Windows Vista Start button and Xbox 360 are trademarks of the Microsoft group of companies, and 'Games for Windows' and the Windows Vista Start button logo are used under license from Microsoft. © 2012 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc.