AngelScript
An embeddable, statically-typed scripting language designed to mirror C++ syntax, enabling seamless integration between scripts and host applications — widely used in game development.
Created by Andreas Jonsson
AngelScript is an embeddable scripting language created by Andreas Jonsson, designed to integrate seamlessly with C++ host applications. First released publicly in 2003, it distinguishes itself from other embeddable scripting languages by closely mirroring C++ syntax and providing direct access to registered C++ types and functions without requiring proxy wrappers. This design makes it particularly popular in game development, where the performance-critical engine is written in C++ and gameplay logic is scripted. AngelScript has been used in commercially successful games including the Amnesia series, SOMA, It Takes Two, and Split Fiction.
History & Origins
Background and Motivation
Andreas Jonsson, a developer operating under the name “AngelCode,” began work on AngelScript in February 2003. The language was motivated by a gap in the existing landscape of embeddable scripting languages: most options at the time either used syntax unfamiliar to C++ developers or required cumbersome proxy functions to bridge between script code and host application code. Jonsson wanted a scripting language that a C++ programmer could learn quickly because its syntax would already be familiar, and one that could call registered C++ functions and access C++ objects directly using native calling conventions.
First Release (2003)
Development moved quickly. The first version with basic functionality was made available on March 28, 2003, just over a month after development began. Version 1.0, the first numbered public release, followed at the end of June 2003. Even in its initial form, the language supported registering C++ functions for use from scripts and compiling script code to bytecode for execution on a virtual machine.
Evolution of Object-Oriented Features (2005-2011)
AngelScript’s object-oriented capabilities were added incrementally over several years. Version 2.2.0 (2005) introduced script classes, initially called “structs.” Interfaces arrived in version 2.7.0 (2006), providing a mechanism for multiple inheritance. Single class inheritance came in version 2.15.2 (2009), function pointers in version 2.18.2 (2010), and automatic garbage collection for circular references in version 2.21.0 (2011). This gradual build-up reflects the language’s evolution from a simple scripting system to a comprehensive object-oriented language.
Adoption in Game Development
AngelScript gained early traction in the indie game development community. Frictional Games adopted AngelScript for their HPL Engine around late 2004, using it throughout their Penumbra series (2007-2008) and later in Amnesia: The Dark Descent (2010) and SOMA (2015). Wolfire Games chose AngelScript for Overgrowth after evaluating multiple scripting languages, citing its C++-like syntax, native C++ integration, and operator overloading support as key advantages over alternatives like Lua and V8.
The language’s profile rose significantly when Hazelight Studios developed an open-source Unreal Engine plugin that integrated AngelScript as a scripting layer for UE5. Their game It Takes Two (2021) shipped with the majority of its gameplay written in AngelScript, and the subsequent Split Fiction (2025) contained over 1.7 million lines of AngelScript across more than 16,000 script files.
Recent Developments
Version 2.38.0, released on August 8, 2025, was described by Jonsson as “probably the biggest update” to AngelScript to date. It added variadic functions, foreach loops, and template function registration. Also in 2025, the source code repository moved from SourceForge to GitHub, modernizing the project’s development infrastructure with automated testing.
Design Philosophy
C++ Familiarity
AngelScript’s core design principle is syntactic and semantic proximity to C++. The language was intentionally designed so that C++ programmers can write scripts with minimal learning curve. Class declarations, function signatures, operator overloading, and control flow constructs all follow C++ conventions closely. This is not merely cosmetic — it allows the script engine to register C++ types directly without proxy functions, because the type systems align naturally.
Embeddable by Design
AngelScript is fundamentally a library, not a standalone language runtime. Scripts cannot run independently — they require a C++ host application that creates the script engine, registers the functions and types that scripts are allowed to access, compiles script modules, and executes them through script contexts. This architecture gives the host application complete control over what capabilities scripts have access to.
Security Through Sandboxing
Because the host application explicitly registers every function and type available to scripts, AngelScript provides a natural sandboxing model. Scripts can only interact with what the host chooses to expose. The host can further refine this with access profiles, exposing different interfaces to different script modules — for example, providing GUI scripts with UI functions while giving AI scripts access to pathfinding and behavior tree interfaces.
Key Features
Native C++ Integration
The defining feature of AngelScript is its direct integration with C++. Host applications register C++ functions, classes, and methods with the script engine, and scripts can call them using native calling conventions on supported platforms. This means there is no marshaling overhead or proxy layer for most function calls — the script engine invokes the C++ function directly.
| |
Static Typing
AngelScript uses static, strong typing. All variables must have a declared type, and type mismatches are caught at compile time rather than runtime. The official documentation notes that this design “enables faster execution of the code and smoother interaction with the host application as there will be less need for runtime evaluation of the true type of values.”
Bytecode Virtual Machine
Scripts are compiled to bytecode and executed through a virtual machine. The bytecode is platform-independent and can be saved to disk and loaded later, allowing pre-compilation. Multiple script contexts can run simultaneously, and each context supports suspension and resumption — enabling cooperative multitasking and coroutine-style programming patterns.
Object Handles
AngelScript provides object handles, which function similarly to smart pointers in C++. Handles use reference counting to manage object lifetimes, providing safe pointer-like functionality without the dangers of raw pointers. An incremental garbage collector detects and frees circular references, described in the documentation as providing “a controlled environment without application freezes.”
Script Classes and Inheritance
Script-defined classes support single inheritance, interfaces for a form of multiple inheritance, operator overloading, and virtual methods (all methods are virtual by default, including constructors and destructors):
interface IRenderable
{
void render();
}
class Entity
{
string name;
float x, y;
Entity(const string &in name)
{
this.name = name;
this.x = 0;
this.y = 0;
}
void update(float dt)
{
// Base update logic
}
}
class Player : Entity, IRenderable
{
Player() { super("Player"); }
void update(float dt) override
{
// Player-specific update
}
void render()
{
// Render the player
}
}
Debugging Support
The host application can inspect the call stack and local variables at runtime through the script context API. A line callback feature allows the host to implement breakpoints, single-stepping, and profiling. This is particularly valuable in game development where debugging script behavior during live gameplay is essential.
Cross-Platform Support
AngelScript supports native calling conventions on multiple platforms including Windows (x86, x86-64), Linux (x86, x86-64, ARM, ARM64), macOS (x86, ARM64), iOS, and Android. For platforms without native calling convention support, a generic “maximum portability” mode is available that uses a slower but universal calling mechanism.
Technical Architecture
AngelScript’s execution pipeline follows these stages:
- Registration: The host C++ application creates a script engine and registers the functions, types, and properties that scripts are allowed to use
- Compilation: Script source code is compiled to platform-independent bytecode within a script module
- Context creation: The host creates one or more script contexts, which serve as the execution environment (analogous to threads)
- Execution: The host prepares a context with a function entry point and executes it; the virtual machine interprets the bytecode, calling registered C++ functions directly when invoked from script
- Suspension and resumption: Contexts can be suspended mid-execution and resumed later, enabling cooperative multitasking
The architecture supports an interface for external JIT compilers (added in version 2.17.0), allowing third-party implementations to replace bytecode interpretation with native code execution for performance-critical applications.
Community and Ecosystem
AngelScript has been maintained by Andreas Jonsson as a solo project for over two decades, a remarkable feat of sustained open-source development. The language is licensed under the permissive zlib license, which has facilitated its adoption in both open-source and commercial projects.
The primary community forum has been the AngelCode section on GameDev.net, where Jonsson personally provides support and guidance to users. The source code moved from SourceForge to GitHub in 2025, bringing modern development practices including automated testing.
Several game engines have integrated AngelScript as a first-class scripting option, expanding its reach beyond individual game projects:
- Urho3D: An open-source cross-platform game engine with full AngelScript integration
- UnrealEngine-Angelscript: Hazelight Studios’ open-source plugin that enables AngelScript scripting in Unreal Engine 5
- HPL Engine: Frictional Games’ proprietary engine used across their horror game catalog
- Openplanet: A modding platform for the Trackmania racing game series
Current Relevance
AngelScript remains actively developed and increasingly visible in the game development community. The Hazelight Studios Unreal Engine plugin has been particularly impactful, demonstrating that AngelScript can scale to AAA game production with millions of lines of script code. The plugin has received contributions from studios globally and introduced AngelScript to developers who might otherwise never encounter it.
The release of version 2.38.0 in 2025, with its significant feature additions and community contributions, demonstrates the language’s continued evolution. The move to GitHub has modernized the development workflow and made the project more accessible to potential contributors.
Why It Matters
AngelScript occupies a distinctive niche in the programming language ecosystem as an embeddable scripting language that prioritizes seamless C++ integration over novelty. Its significance stems from several contributions:
Proving that scripting languages can mirror their host: While most embeddable scripting languages (Lua, Python, JavaScript) have their own distinct syntax and semantics, AngelScript demonstrated that a scripting language could closely follow C++ conventions, reducing the cognitive overhead for game developers moving between engine code and script code
Static typing in embedded scripting: At a time when most embeddable scripting languages used dynamic typing, AngelScript showed that static typing was viable and beneficial for game scripting, catching errors at compile time rather than during gameplay testing
Sustained solo maintainership: Andreas Jonsson’s continuous development of AngelScript since 2003 provides a case study in long-term open-source stewardship, maintaining quality and responsiveness for over two decades
Scaling to production: The use of AngelScript in titles like It Takes Two and Split Fiction demonstrated that an embeddable scripting language could handle the demands of modern AAA game development at scale
Timeline
Notable Uses & Legacy
Frictional Games (Amnesia series, SOMA, Penumbra)
Uses AngelScript via the HPL Engine for game scripting across their entire catalog of survival horror titles, with gameplay logic written as AngelScript modules.
Hazelight Studios (It Takes Two, Split Fiction)
Developed an open-source Unreal Engine plugin for AngelScript; Split Fiction shipped with over 1.7 million lines of AngelScript across 16,000+ script files.
Wolfire Games (Overgrowth)
Uses AngelScript for movement, AI, and fighting systems in the open-world action game.
SuperTuxKart
Uses AngelScript for track scripting and gameplay logic in the open-source kart racing game.
Urho3D
An open-source, cross-platform game engine that provides full AngelScript integration as one of its primary scripting languages.