4 ms·
Hey folks, I’m Tyler! I’m the guy who did the original work on this. I’m happy to answer any questions! You might also be interested in the discussion happenin
by s3cur3 5y ago
Hey folks, I’m Tyler! I’m the guy who did the original work on this. I’m happy to answer any questions!
You might also be interested in the discussion happening on the associated Twitter thread:
https://twitter.com/elixirlang/status/1420782381825503240 https://twitter.com/elixirlang/status/1420782381825503240
- Zababa 5y agoThanks for the article, that was a nice read! How much concurrent player do you think you could handle at most?
- s3cur3 5y agoThe 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.
- Zababa 5y agoThank you for the detailed answer. 50 nm here is 50 nautical miles I assume?
- s3cur3 5y agoCorrect! Sorry about that. :)
- bullen 5y agoDo those 1000 send to all 1000 or are those 50nm squared partitioned so only players in a certain range see each other?
- s3cur3 5y agoIn 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.
- temp_account001 5y agoDoes 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?
- bullen 5y agoafaik threads in erlang are processes so where do you store and how do you share the players positions between cores?
- Bayart 5y ago>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.
- dnautics 5y agoDidn't square enix do something or another with elixir for an mmo?
- jbluepolarbear 5y agoThis is really cool. How many players can you handle in close visible proximity? What’s the bandwidth usage for spread out states? What’s the bandwidth usage for the max player state in close proximity? How much is client driven vs server? Are you doing data compression on the plane states? Probably easy to make predictions of a plane as it’s not changing speed or direction very fast, which where I see the low poll rate coming in. Looks like it was a fun project to work on.
- brainless 5y agoHey Tyler, this is really nice to go through. I just heard your podcast (1). I do not know of X-Plane. I want to ask: do you share the nearest-region data to all planes within a region only for informational purpose or is there a crash possibility and you take planes out of the simulation, etc.? I mean like in other MMO games, can players hurt each other and that information actually affects other client apps? That is where, I feel (I am new to this too), the global state mutations become more expensive right? 1. https://thinkingelixir.com/podcast-episodes/035-x-planes-elixir-mmo-with-tyler-young/ https://thinkingelixir.com/podcast-episodes/035-x-planes-eli...