lua-users home
lua-l archive

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


The main reason I am building this game engine is the game design class
I attend needs a reliable, cheap (meaning free) game engine.  I asked a
couple of them and they like the idea of sequencal programming without
having to handle events.  As in start some things happening and then
wait for an event to happen before continuing.  Personally I like the
event driven model but I'm aiming at a simpler programming model.  The
coroutines solves that problems just as long as the remember the
yields....
					Nathaniel

On Tue, 2010-07-20 at 03:33 +0200, André Naef wrote:
> >  
> >         while encounter_Living("DemoEncounter") > 0 do
> >          -- Do something while the encounter is alive --
> >         end
> >         ui_Print("Encounter Killed");
> 
> 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é