Advertisement

AngelScript 2.26.0 is out

Started by February 03, 2013 04:16 PM
9 comments, last by FDsagizi 11 years, 9 months ago

It's been a while, a little over 2 months in fact, but a new version is now available.

The major new enhancement in this version is the support for initializing script class members directly in the declaration. The initialization expressions will then automatically be compiled in the constructors without the need for additional code. This is a feature that has been on my to-do list for a very long time, but thanks to a generous sponsorship from Frictional Games I had it implemented now, so you should all thank them for this enhancement.

Another feature that was added, and that has often been asked for, is the ability to register class methods as global functions without the need for wrappers.

Support for multithreading has also been enhanced a bit. The internal threadmanager can now be shared between multiple application modules with separate memory spaces (dlls). The library also exposes the functions asAtomicInc and asAtomicDec to make it easier to write threadsafe add-ons.

Besides this a rather long list of minor enhancements and bug fixes have been included.

Unfortunately, a couple of important contributions from the community didn't make it into this version. Namely, support for multiple types arguments in the script templates contributed by Amer Koleci, and support for native calling conventions on Linux with ARM processors contributed by Carlos Luna. I will have these added in the next release.

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

register class methods as global functions without the need for wrappers.

I like the sound of that! Does this just mean we can use asMETHOD() instead of asFUNCTION() when registering global functions? That's going to make my life a lot easier.

Initialization at declaration is another thing I've been looking forward to. Thanks as always for all your work. :)

Advertisement

It is nice to see companies like Frictional games contributing to the development of AngelScript.

...

@Jake,

Yes, to register a class method (not static) as global function, you will use asMETHOD. In order for it to work the object pointer must also be informed at registration.

Example:


Object obj;
engine->RegisterGlobalFunction("void func()", asMETHOD(Object, Func), asCALL_THISCALL_ASGLOBAL, &obj);

See also the manual.

@André,

It is. It would appear that smaller independent developers that manages to get success are much more likely to support open source projects, than the larger developers that have more regular successes. My guess is that it is because these smaller developers are much more likely to know how it is to be short of funds, and thus more likely to sympathize with other small independent developers. smile.png

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

Thank you Frictional Games and Thank you Andreas Jonsson.

It seems the new version doesn't compile on Mac OSX (tested with 2 different systems):

c++ -g -Wall -fPIC -arch i386 -arch x86_64 -o obj/as_atomic.o -c ../../source/as_atomic.cpp
../../source/as_atomic.cpp:149: error: prototype for 'int asCAtomic::atomicDec(int&)' does not match any in class 'asCAtomic'
../../source/as_atomic.cpp:61: error: candidate is: asDWORD asCAtomic::atomicDec()
../../source/as_atomic.cpp:149: error: prototype for 'int asCAtomic::atomicDec(int&)' does not match any in class 'asCAtomic'
../../source/as_atomic.cpp:61: error: candidate is: asDWORD asCAtomic::atomicDec()
lipo: can't figure out the architecture type of: /var/tmp//ccdlDTNp.out

-EDIT-

Fixed!

Seemed like a typo at line 149 in as_atomic.cpp, should be:

int asAtomicDec(int &value)

KAG DEVLOG: http://kagdev.tumblr.com/
Advertisement

Thanks. I'll have this fixed.

[edit] Checked in to revision 1546.

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

* CScriptBuilder::AddSectionFromMemory() now requires a name and an optional length for the buffer in case it is not null terminated (Thanks Paril101)

was a dangerous change because it swaps the order of parameters but because of the new default parameter, its not obvious when you update. :)

Working with STL makes a lot more sense if you think about the "std::" as referring to Sexually Transmitted Diseases.

Yes, I had another user reporting problem because of that too. Sorry about that.

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

Thank you Frictional Games and Thank you Andreas Jonsson.smile.png

This topic is closed to new replies.

Advertisement