Jump to content
  • Advertisement
Sign in to follow this  
WitchLord

AngelScript 2.33.0 released

Recommended Posts

A little over a year has past since the last release, and now another one is finally here. I've realized that a yearly release schedule is way too far between updates, so in 2019 I'll try to stick to at most 6 months between releases.

In version 2.33.0 the most notable changes are the following:

The asCALL_GENERIC calling convention is now behaving just like native calling conventions when it comes to object handles and reference counting. This means that the macros asFUNCTION, asMETHOD, etc are interchangeable with the WRAP_FN, WRAP_MFN, etc without any further code changes. Unfortunatly, those who already use asCALL_GENERIC heavily may have to make changes to adapt to the new code. To mitigate this, an engine property asEP_GENERIC_CALL_MODE has been introduced to allow the asCALL_GENERIC calling convention to work like before.

Value types can now also have garbage collector behaviours. This is important for those value types that can in turn hold references to reference types, specifically if the value types can also be a member of a script class or held in arrays or dictionaries. With the garbage collector behaviours the GC will be able to resolve the circular references involving the value types even though the value type itself isn't known to the GC.

The script language now has support for try/catch statements. With the addition of a couple of registered helper functions, the scripts can throw and catch exceptions, to treat different scenarios. While the syntax is not exactly like C++ it should be possible to do pretty much the same thing as in C++ and other similar languages. In addition to that the library interface now has the option to register a callback to translate C++ exceptions thrown from registered functions into script exceptions.

I've spent a little time working on the add-ons to make them more useful out-of-the-box. The asrun sample that uses most of the add-ons is now a pretty useful tool for scripting batch jobs. I'm even thinking of uploading pre-compiled versions of the tool for quick uses.

There are of course a lot of other smaller changes too, so check-out the change list for the complete set of changes.

Regards,
Andreas

Share this post


Link to post
Share on other sites
Advertisement

A pre-compiled build of asrun would be really cool! We'd probably use that quite a bit here.

I'm glad you've released this new version! Thanks for all your hard work. ❤️ Happy holidays to you!

Share this post


Link to post
Share on other sites

Hi Andreas

I've tested the new try-throw-catch and current_exception mechanisms and they are just working fine!

some small suggestions:

1. I think project files prepared for older versions of VC (such as msvc8) are still worth keeping. Because there are still many people using the old version of VC, and VC project files are only backward compatible, but not upward compatible (meaning: the new version of VC can open the old project file, but you can not open the new file with old VC).

2. It's a good idea to include some simple descriptions in the related documentation like: "you can call asIScriptContext::SetException to implement throw, and call asIScriptContext::GetExceptionString to implement current_exception".

Edited by ASBai

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!