Pondo

Pondo

Hello to you

I create a private server for World of warcraft, is Elixir a powerful enough language for this kind of project?

Showing Posts 1 to 10

yawaramin

yawaramin

I’m not familiar with World of Warcraft servers, can you explain a bit more what kind of server this is? What does it do mostly? What kind of traffic are you expecting? I/O bound or CPU bound? Etc.

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Elixir and the BEAM have been used for game servers before so I’m sure it would do well. Your main challenge will be implementing all the logic which I’m sure is non trivial. If your goal is to have a customizable WOW server you may get what you want more quickly by forking some existing open source implementation.

Pondo

Pondo OP

The most popular multiplayer games like World of Warcraft, Call of Duty or Minecraft, as well as thousands more online games, work basically the same way. Players install a “client” for the game on their computer and then connect to the game servers via an internet connection. There are several different servers that are required to play these games.

Before you can actually start playing, you need to get into the game. So you need login servers. Whenever you are trying to connect, the login server is confirming the data of your account in the database to know who you are. After you select a character from your character list, the login server acts as a road sign, guiding you to the correct game server.

These servers are generally distributed around the world as it guarantees access to the game even if one of the login servers is not available. If a server fails, players can still enter the game through the other servers.

After having checked the data of a player, the client is connected to the game server. That’s where the game happens. Games with very large maps host a game world on multiple servers.

Game servers also regularly send customer data checking if the player is still online. If they do not get a reaction, the character will be “kicked” from the game.

The tasks are quite varied, for example for map generation I think it is quite demanding in CPU / Calculation and for the rest moving players, quest etc. I don’t know too much

WolfDan

WolfDan

Only Elixir? I don’t think so, Elixir is weak on calculations, so for example heavy calculation systems like geometry engine, pathfinders will not perform really well on Elixir, so that stuff can be done as a NIF (could be rust or c++ I’d recommend Rust tho)

Everything else Elixir is capable of it, all the spell cooldown management, inventory systems, battle sytems, markets etc… could be done with Elixir without any problem

Tho keep in mind that Elixir is a functional language so some solutions like Entity systems and such can take a bit more of effort compared to OO languages

adrianrl

adrianrl

Hi, I’m confused. If you already have a private server, where do you want to use Elixir? or is it something that you want to build from scratch?

Let me start by saying that it’s not an easy task, popular implementations of World of Warcraft servers are written in C++ and took years to get where they are now, with hundreds of contributors helping with the code. You need to communicate your app with the WoW client, recreate maps, battlegrounds… implement the structure of the database with the skills, quests, achievements… I’m being scared by only thinking it.

Anyways, Is Elixir suitable for gaming servers? Yes. Is Elixir suitable for high performance gaming servers? Probably not, or at least not alone.

Pondo

Pondo OP

Hello,

What do you mean by high performance? I see… I might get my hands on a Minecraft server to see

But then, if I use another language for the map generation, Elixir can do the rest?

Do you consider Counter strike global offensive or Leauge of legend servers as high performance servers?

kokolegorille

kokolegorille

Most of those games are made with engines, for example, unity3d, unreal engine, godot… (c++, c#).

There is now a c# library for connecting to phoenix websocket, called Fenix.

You don’t need to write a new engine in Elixir, but You can use existing engine, and use Elixir as communication (match maker, presence, chat, lobby etc.)

I read some blogs about Elixir and Unity3D, and tried also, but it’s heavily under rewrite (Network, Entity system). It’s funny how they are trying to use multicore processing with there new ECS. It looks they have discovered benefit of immutability, and functional programming :slight_smile:

Pondo

Pondo OP

I understand, but my goal is to reimplement the critical elements and not just the match making.

Cochonours

Cochonours

game servers don’t perform a lot of computation usually. Most of the time it’s about receiving new coordinates and sending that data to the other players in the same zone, send data about the movement of fauna and NPC (and this could be computed on the client as well if we just send the paths they are supposed to take), and less often sending info about other actions like fighting and etc. Aside from message passing, it stores every meaningful actions in logs/DB/whatever and that’s it, so the computation can really be minimal (depending on the game most things could be done on the clients, with the server only arbitering the results).

The server has to check the players are not cheating of course, but that can be done in another program which analyses the logs output by the elixir server. Or at least that’s how I would do it, except for really important stuff related to money which would be computed on the main server.

adrianrl

adrianrl

I think they are, not because the type of game, but the number of players connected simultaneously, since those kind of games have a multiple servers available and limited to X number of players. Riot blogs about its infrastructure and other things, so their engineering blog should be a very valuable resource for you: https://technology.riotgames.com/. Let me highlight a piece of this article:

We write Riot chat servers primarily in Erlang (check out this video if you’re curious about the language), although we use C for bindings to certain lower-level operations such as XML parsing, SSL handling, and string manipulation. 10% of our chat server codebase is written in C while 90% is pure Erlang (ignoring external libraries and the Erlang VM itself).

Replace Erlang by Elixir and you have a nice use-case for using it in a professional game, they also use Electron as its GUI client. The key takeaway here is “use the right tool for the job”, a complete game like WoW, LoL, CS… requires a stack of many technologies playing together, for example:

Game: C / C++ / Rust / C# / Java
Game server: C / C++ / Rust
AI: Lua / Python / JavaScript
Chat system: Elixir / Erlang
GUI client: Electron / C# / Java

Of course some parts are redundant, for simple games you implement multiple things with the same language, this is just to illustrate a very complex and professional stack, and it’s not viable to do something like this alone. However when it comes to experimenting, prototypes and so on, you can ignore the initial step of valuating technologies in search of the best performance, sometimes the initial result is better than you would expect.

This is not about gaming but online servers, an interesting article of how Figma started with a pure TypeScript stack before migrating to Rust: How Mozilla’s Rust dramatically improved our server-side performance | Figma Blog.

The multiplayer server we launched with two years ago is written in TypeScript and has served us surprisingly well, but Figma is rapidly growing more popular and that server isn’t going to be able to keep up. We decided to fix this by rewriting it in Rust.

As you can see, the initial implementation were not that bad, and it was pure JavaScript at the end of the day, something like Elixir should have played better than this.

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
mnkhod
So i have been using ash framework for a while and i love it. However currently the issue im having with ash framework is the error handl...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews