[erlang-questions] Unreal engine

James Hague <>
Thu Apr 12 16:23:14 CEST 2007


"One game object per process" gets mentioned occasionally, and I think
that's not as beautiful in practice as it sounds.  Using cooperative
multitasked actors in procedural languages like Lua or Python or
something custom is actually a common approach in modern games, but
the focus isn't on complete isolation of actors.

If you use shared-nothing processes, you also need to (a) keep firing
off relevant data to somewhere else so it can be used for rendering
and physics, (b) be able to handle state change requests that come in
at any time (e.g., you've been hit by a car, so start flying
backward).

Handling both of these isn't conceptually difficult, but I've found
that writing the code in Erlang can be ugly.  Not the concurrent part,
but that actors in a game involve updating a pool of state variables.
The best approach IMO is to write a compiler for a simple procedural
language, one that gets turned into Erlang.



More information about the erlang-questions mailing list