Author Topic: Question from Devs: So how many players does this game support in multiplayer?  (Read 8718 times)

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
As far as hardcoded limitations, I believe the entity-ID partitions simply run out at 256 connected players; that's how it's able to spawn player-generated fireballs (etc) locally without a chance of ID collisions.

But yea, the 800MB heap will die way before 256 players.


As far as auto-disconnect, there's no intentional auto-disconnect from idling, only if your client's AVWW.exe is stopped/suspended/killed, etc.  There used to be a bug that would cause you to d/c while idling on the world map because the client literally did not need to send anything to the server so the server thought you were gone :)  I added a "heartbeat" message that's sent while on the world map to stop that.  While in-chunk the movement updates were already accomplishing that, and I think Chris's recent replacement for movement updates does so too.
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 x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Oh, that's true, I'd forgotten about the ID partitioning.  That would put a more finite limit on it, but still way beyond what would work anyhow for other reasons.
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 zebramatt

  • Master Member Mark II
  • *****
  • Posts: 1,574
So we could all just log on to Toll's server now and sit there all day?

Offline Dizzard

  • Sr. Member Mark II
  • ****
  • Posts: 380
Good luck organizing a time when everyone can be on. How many different nations and time zones are we dealing with here? We may have to have some people just log on and stand there while they go off to work/school/bed.

We don't need everyone, we just need enough.

I'm sure something could be worked out at a time (in and around) that suits enough people.

Maybe you should start a thread detailing an official stress test with the time?

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
So we could all just log on to Toll's server now and sit there all day?

That wouldn't really prove much.  The game could easily handle dozens, perhaps even 256, players just sitting there.  The only limitation would be if each was sitting in a different large chunk, and that wound up using too much heap space.

The question is with players actually logged on and doing stuff, and how that affects performance -- technically speaking I'm extremely confident that the game will not break with 16 or fewer players.  I'd even go so far as to say that it's very unlikely to break at 30 players, and only somewhat likely to break at 50.  By break, I mean crash the server and become unplayable due to resource restrictions being exceeded.

So in the strictest sense, we know we could say "2-16 players supported" and it would be true.  And on a LAN, where bandwidth is no issue, I'm also confident that 16 players will be imminently no problem.  The question is how the bandwidth of 16 players on the Internet, all playing at once, would adversely affect the play experience, however.  And that's what we have no idea on.  With four active players over the internet it's not any different than one player, so 16 seems like a reasonable guess there, too.

I don't know, I'm curious what you guys think -- knowing the above, do you think it's ethical for us to say 2-16 players and just leave it at that?  For a lot of people who play RTS games over the internet, for instance, those support up to 8 players but not with any good speed unless you're on a LAN in my experience.  Some FPS games support 64 players, but not well unless the server hardware is a beast and everyone has a great connection to it.  I think we're well shy of even that territory, but I'm always extremely leery of making false claims.

What do people think?
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 x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
We could also just skip the direct range, which implies hard numbers in the first place, and say 16+ or even 8+, for that matter, if we wanted to be more conservative.  And then adjust that number up more as we actually find out more about where the limits for effective play really are.
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 Toll

  • Sr. Member Mark III
  • ****
  • Posts: 452
While I was running around my server, its RAM-need increased from 230032kB to 230460kB, so from a RAM point of view, it should easilly be able to support well in excess of 16 players. As for the connection, it's a lot trickier; I can't check how much bandwidth I'm using since I connect to localhost, so people would have to connect for me to see that.

Offline Toll

  • Sr. Member Mark III
  • ****
  • Posts: 452
With just one player, the graph is extremely "spiky", with (relatively) big amounts of data being sent in short bursts. The bursts are rarely bigger than 150-200kbps and happen once every three to ten seconds. I'm guessing they'd be compounded if there are several players connected at the same time in the case where they are the result of boss kills (some spikes seem to directly coincide with those), which could get gnarly on lower-end connections, but if the players are spread out among the chunks or regions, they'd probably average out nicely.

I'm logging all network traffic to and from the server, by the way, in case you're curious about it!

Offline KDR_11k

  • Hero Member Mark II
  • *****
  • Posts: 904
I think if you say 2-16 then people will think 16 slots is a hard limit. AFAIK Terraria advertises 256 but of course no computer or connection can handle that, it's just the hard limit. I have no idea what people are saying about Minecraft. Overall I'd leave it open, even if you can determine a maximum for a specific server that doesn't mean anything about other servers, especially a year or two later when hardware has advanced even further.

I'm guessing they'd be compounded if there are several players connected at the same time in the case where they are the result of boss kills (some spikes seem to directly coincide with those)

Hm, are the spawning shards causing that?
« Last Edit: February 28, 2012, 12:54:24 pm by KDR_11k »

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Moving between chunks, most likely.
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 Toll

  • Sr. Member Mark III
  • ****
  • Posts: 452
Moving between chunks are definitely one cause of spikes, yeah. There is, however, a spike immediately when a boss is killed, which I don't think can be attributed to that.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Moving between chunks are definitely one cause of spikes, yeah. There is, however, a spike immediately when a boss is killed, which I don't think can be attributed to that.

Any large number of entities (or whatever else) spawning will cause a small spike.
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 Oralordos

  • Sr. Member Mark III
  • ****
  • Posts: 434
  • Suffering from Chronic Backstabbing Disorder
The spikes are probably the conciousness shards and health drops. As a side note it's a lot harder to run around that server without the planning menu. Pretty much just going by memory where everything is at.

Offline Toll

  • Sr. Member Mark III
  • ****
  • Posts: 452
I've been thinking about the shard drops for a while, actually. I'm assuming the server sends a single message per shard that shows up? Would it be possible for it to just send "fifty shards dropped here" instead, and let the clients take care of distributing them on their end? It looks to me as if the placement of the shards is deterministic enough to actually allow them to be accurately placed, even without the server telling them where exactly every shard is. That should also cut down on those massive spikes, which I assume will be compounded by every player in that chunk (and with five players in a chunk, that spike could easilly reach 1Mbit).

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
There are some ability-based efficiencies that we need to make in general, but no there's nothing deterministic about this game; as with any action game, it's very non-deterministic except for the bits that we already construct on both ends.  There is a problem with the general ability-use messages being more bloated than they need to be, though, and this really underscores that.  It should be reasonably not too bad to make that more efficient, we just haven't had time yet (though we left space in which to do so).
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!