lua-users home
lua-l archive

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


> Speaking of which, completely ot, but how much memory does the
> X-Box run with... and is it feasible to use these fibers on it?
> I would assume so, given it's architecture...

You've got 64 megs, which is nice, and Win32 fibers are supported
in the API.

But everything on the XBox runs in ring 0, which means user code
does *not* have a separate stack from system code and interrupts.
So each fiber needs a big stack (I forget how much, 16k or
something like that) to allow for interrupts.

I'd go so far as to say that the number one reason to use a
scripting language in a game is support at the script level for
coroutines. Most games use crappy little developed-in-house script
languages rather than off-the-shelf languages, precisely because
coroutines are so important and until recently they just weren't
supported in popular languages. Hopefully Lua will change that.

(Simula, written way back in the 60's, had excellent coroutine
support. Personally I think every language since then has been
a step backwards.)

--Jeff