lua-users home
lua-l archive

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


As I've mentioned before on the list, I'm interested in getting a version of
Lua that can yield and retain its state. I remember from the list that Edgar
Toernig had announced a patch against Lua 4.0 that would enable coroutines.
Edgar, did you ever release that code?

>From what I've read so far, it seems to me that coroutines are much easier
than either the setjmp/longjmp method or trying to convert Lua to a
"stackless" state.

However, I would be interested in purusuing a "stackless" port if there are
others interested. Perhaps we could release it as a "power patch" to the
main lua distro.

Eric

> -----Original Message-----
> From: owner-lua-l@tecgraf.puc-rio.br
> [mailto:owner-lua-l@tecgraf.puc-rio.br]On Behalf Of John Peterson
> Sent: Monday, June 11, 2001 12:52 AM
> To: Multiple recipients of list
> Subject: Cooperative multitasking for games
>
>
> Hello everybody! I'm new to Lua and it's my pleasure
> to greet everybody on this list that is interested in
> the wonderful language Lua!
>
> I'm yet another game developer that's intent on using
> Lua! The Lua language really rocks! But I and I guess
> many like me have a GREAT problem... please read on.
>
> For the past days I have been reading the archived Lua
> mailing list, and was pleasantly surprised to find
> fine professionals such as Bret Mogilefsky talking
> just about what I'm interested in: implementing some
> form of non-preemtive multitasking in my would-be
> adventure game engine using Lua. After some research I
> was immediately convinced that Lua is the most
> suitable language for this in terms of its
> unencumbered syntax and fast execution, not to mention
> special features. Then I was surprised that Lua was
> used in a successful commercial game project: Grim
> Fandango from LucasArts. I think that's a great
> success for Lua and its developers should be very
> proud of it! Indeed!
>
> Now, before I read the mailing list, I was convinced I
> could implement cooperative multitasking using a queue
> of Lua states and switching between them in response
> to a delay or sleep command from the script.
> Needless to say, Bret Mogilefsky's comments to how he
> did these at LucasAts did clear up some details and
> confirmed I am on the right track.
>
> However, not being aware of the problems with
> continuation that arise from Lua stack usage, I felt
> quite discouraged from the difficulties of modifying
> Lua for this purpose.
>
> Observing that has been inactivity for about 5 months
> after the initial discussion of these matters, I felt
> obliged to ask all interested:
>
> Has anyone already succeeded in modifying Lua to
> support cooperative multitasking necessary for an
> adventure game engine?
> Bret Mogilefsky was talking about a patch to the final
> Lua 4.0 but of course he's busy (Who is not?).
>
> I feel discouraged because I see that there's some
> confusion about the
> way this multitasking can be implemented, and ask if
> there's any progress before I start -- oh, no --- to
> delve into the Lua code and try to save myself
> somehow.
>
> Any report of the progress of the situation would be
> REALLY APPRECIATED.
>
> My apologies if I've annoyed or bored anyone.
>
> Thanks in advance.
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/