Jump to content
  • Advertisement
Sign in to follow this  
vroad

Saving script state test implementation

This topic is 2697 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
[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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!