[aquaria] Patch to run Lua scripts as threads

Andrew Church achurch+aquaria at achurch.org
Wed Jul 7 17:30:54 EDT 2010


Actually, I already finished fixing up the scripts to use the getVars()
system -- as the enormous diff in my repository can attest to. (:  I'm
running through them at the moment to find regressions and deal with
a few variable typos and stuff I caught along the way.  I haven't tried
a PSP build yet, but I'm hoping it'll cut down on map change time now
that we don't have to compile every script umpteen times over.  It does
feel like map changes on the PC are a little faster, though my own
system is fast enough it's hard to tell the difference.

I still want to try and find a way to get the scripts working without
the extra variable table, not so much for performance or anything but
because I always strive for elegant code (as you may have noticed, heh).
I think the ultimate solution would be to redesign the scripts to run as
true threads, in the sense that you start a script and it keeps running
in a while loop or something until the entity dies or the map changes or
whatever.  That may be a project for Much Later, though...

  --Andrew Church
    achurch at achurch.org
    http://achurch.org/

>Hmm yeah. So far it seems like making our own local variable system is the
>way to go...
>
>It'd be good  to test it out with a handful of scripts and see what it
>does... if it's a big improvement, then we could apply it to everything
>else. It'd just take some grunt work. :)


More information about the aquaria mailing list