lua-users home
lua-l archive

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


I'm making a game system, in which I require to save the internal state of the Lua virtual machine. For stuff like C++, this is normally fairly easy, since it's just data. However, in Lua, closures are a pain to serialize. Has anyone ever had to do something similar, and if so can you give me any hints as to this problem?

On a related note, I was wondering if the code contained in luac should mostly be moved into the lua core itself. Since we have the ability to load binary files from the core, I would think it would make sense to be able to dump them too. There would be some problems from user defined structures, but I would imagine some sort of dump function in the meta table, and some callback in the loading function would possibly make it easier. Any input would be appreciated.

- Brian