lua-users home
lua-l archive

Re: C calls Lua or Lua calls C?

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.
--
 Enrico

AltStyle によって変換されたページ (->オリジナル) /