[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Interrupting lua execution
- From: Björn De Meyer <bjorn.demeyer@...>
- Date: Mon, 11 Nov 2002 13:40:59 +0100
My "Classic non-threaded non-coroutine" solution for
the problem would be to use an "event pump",
much as is used in many different single-threaded GUI toolkits.
In essence, all input and all AI does not manipulate the
state of the program's objects directly. In stead, the
AI and input are translated to events that are stored on an
event list, and later processed in a controlled way in
the main loop of the program. You'll need to make sure then
that your lua scripts do not modify the objects directly but
only create events in your eventlist.
"No one knows true heroes, for they speak not of their greatness." --
Björn De Meyer