Features
Script language
- Familiar syntax - The script syntax is similar to that of C or C++, with only a few differences.
- Statically typed - Unlike most scripting languages that are dynamically typed this one uses the same static types as C++, and applications can register additional types.
- Object oriented - The script language allows for declaration of classes, with support for single inheritance and polymorphism through interfaces.
- Object handles - Pointers are not safe in a scripted environment, so AngelScript uses object handles instead. Object handles are almost like smart pointers, that control the life time of the object they hold.
- Sandboxing - The library provides a secure environment for the scripts, i.e. the scripts can only access what the application explicitly exposes, and any built-in script objects are completely secure.
- International support - The script files can be encoded in ASCII or UTF-8. String constants can include UTF-8 encoded characters directly or can use escape sequences to add specific unicode code points. UTF-16 encoded string literals is also supported.
Engine
- Run-time compiled - The library compiles the scripts into byte code and executes the byte code through a virtual machine.
- Step by step execution - The scripts may be executed line by line, for controlled execution and debugging.
- Detailed exceptions - When an exception occurs information about why and where can easily be obtained.
- Line interpretation - The engine can interpret separate script lines using the currently compiled script. Useful for in-game consoles.
- Saving/loading byte code - The compiled bytecode can be saved and reloaded at a later time. The bytecode is platform independent.
- Modular - Scripts can be compiled into modules that can be dynamically linked with each other.
- Concurrent scripts - Several scripts can be executed in parallel, by suspending and resuming them one by one. This allows for easy implementation of multi-tasking schemes, or even co-routines.
- Debugging support - The application can examine the call stack and the value of local variables while running the scripts. The line callback feature allows the application to use breakpoints, do profiling, etc.
- Real-time capable - The execution time is deterministic and doesn't vary.
Integration
- Direct access - The script engine can directly access and use registered functions, objects, and object members without the need to write proxy functions (where native calling conventions are supported).
- C++ interface - The standard application interface is C++, but a C interface can easily be written that can be used by languages that don't interact well with C++ interfaces. It has for example successfully been used in Delphi projects.
- Multithreading - The library can be used in a multithreaded environment.
- Memory management - Objects are reference counted for easy management of objects that pass between script and application. An iterative garbage collector is used where circular references can occur. The application can also completely control the library's memory usage.
Portability
- Cross platform - It has been confirmed to work on Windows, Linux, MacOS X, XBox, XBox 360, XBox One, PS2, PSP, PS3, PS4, PS Vita, Dreamcast, Nintendo DS, Windows Mobile, iPhone, BSD, and Android.
- CPU independent - Both 32bit and 64bit platforms are supported. Both big endian and little endian CPUs are supported. Confirmed CPUs: x86, amd64, sh4, mips, ppc, ppc64, arm, s390x.
- Compiler support - It works with MSVC++, GNUC, MinGW, DJGPP, Borland C++ Builder. Other compilers haven't been formally tested but are likely to work as well.
- Native calling conventions - The library support native calling conventions, i.e. without the need for wrappers on the following configurations and other compatible ones:
- Win32 - MSVC - x86
- Win32 - MinGW - x86
- Win32 CE - MSVC - arm
- Win64 - MSVC - x86/64
- Win64 - MinGW - x86/64
- Linux - GNUC - x86/64
- Linux - GNUC - arm/arm64
- Linux - GNUC - mips
- Linux - GNUC - risc-v 64
- MacOS X - GNUC - x86
- MacOS X - GNUC - x86/64
- MacOS X - GNUC - ppc
- iOS - GNUC - arm
- iOS - GNUC/Clang - arm/arm64
- BSD - GNUC - x86
- BSD - GNUC - x86/64
- Dreamcast - GNUC - sh4
- PSP - GNUC - mips
- PS2 - GNUC - mips
- PS3 - GNUC - ppc/64
- PS4 - GNUC - x86/64
- PS Vita - GNUC - arm
- XBox - MSVC - x86
- XBox 360 - MSVC - ppc/64
- XBox One - MSVC - x86/64
- Android - GNUC - arm/arm64
- Android - GNUC - mips
- Haiku - GNUC - x86
- Nintendo Switch - GNUC - arm64
- Maximum portability mode - When the library is compiled in this mode it should work on just about any compiler/platform that can compile standard compliant C++ code. Some features like native calling conventions are not available in this mode.
- Cross language - With the flat C interface, other languages, such as Delphi, are also able to use the library. The library has also been successfully integrated in .NET based applications through the C++ interface. It is has even been used in web applications by compiling it with emscripten and Chome PNaCl.
Other
- No costs - The scripting library is completely free for all use, though donations are appreciated.
- Well documented - Both the script language and library is fully documented.