Hacker News new | ask | show | jobs
by s3cur3 1784 days ago
The limitation is more about the number of players we can have in the same area—if you had a bunch of players equally spaced around the globe, I'm pretty sure we'd saturate the Ethernet link before running out of CPU on a big (say, 32-core) VM. The CPU cost (and outbound network bandwidth) of a player scales with the square of the number of other players who can potentially "see" them.

In my scalability testing, we could handle upwards of 1000 players in the same 50 nm by 50 nm square on my 8 core dev workstation. That's pretty far beyond the limit of what would actually be _fun_ to fly the sim with. It becomes pandemonium even with 100 planes in the same area. We could easily do a dozen pockets of 100 planes in the same area even on our current 8 core VM.

3 comments

>In my scalability testing, we could handle upwards of 1000 players in the same 50 nm by 50 nm square on my 8 core dev workstation. That's pretty far beyond the limit of what would actually be _fun_ to fly the sim with.

But it would make a great fit for an MMO. AFAIK there aren't any of those now levering Erlang / Elixir. If anything they're doing the opposite and trying to contain people in smaller and smaller instances.

Didn't square enix do something or another with elixir for an mmo?
Do those 1000 send to all 1000 or are those 50nm squared partitioned so only players in a certain range see each other?
In general, we send each player all the planes that their in-game map could possibly show (which is usually something like 140 statute miles by 140 statute miles).

We could one day be smarter about this and only send you everything if your map is actually open, and otherwise limit it based on your field of view. That hasn't been a priority yet, though.

Does X-Plane feature projectiles at all (guns, missiles)? If so, do those have to be sent over the network to deal with collisions with laggy hit boxes and such?
afaik threads in erlang are processes so where do you store and how do you share the players positions between cores?
Thank you for the detailed answer. 50 nm here is 50 nautical miles I assume?
Correct! Sorry about that. :)