[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: C calls Lua or Lua calls C?
- From: Enrico Colombini <erix@...>
- Date: Wed, 19 Jan 2011 12:34:20 +0100
On 19/01/2011 11.35, Steve Litt wrote:
In general, when game programmers use C and Lua, to they fire up a C program
that calls a Lua script, or do they fire up a Lua script that calls a C
program, or are both commonly done?
In adventure games for a resource-constrained device, I used a simple
C++ scheduler (called from the frame loop) to launch or resume Lua
coroutines, which in turn called back the C++ game primitives through a
plain C interface. I kept game data on the Lua side.