|
A fundamental question is whether you really need to have the encounter loop in Lua. An alternative usage pattern is to have the "encounter loop" on the C side, and generate events from that loop which are handled in Lua. The code above looks somewhat like "busy waiting". Of course, I do not know the specifics of your framework, so this suggestion might be off. André |