Lately I’ve been playing a lot FFXIV and Black Deset Online, during my game time I started to think about the millions of events that happen in the game and how really complicated it can be to create a server for an MMORPG (I’ve created some game servers before but just as research)
So I asked myself, how well can Elixir handle a server of this type?
From what I’ve seen most game servers are written on a combination of Java and C/C++ for all the internals like entity system, networking, geometry engine, inventory management etc…
So the intention of my previous question is how well Elixir can handle such things?
We also know that Erlang VM isn’t really good at doing calculations (with those kind of servers relly a lot), but fortunately we have NIFs that can help solve this problem, tho is a good idea in doing such thing as a nif? The best example could be all the geometry engine or the positioning system, tho Elixir could handle things like speed hack controls etc…
So what do you think?
Is Elixir capable of handling all the most important parts of an MMORPG game server?
Would it be more costly to run compared to writting it on another language?
Do you think is there any direct benefit on using Elixir on this case over other solutions?
Do you have any experience handling similar projects? How was the experience?
Could be, but IMHO it wouldn’t be worth it. I mean, you could use it as a network layer and run game loop in NIF or port, but as network isn’t the most problematic layer of such game you can use any other library to handle that directly in language you will be using as a game-loop. So I wouldn’t say that this is totally unusable in such case, but I wouldn’t say that you would get much advantages of using BEAM there as there is not that much benefits.
So as component - yes. As a whole system - no.
There are companies that are providing MMO capabilities for games and are using Erlang, for example https://demonware.net.
Well that’s not what I was trying to say in this post, the idea could be of using NIF only in places where is really need like the geometry engine, everything else just handle with Elixir which I think is really capable of
Realibility and easy to mantain could be a really good benefit. And if handled weel Hot code upgrades is a killer feature (tho not easy to achieve)
Oh I didn’t knew about them, that’s good to know ^^/
I think Elixir works pretty well for an MMO server. I’m writing a text based MMO and have never regretted it. That’s ExVenture - https://exventure.org/ I actually don’t think I could have done this without Elixir.
I also know someone who was doing a server for an existing MMO and they were doing lots of binary pattern matching on packets which must be stupid hard on not Erlang
The process architecture of Erlang works perfectly for a very stateful system such as an MMO. I say give it a shot!