[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [glob2-devel] Re: USL Integration Begun
From: |
Stéphane Magnenat |
Subject: |
Re: [glob2-devel] Re: USL Integration Begun |
Date: |
Thu, 31 Jul 2008 09:07:56 +0200 |
User-agent: |
KMail/1.9.9 |
On Thursday 31 July 2008 03:43:16 Bradley Arsenault wrote:
> I am wondering what the intended method of execution for USL scripts was
> planned to be? Like, was the script meant to be fully executed every frame?
> Was there meant to be a designated "main" evaluation? As far as I can tell,
> USL is a functional language, rather than imperative, which may make
> integration more difficult.
The idea was to execute all thread on every frame, and having a yield() native
function somewhere in the script that would stop execution for the current
frame. This, in addition to lambda abstraction, allows a very clean
implementation of all current wait condition and much more.
Pseudo code below:
def wait(cond:lambda)
{
while (cond())
yield()
}
But surely Marvelous can help you on this.
Have a nice day,
Steph
--
http://stephane.magnenat.net