[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Lua For Game Scripting article (Was: Re: Lua x Python)
- From: Enrico Colombini <erix@...>
- Date: Fri, 23 Aug 2002 17:25:59 +0200
>By making the script event driven. No "wait until this happens",
>just a function called whenever it happens.
Or [which may be considered to be the same from another point of view] by
using state machines, where every NPC is a state machine that does just a
'small step' at every call from the main loop. Also, to make things
simpler, actual action could be done only from the main loop.
It is a bit more complex than having separate threads, but it usually is
more robust and easier to debug (things always happen in a known order). At
least that's my experience with industrial control applications.
Enrico