Networking an MMO

Nope I wasn’t offended or anything :slight_smile:

Here’s a good reference about best networking practises with tons of resources:

The part about snapshots compression is pretty much your answer about handling a large group of players:


Yeah was going to say using distance based LOD and networking code doesn’t seem that novel just more like common sense. I always thought the barrier was client CPU/GPU processing. If each ship is somewhere between 20-100k polys, displaying 1000 nearby ships would probably hammer the average pc into oblivion. I think games like EVE can only do it because it is point and click with no real physics or detail.

I remember an old livestream from one of the SC devs playing around in Cry Engine he was spawning Bengal carriers into the editor. I think they were around ~2.5mil polys each at the time. After about the 8th one, Cry Engine crashed with an out of video memory error.

1 Like


Gafferongames is great! More stuff like this please :smiley:


Yeah, you would THINK CIGs graphics artists would have some sort of clue when it comes to the number of polys in an asset.


The devs from MAG stated that their tech easily supported 1024 players and beyond, they just chose to stick with 256 players for that game (which wasn’t that bad of an idea. Near the end of that games lifespan it was hard to find enough players even for the 128 player matches). They easily could have gone higher, but never got the chance to do so, due to the closure of the dev…

You’re missing my point.

The backend server solution may have the horsepower, but is it necessary?

Let’s pack 1024 people into your local high school hallway. Exactly how many of them will YOU be able to interact with?

Now place those 1024 people in your basic online “city square / merchant area / arena”

Does having ALL 1024 people in an area ADD or SUBTRACT from the gaming experience? How many players do you have to wade through to get to that vendor? (I wonder if an MMO can induce claustrophobia)

Imho, a single shard universe runs the risk of having too many players in a certain area. Why not scale for player experience, and use the extra resources for other aspects of the game

INS Kickstarter promise was…

Engage 100’s of players in epic space battles involving everything from small, nimble interceptors up to immense, powerful capital ships.

So at the minimum that needs to be possible, will we be able to have even one server filled with those numbers is a different story. Have a look here, if you have access.

1 Like

Well, there’s your reason for having 1000 players in a market: there are likely three or four thieves in there, plus a possible assassin. Which ones are the ones to watch out for? Can I spot them at a distance? Is spotting them amidst the crowd a skill unto itself? Would the thieves and assassins be particularly interesting if there wasn’t a press of humanity in the marketplace? You’d see the 20 players in the market, check them all out, establish that none of them was a thief or assassin and move on. The 1000 players will overwhelm your senses, allowing thieves and assassins to do their thing.

How about the case where I need to work with a few players who are far from me in a crowded area? A scout commander wants to track his scouts, but they’re scattered all over the fleet engagement and the scout commander can only see the closest 100 players.

Ultimately, it depends on the gameplay, and we’re not used to seeing games with 1000 players in the same area. We don’t know how gameplay would unfold. Can you be motivated by the speech of William Wallace before battle if you only hear the bits when he’s standing close by? What about seeing the size of your own army vs the size of the enemy army? “I’m sorry, I can’t even see the enemy army because I’m surrounded by 500 buddies. Well, 463 now, because we never saw the enemy archers who just fired blind based on the report of an enemy scout.”


That depends on what you consider an interaction, among other things. Having 1024 people in an area can both, add or subtract to a gaming experience, depending on the game mechanics, personal preferences etc.

I can only agree wholeheartedly with what JB wrote (which, for the record is a rare thing to happen).

If you really, really, really want something huge, where you have multiple 100+ space battles in the same star system but at different areas away from each other, then each “instance bubble” is its own separate process from everything else.

Basically you have one process for the whole system, telling you where people are far away, battles that are happening far away, and so on, and this is what the clients are connected to.
Then, when a battle gets large to the point that it’d slow down the rest of the server, you break off and spawn a new process that just runs that battle around an area, dealing with all the clients and things going on in that area. That receives information from the main process that people are connected to, then sends back the tick data to output to everyone.

This is ultimately less efficient, as in more costly, because you are managing a socket between the two processes, which has extra overhead, but it’s much more scalable.

But Flavien knows all these things. It’s a matter of priority, scope, funding, etc.
It’s possible to have hundreds and hundreds of ships battles, that are parts of a war of thousands of ships in a star system spread around a bit. But it’s more work. If this game won’t have the player base for that, there isn’t any point.

Just spotted this in the SC reddit. In terms of networking SC, CIG are sponsoring an industry veteran named Glen Fielder who I recognised from that Gaffer on Games site that Flavien linked to.


1 Like

This video is a very good explanation:

So what you have is a compromise between delay between clients and having a smooth gameplay experience. I urge everyone to watch that video even if you never played Overwatch since it does point at a lot of common techniques used in games to give you the illusion of a smooth gameplay that is fundamentally limited by the laws of physics.

So in massive games what you need to have is a complex combination of several techniques (the balance of which is something the developers have to nail) and, perhaps, try to have a dynamically-scaling per-client interpolation (objects far away update less often, objects close to you update more frequently).


For all the shit people give Roberts, I think he’s done a good job at hiring and managing his company besides employing his wife as a manager. Even with the alter, it seems like he’s made up for it with his other business and development decisions.

As far as that library, huh that reminds me of another space game’s network code. Vendetta or something?
Usually TCP is used as it virtually guarantees delivery, but there’s much more delay and overhead. I’ve seen UDP mentioned a lot but I’m not aware of it being used outside of that one indie and not very successful Tachyon: The Fringe like game.

Personally, I never really liked the tick based networking like in Overwatch.
Dota2 also uses ticks, and you have these REALLY weird interactions with two things happening on the same tick.
Even with ticks, you can avoid that kind of by taking the order things came in minus the delta, but ehhh.

I don’t really understand why event driven networking can’t work, or a hybrid.

I also don’t like “favor the shooter” as much. I favor UT netcode that’s more about quick reactions to dodge things. I think it makes sense on hitscan, at least.

1 Like

I’m sure Flavien and most other people can attest to this.

UDP should be the protocol of choice when sending time sensitive packets.

Flavien provided the previous post that had the link to:

This guy REALLY knows what he’s doing, when it comes to game networking. It’s WELL worth the read, and even his support.

Is using UDP actually prevalent and I’m just unaware? I thought it was very rarely used in games.

Here’s a Stack Overflow Q&A about UDP vs TCP.

Note that there is a reply in there suggesting that each is appropriate in its own way.

The warp prototype used TCP - but I never threw 500 or 1000 connections at it either. Never more than a handful at a time.


UDP is very common in FPS games, as well as any games where latency is more important than receiving 100% of the packets sent.

Battlescape is UDP.

1 Like


But will Battlescape use libyojimbo?

No it won’t.

1 Like

It is designed around the networking requirements of competitive realtime multiplayer games such as first person shooters and action games. As such it provides the absolute fastest, most time critical networking layer over UDP, with a client/server architecture supporting up to 64 players per-dedicated server instance.

1 Like