Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

AngelScript 1.9.2a FINAL (2004/10/12)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
12 replies to this topic

#1 Andreas Jonsson   Moderators   -  Reputation: 3289

Like
0Likes
Like

Posted 30 September 2004 - 02:35 PM

I just uploaded version 1.9.2 to the site. The new feature is the addition of constructors with parameters. These constructors are registered just like before except with parameters. I've optimized the library sligthly more and I believe that AngelScript may now actually be faster than Lua. In fact I'm willing to challenge any other scripting language to find a realistic situation where it is faster than AngelScript. It's not a competition, I'm just trying to find inspiration to make AngelScript even faster. If there is a scripting language faster than mine, maybe I can learn from it and use that knowledge to advantage. Scripting languages with JIT compilation doesn't count as they are playing in a different class. When AngelScript has JIT compilation I will challenge those as well. I've already started working on version 1.10.x, which will add native support for arrays. It will improve various points in the library interface to make it easier to use (without breaking backwards compatibility though [wink]). [Edited by - WitchLord on October 12, 2004 12:25:40 PM]
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3289

Like
0Likes
Like

Posted 30 September 2004 - 02:44 PM

I forgot to send thanks to Andres Carrera who sent me the code that got me going on implementing constructors with parameters. His code added support for constructors with parameters, but only for global variables, and only for some parameter types. I ended up using very little of his code, but he got the ball rolling so he deserves a big thanks anyway.

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

#3 kaysik   Members   -  Reputation: 382

Like
0Likes
Like

Posted 30 September 2004 - 04:46 PM

every time i turn around AS has another update :D nice work!

I just gota get my game to a demo state so you can see where all your hard work is going now!

#4 abrken   Members   -  Reputation: 130

Like
0Likes
Like

Posted 30 September 2004 - 06:40 PM

Great job again.

I think that you better like coding than writing ... documentation, no ?

It's ok for me with test_framework, but can you please on each release (even with WIP) tell the xxxxx.cpp files that expose new features (or modified) in test_framework (this project become larger and larger !).

Best regards,

AbrKen.


#5 AxoDosS   Members   -  Reputation: 284

Like
0Likes
Like

Posted 30 September 2004 - 06:51 PM

(sorry about the double post, forgot to login)

Quote:
Original post by WitchLord
I've optimized the library sligthly more and I believe that AngelScript may now actually be faster than Lua. In fact I'm willing to challenge any other scripting language to find a realistic situation where it is faster than AngelScript. It's not a competition, I'm just trying to find inspiration to make AngelScript even faster. If there is a scripting language faster than mine, maybe I can learn from it and use that knowledge to advantage.


That sounds great. I am looking forward to the day where I will be implementing the scripting system into my new engine (still have alot of work that needs to be done before I get there).

#6 EddHead   Members   -  Reputation: 140

Like
0Likes
Like

Posted 01 October 2004 - 02:03 AM

I agree with Andreas on the necessity of a JIT, which would completely change the need for a scripting language in the first place.

If we needed JIT we would be pretty comfortable using C# as a scripting solution instead (sample present on the DX9.0c SDK), So I guess we would never need a JIT compiler for Angelscript or maybe as just a final release option.

My thoughts are usage for a scripting language is just to increase Turn-About-Time during development, and i am using Angelscript for the C++ similarity, since what i would be doing is dumping this code directly into C++ files and enabling an option for the Modder to redirect each of these parts to a script. hence making sure the orignal game is at peak performance. a JIT would prove useful as a packaging tool to perhaps finalize a MOD for the game.

Comments please!
Jayanth.KRaptor Entertainment Pvt. Ltd.http://www.raptorentertainment.com---------------------------------------------------------Why Mr. Anderson? Why? ...Why keep fighting? Do you think you're fighting for something - for more than your survival? Can you tell me what it is? Do you even know? Is it freedom, or truth, perhaps peace, could it be for love? Illusions Mr. Anderson, vagaries of perception. Temporary constructs of a feeble human intellect trying desperately to justify an existence without meaning or purpose.

#7 Andreas Jonsson   Moderators   -  Reputation: 3289

Like
0Likes
Like

Posted 01 October 2004 - 03:45 AM

kaysik:

I look forward to seeing your next project. I intend to try out your Knock-Off game this weekend as I think it looks interesting.

abrken:

Yeah, I definitely like coding better than documenting. Who doesn't? [wink]. I do try to keep the documentation up-to-date with the code though.

The test framework usually only have additions, as I use it to guarantee that I don't break functionality (regression testing).

I think that I already write enough information about what is new. Check the change log (for new features) and the update instructions (for altered features). If you want more detail about the exact code that was changed then may I suggest WinMerge, it's an excellent free program for comparing entire directory structures.

AxoDosS:

No, worries. I deleted the other post.

I look forward to that as well. You're other projects are already very impressive, you just need to glue them together to a final product [smile].

EddHead:

AngelScript will have JIT compilation, but without loosing the features and flexibility of a scripting language. This means that even when the code has been JIT compiled the script functions should still be suspendable and resumed at will. This will obviously not be as fast as a complete JIT compilation, but I believe that execution speeds could reach the performance of an order of 10 times slower than C++ (today it is an order of 50 times slower).
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#8 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

0Likes

Posted 01 October 2004 - 07:16 AM

is registering class members as behaviour possible with 1.9.2?
I'm having trouble with asBEHAVE_ADD /SUBTRACT/MULTIPLY but asBEHAVE_ASSIGNMENT is working.

Thanks

#9 Andreas Jonsson   Moderators   -  Reputation: 3289

Like
0Likes
Like

Posted 01 October 2004 - 08:18 AM

No, not yet. These behaviours must be registered with global functions. Example:

engine->RegisterObjectBehaviour(0, asBEHAVE_ADD, "obj f(const obj &, const obj &)", asFUNCTION(AddObj), asCALL_CDECL);

Obj AddObj(const obj &a, const obj &b)
{
return a + b;
}

I may include registration of these behaviours as member methods in a future version, but it is quite far down on my to-do list.

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

#10 Lioirc   Members   -  Reputation: 142

Like
0Likes
Like

Posted 01 October 2004 - 09:56 AM

Hey mate

you are welcome :)

Glad to see my code helped a little to this great library

I forgot to tell you that to support copy constructors is matter of simply adding 2 or 3 lines to the CompileCOnstructorArguments function pushing the address of the reference object, but i think you know this by now or probably it is already implmented

In the next days I will send you a totally new virtual machine for angelscript, its a asm_x86 vm, as i dont have scripts to test the performance, probably you can post this ASx86 version on your site so others can test it and put here the results
If the performance changes made in the last releases are mainly on the compiler part, as removing opcodes or blending them, my asmx86 vm will benefit of those chenges. I havent tested its performance, but the ops needed where reduced to 1/3 of your vm and the opcode interpretation was improved with a relocation table

I was going to start the JIT compiler, but looking at the comments here, seems that there is no interest for JIT, so probably i will need to talk with you first

Lioric
cgiscript@hotpop.com

#11 Andreas Jonsson   Moderators   -  Reputation: 3289

Like
0Likes
Like

Posted 01 October 2004 - 11:23 AM

Yes, copy constructors are working as well. In fact any type of arguments are working.

It's really cool that you wrote the VM in assembler. I was going to do that myself, in order to see if I could increase performance. I'll do some tests with your assembly code to see how the performance changes. I suspect it might be as much as 2 times faster, which would be a very good thing.

As I said before, AngelScript will have JIT compilation. But it shouldn't just take the function's bytecode and convert everything to native code. Instead it should break up the bytecode in smaller sequences and convert each of those into native code. The sequences should be laid out in such a way that context->Suspend(), context->Abort() and context->SetException() still work. I still have to analyze exactly how that should be done. In the future I also plan to implement coroutines, and the JIT compilation mustn't disallow that either.

If you want to write a JIT compiler that simply converts everything that would be ok. I could take that code and redesign it to follow my goals. That would help me greatly as I currently don't know exactly how to go about doing JIT compilation. I haven't had the time to look closer at SoftWire, or possibly my own internal implementation.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#12 kaysik   Members   -  Reputation: 382

Like
0Likes
Like

Posted 01 October 2004 - 09:49 PM

haha - I'm sure you'll love all my programmer art in KO :D Watch out for the key bindings though, almost everyone gets confused when they first load it up and try to use WSAD and the mouse - check the manual for how to play :P

#13 Andreas Jonsson   Moderators   -  Reputation: 3289

Like
0Likes
Like

Posted 12 October 2004 - 06:27 AM

I've collected all the bug fixes found for 1.10.0 and applied them to version 1.9.2a. The bug fixes are:

- bug fix: Subtraction was optimized as if it was associative (thanks Lennart Denninger)
- bug fix: SetArguments() failed for script functions that returns registered object types by value. (thanks Thomas Suter)
- bug fix: The application would crash if an exception was raised in ExecuteString() (thanks Joe "Desdemona" Wright)
- bug fix: GetFunctionName() and GetFunctionDeclaration() now works for the ExecuteString() function id as well.
- bug fix: The compiler didn't warn when passing uninitialized variables to function parameters (thanks Alain "abrken" Bridel)
- bug fix: Constructors with parameters could cause assertion failure in GenerateExceptionHandler(). (thanks Alain "abrken" Bridel)


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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS