Jump to content
  • Advertisement
Sign in to follow this  
Cornstalks

Is AngelScript a dynamic scripting language?

This topic is 2216 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

It's a really simple question, and either I've looked in the wrong spot, didn't understand it if it was answered, or the answer isn't explicitly stated anywhere. Is AngelScript a dynamic scripting language (not dynamically typed)? For example, if I change a script slightly, save it, reload and recompile it, will AngelScript be able to "resume" its place in the new byte code, or will it restart from the beginning? I'm guessing it's not, but it's worth checking, as I'd really like to use it if it is.

Share this post


Link to post
Share on other sites
Advertisement
As AngelScript is statically typed it is a bit difficult for the engine to modify the bytecode code while it is running. That is a drawback of any statically typed language.

However, it is possible to come pretty close to what you want with a little preparation from the application.

Before recompiling a modified script, store away all the data (serialize them), then recompile the script. Once the script is recompiled, restore the previous data using the new layout. The CSerializer add-on bundled with the SDK provides the implementation for storing the data and then restoring it.

The recompilation has to be done while not currently executing any script as it is currently not possible to serialize the callstack. Edited by Andreas Jonsson

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!