Skip to main content
GameDev.net gamedev.net
🔒 Locked

AngelScript 2.26.0 is out

Started by WitchLord Feb 3, 2013 at 4:16 PM 9 replies 3.4k views
Original Post
WitchLord
WitchLord

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 - <a href="http://www.angelcode.com/tower" rel
TechRogue
TechRogue


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. :)

andrew1b
andrew1b

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

...
WitchLord
WitchLord

@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 - <a href="http://www.angelcode.com/tower" rel
saejox
saejox

Thank you Frictional Games and Thank you Andreas Jonsson.

ruphert
ruphert

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/
WitchLord
WitchLord

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 - <a href="http://www.angelcode.com/tower" rel
BClarenbach
BClarenbach

* 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.
WitchLord
WitchLord

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 - <a href="http://www.angelcode.com/tower" rel
FDsagizi
FDsagizi

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

FDsagizi
FDsagizi


The major new enhancement in this version is the support for initializing script class members directly in the declaration.

Using it for 2 days and it is very cool! I'm happy!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.