🎉 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.0.0 WIP 4 (2005/01/19)

Started by
13 comments, last by WitchLord 19 years, 5 months ago
I uploaded WIP 2 yesterday. This version adds the initial support for object handles, and fixes a bug with sending objects by value to application functions (thanks Alan Kemp).

I still need to implement object handles with arrays, so that you can store arrays of object handles or even handles to arrays.

For an object handle to work for an object the application needs to register two functions AddRef() and Release(), using the behaviours asBEHAVE_ADDREF, asBEHAVE_RELEASE. The library will then use these methods to manage the references to the objects. If these behaviours are registered then the library will never call the objects destructor as that will be the responsibility of Release().

void Object::AddRef(){  ++refCount;}void Object::Release(){  if( --refCount == 0 )    delete this;}


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
Just uploaded WIP 3. It completes the support for object handles and brings a few bug fixes.

Some problems with calling conventions have been fixed for the Linux version, and the Dreamcast version has once again been made working. Big thanks to Fredrik Ehnbom for helping out on those departments.

Very little is missing before the final release now. I will implement a couple of new bytecode instructions to fix alignment problems on the Dreamcast (and other SH4 platforms). I will also make the assembler VM work again, its missing the latest instructions introduced with version 2.0.0.

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

I just uploaded AS 2.0.0 WIP 4. You may consider this a release candidate because I have finished all the changes I wanted to do, and I've corrected all the bugs I know of. I have also made all the necessary updates to the documentation. It is pretty much finished already, but I'll be making some tests and perhaps a few improvements to the documentation before making the final release on sunday (planned, but not guaranteed).

The changes in this version includes:

- Bug fixes, quite a few actually
- Complete support for Dreamcast. Big thanks to Fredrik Ehnbom for helping me test this and showing me what needed to be done
- The assembler VM is now working again
- The library is now by default compiled to generate line cues for ExecuteStep(), if you want to turn this off and improve performance slightly compile the library with BUILD_WITHOUT_LINE_CUES.

I've also made some final performance tests on the library to compare it against 1.10.1c. As expected 2.0.0 is a little slower than it's older brother. For primitive types the difference is only about 10%. For registered types the difference is a lot bigger though, almost half of the performance of 1.10.1c. I believe the performance for primitive types will improve to be equal or maybe even better, and for registered types the performance will improve a lot but I don't believe it will reach the performance of 1.10.1c. But this is all expected, adding security and flexibility usually has a performance impact.

Version 2.0.0 is a lot more secure than 1.10.1c which I believe is very important. 2.0.0 is also a lot more flexible in the way it handles registered types. It will soon be possible to register custom memory management per object type, behaviour functions for serializing context states, and dynamic casting of object types in class hierarchies. I will also add script declared structures, that will be possible to store outside the scripts so that application classes can be extended with script defined data. (Well, this is at least what I want to do and that I believe is possible, but as always its best not to believe it 100% until it is actually implemented and working.)

I intend to make at least one last update to the 1.10.1 version of the library with bug fixes that I've found during the development of 2.0.0. But after that I'm not so sure I will be paying attention to that version anymore, other than with requested bug fixes.

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

I can confirm that all tests pass on both dreamcast and linux.

Good job.
Excellent! I'm very pleased to hear that. Thank you. [smile]

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 topic is closed to new replies.

Advertisement