🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

AngelScript 2.11.0 is here

Started by
13 comments, last by WitchLord 16 years, 6 months ago
I've uploaded the new version of AngelScript. The improvements made for this version include:
  • Improved validation of registered types and their behaviours
  • Factory functions instead of Constructors for reference types, which gives consistent memory managements
  • Removed the Alloc and Free object behaviours, as they are no longer needed Added support for native calling conventions on XBox 360 (Thanks Laszlo Perneky)
  • Various of bug fixes For the next version I plan to improve the cast behaviours, which will eventually allow applications to register generic variant types that can be properly used in expressions together with other primitive types. It is also a step closer to supporting inheritance. Regards, Andreas
  • AngelCode.com - game development and more - Reference DB - game developer references
    AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

    Advertisement
    I've had to take a break from coding - too much university work - but I am quite excited to still see you working hard on this!
    Thanks! AngelScript's 5 year anniversary is coming up soon. :D

    AngelCode.com - game development and more - Reference DB - game developer references
    AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

    good work again! Thank you, Andreas :)
    Good work Andreas. Some of the changes will require some major changes on our side, so it may be some time until we upgrade.

    Awesome stuff!
    Quote: Original post by WitchLord
    Removed the Alloc and Free object behaviours, as they are no longer needed


    About this...

    We have some types (that do not have AddRef/Release, they are classes from an external library, representing matrix and vector, etc.) that require alignment. How is this accomplished with the new way? Through the Factory behavior? That looks like it constructs also, and some of these classes have constructor parameters.
    btw, it looks like "ExecuteString() shouldn't lock dynamic config groups" is on the top of your todo list :-) (according to http://www.angelcode.com/angelscript/wip.asp). It would be nice to see it completed, it is a big stopper for my project :-(. Currently I do an ugly hack in RemoveConfigGroup which leads me to random memory corruptions in destructors.

    On the other hand, "Dynamic global variables and functions" (at least variables) could help me as well as possible - I could completely drop config groups and just insert/delete global variables.

    Hope to see one of them done! :-)
    midnite,

    Basically there are now two major classes of registered types, one is reference types, and the other is value types. Reference types are those that are allocated on the heap and use reference counting for memory management (though you don't actually need to use reference counting if you can guarantee the life time of the objects another way). The value types are those that are allocated on the stack, and don't allow references to objects that outlive the scope of the variable where the object is allocated.

    Reference types allow object handles, value types don't.

    Value types can be passed to the application in parameters by value, reference types can only be passed to the application in parameters by reference (or object handles).

    Reference types are created through factory functions that allocate the memory and calls the class constructor. Value types are allocated internally by AngelScript (currently still on the heap, but in a future version on the stack for better performance) and initialized through a call to the constructor behaviour.

    From what you're telling me it seems you have classes that require special alignment to work, that complicates things a bit. You could register them as reference types and have the factory function make sure the memory is properly aligned, but I'm guessing you don't want to have a reference counter for them. I may need to implement a new sub class of the reference type, one that will have only the factory and the release behaviour. This will make it work like a value type, except that it is allocated on the heap.

    Help me come up with a way that will work for you, and I'll implement it for version 2.12.0.

    mono2k,

    The problem with ExecuteString and the dynamic global variables and functions are very similar to one another. I've been investigating the solution for this, because I realize its importance, but it won't be easy and require a lot of restructuring. I can't promise I'll complete either of them for 2.12.0, but I'll definitely work towards it. It's definitely something that will add more flexibility and power to AngelScript.

    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 page from the manual will hopefully explain the new ways of registering the object types:

    Registering a C++ class

    AngelCode.com - game development and more - Reference DB - game developer references
    AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

    Quote: Original post by WitchLord
    mono2k,

    The problem with ExecuteString and the dynamic global variables and functions are very similar to one another. I've been investigating the solution for this, because I realize its importance, but it won't be easy and require a lot of restructuring. I can't promise I'll complete either of them for 2.12.0, but I'll definitely work towards it. It's definitely something that will add more flexibility and power to AngelScript.


    I've tried to do it myself but unfortunately the code is too complicated for me...

    This topic is closed to new replies.

    Advertisement