[erlang-questions] Erlang: Who uses it for games?

Nicholas Frechette <>
Wed Jul 7 18:27:16 CEST 2010

For an MMO backend, erlang could be decent. Depending on how many external
libraries you use or rather how many native libraries you need to interface
with, it might not be too bad.
No reason I can think of why you couldn't.
For a regular game or for an MMO client however, I'm not so sure. For those,
something like C# might be a better fit (easy to interface with C++, native
or managed). As far as consoles go, I could see erlang running on a 360
fine, using all cores but not so much on a Wii (where you too often need to
hand optimize code which will require C++/assembly) and not so much on the
PS3 where you may get a hard time using the SPUs from erlang (as I'm
guessing the VM won't run on them out of the box and you might have to spend
considerable time to get erlang processes to run on SPUs (feasible I'm

You'll definitely need a large number of NIFs for allocating memory aligned
binaries for all that data you need to process with SIMD instructions and
all kind of other stuff too. Games where performance isn't a huge bottleneck
or where is it easy to parallelize would be a good fit for erlang, such as
the poker game mentioned.
I could see a small company willing to invest in building their core tech in
erlang but I doubt we'll see any big ones change any time soon. For them, it
would make more business sense to build support applications with it (such
as online presence stuff, debugging tools, test tools, data/code build
tools, etc.), things you mostly access through a network or are distributed
in nature.

The truth is that most game programmers out there are fundamentally
imperative programmers. I work in the industry and frankly, I haven't met
many programmers that have used functional p. languages beyond a few simple
scripts or that have even played with them in the past. Most of them come
from a C/C++ background and as such, if you are a company looking to hire
talent and experience, you'll need to offer work in something they are
familiar with. This is mainly why a language like C# has more chances of
succeeding, if only because of the familiar syntax. I do believe the code
quality would be higher if more of it was written in a functional language
but I can't picture seeing it happening very fast. I do know of some studios
using LISP variants and I also know they have a hard time hiring programmers
(mostly hire seniors with functional p. experience and game experience,
which is not so common).

Also keep in mind a substantial portion of the companies out there making
video games are essentially microsoft shops. They run windows, use visual
studio, etc. That means they have support directly from microsoft for all
their products (compilers, linkers, sdks, etc.). There is a huge incentive
to use microsoft products for them in development so even when an
opportunity arises where they could build an application, they will often
opt for C++ or C# (or a mix of both) because of that fact and the one
mentioned above where that is where most of their talent pool lies. As such,
for anyone part of such a project, it'll be an uphill battle. The state of
things is unlikely to change anytime soon seeing three of the four biggest
markets are PC gaming, console gaming (360 SDK pretty much requires
windows/vs) and web based games (flash dev tools are mostly for windows, so
is silverlight (who uses java anymore on the web anyway?)) The fourth being
mobile games. (Mac/linux gaming omitted, while it is slowly picking up
recently (specially noticeable with Stream), it isn't very big yet)

For erlang to make more headway into games, I believe they would need to
make it easier to integrate into existing applications. It is fairly
straightforward to integrate python, lisp, lua or even javascript into an
existing application but I'm not sure I could say the same of erlang. Being
easy to embed would be a great first step, allowing progressive transition
from C++ into erlang (for PC at least). To use erlang on consoles, you'll
need a beam to native compiler for sure as some consoles do not allow
interpreted code to execute (ie: PS3, applies to mobile devices as well such
as the iPhone/iPad). Even if it were for just a subset of erlang, an LLVM
frontend could achieve that with backends for different target
architectures. Thankfully the current generation of consoles is all powerpc
based so that might not be that much work.

I for one would love to see erlang used more in games as well as their
supporting applications :)


On Wed, Jul 7, 2010 at 10:36 AM, Michael Truog <> wrote:

> The biggest seems to be Vendetta Online
> http://www.vendetta-online.com/
> Their engine is being sold/licensed here
> http://www.guildsoftware.com/naos/
> However, the Erlang piece seems to be mainly for NPC actors (ships (?))
> and the AI associated with them... but that is just speculation after
> reading their development blog a year or two ago (I think that is when
> it went into production).  They call it the "/Kourier"/ system.
> Here is a paper on the topic
> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=
> For a normal MMO you would probably need a few NIFs to make everything
> as efficient as possible but its scalability should surpass other
> language implementations (with less lines of code and less complexity).
> Miguel Morales wrote:
> > I'm developing a mobile 2D multiplayer rpg, although it's not open
> > source you can find my dev blog here:
> > http://developingthedream.blogspot.com/
> >
> > I use it alongside rabbitmq and a use the whole 'eveything is a process'
> method.
> > Although I haven't released it and scaled it yet, I hope it'll scale
> > will.  That is if the game needs to.
> > Some of the links posted are interesting, you'll also get a lot of
> > hits if you google 'erlang mmo'
> >
> > It was interesting implementing things like game loops, pathfinding,
> > chat, etc.  Erlang so far has been a good choice.
> >
> > (err, sorry, I'm used to using the android-dev list, forgot to hit
> reply-all)
> >
> >
> > On Tue, Jul 6, 2010 at 5:09 AM, Mariano Guerra
> > <> wrote:
> >
> >> On Tue, Jul 6, 2010 at 5:05 AM, ingo.schramm
> >> <> wrote:
> >>
> >>> Does somebody ever used Erlang to program game servers? Is there any
> >>> real live industrial game solution written in Erlang?
> >>>
> >>> I need to know this for some evangelization :)
> >>>
> >> openpoker is written in erlang
> >>
> >> http://www.devmaster.net/articles/mmo-scalable-server/
> >> http://github.com/wagerlabs/openpoker
> >>
> >> ________________________________________________________________
> >> erlang-questions (at) erlang.org mailing list.
> >> See http://www.erlang.org/faq.html
> >> To unsubscribe; mailto:
> >>
> >>
> >>
> >
> >
> >
> >
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:

More information about the erlang-questions mailing list