[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Serializing a running lua state to disk
- From: "Joel Pritchett" <jpritchett@...>
- Date: Mon, 3 Nov 2003 09:29:58 -0800
>Perhaps it's easier to reorganize your code so that you can restart
>the beginning of a function...
I wish it were so easy. The script we are thinking about serializing is
a script that runs for the entire duration of a level as an overhead
polling script. It tracks level wide goals and may have many internal
counters or other state to track player progress. We thought about
trying to design the game in such a way that the player wouldn't have to
save mid level, but that turned out to be unrealistic.
[mailto:email@example.com] On Behalf Of Luiz Henrique
Sent: Saturday, November 01, 2003 3:28 AM
Subject: Re: Serializing a running lua state to disk
>Is there anyway in the current LUA framework to take a running (but
>yielded) lua state and serialize it to disk then load it back up and
>resume execution where it was before the dump to file?
Try lper at http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/ .
It's experimental but seems to work...
>If not, and I wanted to some how do this where should I start digging?
>Thinking about this, I really only need a way of grabbing the current
>pos and the execution stack.
Perhaps it's easier to reorganize your code so that you can restart from
the beginning of a function...