Jump to content
  • Advertisement
Sign in to follow this  

AngelScript 2.23.0 is out

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

[color=#000000][font=Arial]


I've released yet another update to the AngelScript library. The major enhancement with this release is the improvement to the way the bytecode is saved.[/font]
[color=#000000][font=Arial]


With the changes I made in this release to abstract the pointer size the bytecode is now almost 100% platform independent, and should cover all modern platforms including computers, consoles, and mobile devices. The only things that prevent me from saying the code is 100% platform independent are 2 things; 1) that bit representation for float values is left as-is, so a CPU that doesn't use IEEE 754 will get the wrong value when reading bytecode saved on a PC, 2) that the size and value of the boolean type is left as-is, e.g. older Mac's on PPC used 4 bytes for the boolean type.[/font]
[color=#000000][font=Arial]


With the saved bytecode being platform independent many applications will not need to compile any scripts, so with this I added the preprocessor define AS_NO_COMPILER that can be used to remove all the code related to the compiler from the library. This can reduce the size of the executable quite a bit, so if size is important to you this will hopefully be a welcome change.[/font]
[color=#000000][font=Arial]


Another change that many has asked for is a way to register reference types that doesn't use reference counting. It was possible before by registering dummy functions for the ADDREF and RELEASE behaviours, but now the new flag asOBJ_NOCOUNT can be used instead so the dummy functions won't be needed anymore.[/font]
[color=#000000][font=Arial]


As I do with every new *.0 release, I've done some changes to the library interface. For the most part it is just to add proper methods for using the namespace feature I implemented in the last release, but there may be a few methods that needs to be adapted when upgrading to this version, most notably the GetExceptionFunction() and NotifyGarbageCollectorOfNewObject() methods.[/font]
[color=#000000][font=Arial]


The add-ons have also received a few improvements. I've implemented string pooling for the string type, which should improve the performance for scripts that use a lot of strings. I also added the method getKeys() to the dictionary object.[/font][color=#000000][font=Arial]


SiCrane implemented a new autowrapper system that eliminates the separate declaration of the function wrapper and the registration of it with AngelScript. The new macros are almost identical to the asFUNCTION and asMETHOD macros used to get the address of functions and class methods, so it becomes just as easy to use the generic calling convention as the native calling convention.[/font]
[color=#000000][font=Arial]


On the script language front, very little changed in this version. The only change is that enums can now be declared as 'shared' too.[/font]

Share this post


Link to post
Share on other sites
Advertisement
Thanks a lot, Andreas!

Looking forward to updating.. It'll be interesting to see your version of Dictionary::getKeys :) We've been using ours for some time in our project. Although app-registered namespaces is something I've been anticipating most. Great job!

Share this post


Link to post
Share on other sites
Good work! Both the NOCOUNT and the string optimisations sound really good to me. The other enhancements need a test before I can voice an opinion on them :-)

Share this post


Link to post
Share on other sites
Andreas, may I also suggest adding 'bool empty() const' method to Array and Dictionary addons and renaming/aliasing deleteAll() to clear()? clear() follows STL and is probably more intuitive than deleteAll()

Share this post


Link to post
Share on other sites
Thanks for the suggestion. I'll add this for the next release.

Though I prefer the slightly more verbose names isEmpty and deleteAll, rather than the shorter names used by STL.

Share this post


Link to post
Share on other sites

Thanks for the suggestion. I'll add this for the next release.

Though I prefer the slightly more verbose names isEmpty and deleteAll, rather than the shorter names used by STL.

Thanks for adding these methods! May I also suggest adding the empty/isEmpty method to the string class addon? I found it a lot more convenient than .length() == 0 or comparison with an empty string.

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!