Pondo

Pondo OP

Hey thank you for your answers! This means that 90% of League of legend servers are written in Erlang O_o

That’s fantastic!

Compared to Figma and Typescript, I think Elixir could have been enough, right?

0
Post #11
Pondo

Pondo OP

Oh, I just read… it’s just the chat server, not the game server. ;(

0
Post #12
adrianrl

adrianrl

Yes, even if it’s not a game, the server manages multiple users online, so the use-case is pretty much the same. Figma was founded in 2012, so at that time Elixir was very new, but I think Erlang would have been a better option than JavaScript.

We’re talking about the infrastructure, Erlang (and thus Elixir too) isn’t suitable for game programming. Anyways the chat system is a very complex part too, don’t understimate it! and chosing a concurrent language for real-time communication is a very smart decision.

0
Post #13
rvirding

rvirding

Creator of Erlang

You might checkout the Battlestar Galactica Online game which is written in Erlang. At this level of discussion Erlang and Elixir are equivalent. It definitely shows that implementing a game in Erlang is definitely feasible to do.

9
Post #14
kokolegorille

kokolegorille

Thank You for the resource, I like using Erlang/Elixir for game server :slight_smile:

As mentionned in the link, the client is made with Unity3D. I suspect the Erlang server is used for communication only and does not manage the gaming rules. (Physics, collision detection, characters animation)

0
Post #15
Pondo

Pondo OP

Hello,

I fully understand that Elixir is a good choice for making chat servers, websites, match making

In the end, if I follow what I’m told here:

This means that I could also do a server implementation of a known game?

I would like to take the example of Minecraft, spigot is the most well-known implementation and is made in Java! If I start from this principle it means that I could very well do it in Elixir, right?

When you say that BEAM is bad for the calculation, is it bad in relation to C++ or rather in relation to the FMV?

Because in the case of the JVM this does not prevent Minecraft and many other games existed

0
Post #16
rvirding

rvirding

Creator of Erlang

What I don’t know is how much of Unity3D it used. The rendering and graphics obviously but how much of the “intelligence” in the game was I done in Erlang I don’t know.

1
Post #17
Pondo

Pondo OP

Hello, I see you’re the one who created Erlang! Could you tell me if you think the BEAM virtual machine is as powerful as the JVM in computation?

0
Post #18
Cochonours

Cochonours

Do you know of game server which handle those kind of things? Animations are always client side as it wouldn’t make any sense on the server. Collision detection should be client side and the server could optionaly verify it to ensure no cheating is taking place but that can be done out of band. Physics should be handled on the client as well for the same reason!

Honestly I think Elixir would be a good fit for a game server as long as (de)constructing the network packets from and into data is fast.

@Pondo : I think Elixir could be used to do a server implementation for most known games indeed, especially MMOs as most of the work is message passing. The more (heavy) logic resides on the server, the less it might be convenient to use Elixir maybe, although one could use NIFs, but the more “MMO” a game is, the simpler the logic will be on the server! For a good reason: when you want to create an MMO you want to be able to handle the maximum number of players on a server so that people can enjoy their time together, and that means not computing the world on that server for every frame. A lot of MMOs don’t even use z coordinates to save a third of packet space for coordinates (which means maps cannot have several accessible layers on the z axis), so of course the server won’t compute any kind of complex physics! It’s the role of the clients to move the players and make them act depending on the data broadcast by the server.

About computation it would be in regards to C++ yes, like if you have a game server which should be able to handle the physics you wouldn’t code that part in Elixir. But I’ve never heard of game servers handling the physics, and even if you need to you could do that in C++ in a NIF I guess.

Anyway, I don’t know if minecraft is logic heavy on the server or not, but most probably it isn’t and you could code that in Elixir. You should have a look at the Java implementation to have an idea.

0
Post #19
Pondo

Pondo OP

Hey, thanks for your answer.

I’m still wondering, the JVM is good in calculation so for Beam wouldn’t be?

0
Post #20