Incidentally, Ness's fake threading is a perfect example of the kind of the thing that scripting system I made (a looong time ago) was intended for.
script[256] wait(int delay) // This was going to be a library function.
{
int stamp = timer;
while (timer - stamp < delay) suspend;
}
script[100] BouncyDigit(int x, int y, string fontname, string text, int delay)
{
int font = LoadFont(fontname);
int frame = 0;
on retrace {
PrintString(x, y-nBouncy[frame], screen, font, text);
}
while(frame < NUM_BOUNCY) {
wait(delay);
frame++;
}
}
script BouncySpawner(int delay)
{
while(1) {
wait(delay);
fork BouncyDigit(Random(0, 320), Random(0, 240), 'fred.png', 'Bounce', Random(2, 4));
}
}
void autoexec()
{
ScriptInit();
BouncySpawner(25);
while(1)
{
//black out the screen
RectFill(0, 0, 320, 240, RGB(0, 0, 0), screen);
render();
ScriptTick();
ScriptRetrace();
showpage();
}
}
I'm pretty sure the above actually would have worked with the system I had (maybe I've got some syntax wrong). Pretty cool, eh?
Of course it's useless to Grue now because I never released it. I wanted to make a good demo and never found time :p. But now I'm working a new version, which should be much faster and nicer (the old one was too slow).
... Anyway, just thought I'd pop my head in and say hi. Carry on.