Welcome to AngelCode.com. Here you'll find resources for game development and more.

The most popular visits here are to the following pages: AngelScript - a powerful and free scripting library, BMFont - a free bitmap font generator, or RefDB - a database of useful developer resources. But feel free to browse the site for more resources.

AngelCode.com is maintained by Andreas Jönsson since 2001. Please help the continued maintainance and further development of the resources here with a donation.

Latest updates

2015-02-22   AngelScript 2.30.0

It's been almost exactly 4 months since the last release. This is longest period I've gone without making a new release since this project started back in 2003. This does not mean that development has slowed down though, I merely restrained myself from releasing the code so I could fit more improvements into it. If you take a peek at the change log you'll see that this is by far the largest update too.

As always, when I change the middle version number there are some changes in the interface. The changes are not dramatic, but might require some minor code changes. The most dramatic change in the interface is the removal of the behaviours asBEHAVE_REF_CAST and asBEHAVE_VALUE_CAST (+implicit versions). These behaviours should now be registered as object methods with the names opCast and opConv, respectively. The implementation of the functions in the application doesn't change, just how they are registered with the engine.

I've improved the internal memory management so that less objects will be placed in the garbage collector. This translates into improved performance as less CPU will be required to clean up the dead objects in the GC. The change will perhaps not be too noticeable at runtime, but during recompilation of scripts and engine shutdown you should definitely see a significant improvement.

The script language has gotten some improvements too. The ternary condition operator can now be used as lvalue (as long as both options are lvalues of the same type). Script classes can implement the opCast and opConv operator overloads. Compound assignments can now be used with virtual properties too. Class members can be declared as protected, with the same meaning as in other languages.

There are of course enhancements in the add-ons too, but I'll leave the discovery of those to the reader.

New developer references

2015-02-18   iOS ABI Function Call Guide
2015-01-16   Basic Theory of Physically-Based Rendering
2014-12-15   The Component Object Model

2014-10-21   AngelScript 2.29.2

This incremental release brings a few minor improvements along with the usual batch of bug fixes.

Perhaps the most exciting new feature is the ability for script classes to implement type conversions, by including methods named opConv for explicit conversions or opImplConv implicit conversions. The compiler will find the correct overload to call by examining the return type, so even though these methods do not take any arguments it is still possible to allow classes to be converted to multiple different types.

The rest of the improvements are quite minor and should be transparent to the application developers.

I'd also like to take the opportunity to advertise the recently released AngelScript Add-on Template Library by Sami Vuorela. This library complements the standard add-ons in the SDK with 6 new templated container classes. If you feel the standard add-ons are a bit limited, then you should definitely take a look at these.

New developer references

2014-10-09   HWiNFO
2014-10-09   A thousand ways to pack the bin
2014-10-05   Koyote Free Video Converter
2014-07-29   Geometric Tools
2014-07-28   Triangulation by Ear Clipping

2014-07-20   AngelScript 2.29.1

This is a quite small release compared to the previous ones. Still, it is an important one as it corrects a mistake in the last release regarding the syntax for named arguments.

In version 2.29.0 the support for naming the arguments when calling functions was implemented using the following syntax: func(arg1 = expr1, arg2 = expr2). The problem with this syntax was that it would not be obvious to the reader when an argument happened to have the same name as a variable.

So, I decided to change this syntax to use the following syntax instead: func(arg1: expr1, arg2: expr2). I'd like to think of it as labelling the arguments.

For those, who prefer the = token, or don't want break backwards compatibility I've added an engine property asEP_ALTER_SYNTAX_NAMED_ARGS that can be used to optionally support the previous syntax.

This release also brings a couple of other minor enhancement, such as the support for registering template types as value types, declaring script classes as abstract, and the inclusion of asGetTypeTraits() as part of the official SDK interface.

New developer references

2014-07-16   Online PDF Converter
2014-06-28   Zeal

2014-06-09   AngelScript 2.29.0

After an unusually long period a new version is finally out. This version comes with a number of smaller enhancements. Too many to list here, so if you want details, please check the change list.

The most important improvements are the following:

A new flag to support C++ array types: asOBJ_APP_ARRAY. This flag introduced for C++ types like the following: 'typedef float vec3f[3]', as this kind of types didn't follow the ordinary calling convention for classes nor primitives.

Thanks to GGLucas the script language now supports named arguments when calling functions. This means that you can now call a function using the following syntax: 'func(arg1 = expr, arg2 = expr2)' and so on. When this is done, the compiler will rearrange the arguments by their names so that the order matches the declaration. This works especially well together with default arguments, as you will be able to provide only a few of the arguments, leaving the rest with the default value.

Also thanks to GGLucas the script language now supports auto types in variable declarations with initialization expressions. Just like in C++ the compiler will deduce the type of the variable from whatever type the expression evaluates too.

I've implemented a new operator overload 'opHndlAssign'. Types registered with asOBJ_ASHANDLE should use this operator overload instead of the ordinary 'opAssign' to implement the handle assign operation. This together with an enhancement to asBEHAVE_VALUE_CAST to allow the generic form 'void f(?&out)' has allowed me to implement a nicer syntax for managing the values in the dictionary add-on:

  int val = int(dict['value']);
  dict['value'] = val + 1;
  obj @handle = cast<obj>(dict['handle']);
  if( handle is null )
    @dict['handle'] = object;

This should lend itself well for implementing a true 'variant' type. Perhaps that's even something I'll try for an upcoming release.

The engine has a couple of new callbacks calls RequestContext and ReturnContext. These callbacks can be used to implement context pooling for better performance, and they can also be used to pre-configure contexts that will be used internally by the engine, e.g. to debug script class destructors called from the garbage collector.

Jordi Oliveras Rovira has taken the time to implement support for functor calling conventions asCALL_THISCALL_OBJFIRST and asCALL_THISCALL_OBJLAST. These work similarly to the existing asCALL_THISCALL_ASGLOBAL where the application supplies the a pointer to the functor object that emulates the function/method that the script calls. With this it is now perfectly possible to use for example std::function to implement proxy/wrapper functions if so desired.

New developer references

2014-05-25   Adding AngelScript to a Game

2014-04-12   BMFont has gone open source

I've decided to celebrate the 10 year anniversary of the Bitmap Font Generator tool by opening up the source code to the public.

The license model I chose is the same as I use for my other projects, angelscript and the tool box, i.e. the zlib license. This will allow you to use the code unhindered by any restrictive clauses in the license.

If you do make any improvements to the code I would very much like to see them, and even incorporate them into the svn for others to benefit from them too.

Happy coding!