Erlang for my Multiplayer Multiplatform Game


Erlang Generic Game Server

This project is a proof of concept that aims to be a generic framework for creating a MMORPG (Massively Multiplayer Online Role-Playing Game).

I take this project to learn more about Erlang language, my last passion :)


What can you find here?

The project is divided into:

Eggs app

It provides the framework and infrastructure elements to build your game.

Multiplayer example game

The goal is to be a "MMORPG", well, in the near future...

Unity3D test client

It is a test to show how connect Unity3D to eggs and have a nice client to play and record videos to show ;) It's just for fun!

eggs Unity3D test client source code


The framework provides the infrastructure elements to build your game.

The idea is that everything in the game is an "entity". An entity can be passive or active. A passive entity is an element with some data. An active entity is a process that implements a FSM (Finite State Machine) and have some data. Althought it could be subscribed to an event handler and be sensitive to events in the area.

Entities are implemented using ETS that ensures great performance.

All infrastructure are based on entities, so an area world, sessions, players... are active entities.

Here you can see a scheme of the framework elements:

And here you can see a scheme of the example game


Please don't take these results seriously.

I have used a MacBook Pro 2.53 GHz Intel Core 2 Duo/4Gb 1067 MHz DDR3.

My first entity implementation was based on proplists but then I switched to ETS. The benchmarks compares both implementations creating N players that do M moves as quick as they can. All players are in the same area and all them are listening to the movements of others using event handlers.

The test only check the core implementation. Network connections are not tested.


The average move time with 10 players doing 1000 moves everyone, is 0.20 ms.

The average move time with 1000 players doing 1000 moves everyone, is 18 ms. This result with a i3 CPU is reduced to only 8 ms.

Download all results


Clone repository and then:

Quick start

Simple shell gateway

eggs & Unity3d



Jordi Llonch - llonch.jordi at gmail dot com


This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.