Jump to content

  • Log In with Google      Sign In   
  • Create Account

Andreas Jonsson

Member Since 26 Mar 2000
Offline Last Active Oct 23 2016 03:20 PM

#5316127 AngelScript execution speed?

Posted by on 21 October 2016 - 03:34 PM

How much faster do you think AngelScript should be? 10% faster? 50% faster? Twice as fast? 10 times faster? :)


If you have any suggestions for how to optimize the code I would be very interested in hearing that. 


It's so funny (but also frustrating) when AngelScript is compared with Lua. I would love to have the resources that the team behind Lua has. You do know that Lua was invented back in 1993 by a team at a university and is still maintained by that same university (PUC-Rio in Brazil) and has actual investment money behind it? AngelScript on the other hand was invented by me in 2003 and is maintained by me with zero investment money? I've been working on AngelScript on my spare time for 13,5 years now. While some of the code has been contributed by community members it is practically a work done by a one-man-team. 


All things considered I think AngelScript is comparing quite well to other scripting libraries out there (including Lua). 


PS. Have you tried Blind Mind's JIT compiler for AngelScript? Perhaps it will allow you to get the performance you want.

#5315377 Variadics

Posted by on 15 October 2016 - 07:15 PM

I'm afraid not. I have not had the time to work on this. While variadics are on my to-do list it is still not one of the top priorities.

#5314911 BMFont v1.9c

Posted by on 12 October 2016 - 06:38 PM

Hi Anton,


version 1.9c is almost 10 years old by now. I searched through my old backup files. Unfortunately I didn't find the installer for it, but I did locate the source code.


I've uploaded it to my site at the following address: http://www.angelcode.com/products/bmfont/1.9c.zip


I do not know how well it compiles with a modern compiler. But with a bit of effort you should be be able to get it to work.




#5303330 Passing "this" As Argument ?&in

Posted by on 31 July 2016 - 09:46 AM

The weakref type currently doesn't have a copy constructor or assignment operator. That's why it doesn't allow you to pass this type by value. I'll have this implemented.


I've implemented this in revision 2340.

#5303249 Passing "this" As Argument ?&in

Posted by on 30 July 2016 - 05:04 PM

1. yes. h will hold a reference to foo, and thus increase the ref count. You can inspect the value of the ref count by calling AddRef() and then Release(). Both methods return the refcount.


2. @h.method() would mean "call method() on the object referred to by h, and then take the address of the returned type". I should probably add a warning, if the @ symbol is used in cases like this.


3. If the left hand expression has the @, then the compiler already knows that the right hand expression also must be operating on the address, so it implicitly adds the @ if it is not there.


4. Same thing as 2


5. Think of the @ operator as "work on the address of the object". When not using the @ operator you will be working with the actual object, not it's address. That's why when calling my_func(h) makes a copy of the object to pass into the function (since the argument is &in), but my_func(@h) passes in the address of the object.


You can also think of the @ symbol as being closer to C++ & symbol, except a variable declared as & cannot be reassigned after initialization.

#5302310 Possible Bug In Asrun Example

Posted by on 24 July 2016 - 10:19 AM

I've fixed this in revision 2336

#5302207 Delayed Calls

Posted by on 23 July 2016 - 01:45 PM

Yes, it is possible and support for variadics is already on my to-do list, but currently not prioritized.

#5301089 Clang Asgettypetraits

Posted by on 17 July 2016 - 10:25 AM

Fixed in revision 2335

#5301082 Clang Asgettypetraits

Posted by on 17 July 2016 - 09:59 AM

Thanks. I'll add defined(__clang__).

#5298148 AngelScript 2.31.1 is out

Posted by on 26 June 2016 - 03:53 PM

Despite it being 4 months since the last release, this is not a big release. This release contains mostly bug fixes and a few minor enhancements.


I would have liked to include more, but time to work on AngelScript has been very short the last months. Rather than prolonging the release further until I had the time to implement something bigger, I decided it was time to release what I had so that everyone can take advantage of the bug fixes.




#5298030 Problem with a function of C++ object which returns a delegate to the AngelSc...

Posted by on 25 June 2016 - 03:36 PM

Is this with version 2.31.0? 


Have you tried the latest WIP version? Several bugs related to function pointers crept into version 2.31.0, but all of them have been fixed in the WIP version already (including a bug that prevented returning function pointers from registered functions)

#5292546 The compiler crashes

Posted by on 19 May 2016 - 06:20 PM

As I suspected. This problem had already been fixed in the latest WIP version.



Thanks for the compliments on the library. Let me know if you encounter any other problems, or have any suggestions for how to improve the library further.




#5290891 Various unexpected behaviors of AngelScript 2.31.0

Posted by on 09 May 2016 - 04:29 PM

Thanks for letting me know. I'll look into it.

#5290677 BmFont does not includes invalid char glyph in my own font

Posted by on 08 May 2016 - 11:34 AM

The following is used to determine the glyph index for the invalid char glyph:

// Get the default character instead
GetTextMetricsW(dc, &tm);
WORD glyph;
fGetGlyphIndicesW(dc, &tm.tmDefaultChar, 1, &glyph, 0);
idx = glyph;

There appears to be a bug in BMFont when not rendering the glyphs from the true type outline though. I'll need to investigate and fix this.

#5284410 Refcount mismatch when discarding module.

Posted by on 30 March 2016 - 08:57 PM

I've fixed the bug in revision 2309. 


If you don't want to upgrade to the latest revision from the SVN, you ought to be able to apply this fix locally to version 2.30.2.