I have created implemmentation of saving state.
IT saves call stack of context.
Currently, only primitive types and strings can be saved.
Is this good implementation...?
http://pastebin.com/EH1nsHgK
Patch for AngelScript 2.20.2.
Saving script state test implementation
[font="arial, verdana, tahoma, sans-serif"]Current issues of this impl
- How to save object handle? Make a list of variables, then refer one by index?
- If script object is passed with ref modifiers, same value may be saved multiple times?
- Saving grobal properties and its reference(or handle) is not implemented.
- Saving script object is not implemented.
- Saving template types (such as arrays and dictionaries) is may be difficult.
- I am assuming that bytecode is the same on loading time and saving time.[/font]
I think it is a very good start, and similar to what I had in mind for this implementation.
The serializer will need to keep track of objects that have already been saved, so that any references to that same object doesn't cause the object to be saved multiple times.
The template types need to implement the serialization in the same way any other object do, except that it will also need to serialize its internal variables so it can rebuild itself identically to what it was before.
The serializer will need to keep track of objects that have already been saved, so that any references to that same object doesn't cause the object to be saved multiple times.
The template types need to implement the serialization in the same way any other object do, except that it will also need to serialize its internal variables so it can rebuild itself identically to what it was before.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement