[erlang-questions] game engines?

Lutz Behnke lutz.behnke@REDACTED
Sun Sep 18 19:37:22 CEST 2016


Hello,

assigning each object in the game gets difficult for a number of 
reasons, when trying to do this for an MMO, especially MMORPGs 
(characterized by a very large number of objects, and active entities):

You waste resources (CPU, RAM) when an object is currently not being 
referenced by an active entity (e.g. a client connection, thus and 
avatar or alternatively a Mob/NPC), since there is no other process that 
will send any messages.

More importantly, should you scale your engine to multiple hosts, you 
either have to enforce a single process, requiring all updates and query 
messages to be routed to this proc. Or you will have to build some 
master/slave or peer to peer logic, which will ensure consistency in the 
face of CAP.

Separating into a) the state of instances, which you can store in a 
KV-store and have b) a pool of generic procs, that will process the 
state with c) a set of modules that provides the logic for a particular 
object allows to push the state to the appropriate host. With a separate 
KV-store that can handle net-partition and node failure, you gain even a 
good amount of fault-resilience.

Please excuse me beating my own drum, but I have implemented a prototype 
of such an engine 
(http://dl.acm.org/citation.cfm?id=2577389&CFID=787355984&CFTOKEN=91169762). 
Unfortunately, for legal reason, I cannot make the code publicly 
available yet.

mfg lutz

Am 18.09.2016 um 04:11 schrieb Miles Fidelman:
> Hi Folks,
>
> I'm curious, has anybody written an Erlang-based game engine that
> implements a process per game entity?
>
> I've been been finding various examples of Erlang being used to manage
> user sessions, and other aspects of MMORPGs - but nothing that simply
> does the obvious - treating each object, player, etc. as an Erlang process.
>
> Am I missing something?
>
> Thanks,
>
> Miles Fidelman
>
>


-- 
Lutz Behnke
Hochschule für Angewandte Wissenschaften Hamburg,
Labor für Allgemeine Informatik,

phone: +49 40 42875-8156    mailto:lutz.behnke@REDACTED
fax  : +49 40 2803770       http://users.informatik.haw-hamburg.de/~sage
Berliner Tor 7, 20099 Hamburg, Germany

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5006 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160918/0597dc2d/attachment.bin>


More information about the erlang-questions mailing list