| Game Oriented Assembly Lisp | |
|---|---|
| Paradigms | Multi-paradigm |
| Family | Lisp |
| Designed by | Andy Gavin |
| Developer | Naughty Dog |
| First appeared | 3 December 2001; 24 years ago (2001-12-03) |
| Stable release | 3 / 7 February 2012; 14 years ago (2012-02-07) |
| Typing discipline | Dynamic,latent,strong |
| Scope | Lexical |
| Implementation language | Allegro Common Lisp |
| Platform | PlayStation 2,PlayStation Portable,PlayStation 3 |
| License | Proprietary |
| Influenced by | |
| Lisp,Scheme, Game Oriented Object Lisp (GOOL) | |
Game Oriented Assembly Lisp (GOAL, also known asGame Object Assembly Lisp) is aprogramming language, adialect of the languageLisp, made forvideo games developed byAndy Gavin and theJak and Daxter team at the companyNaughty Dog.
It was written usingAllegro Common Lisp and used in the development of the entireJak and Daxter series of games (excludingDaxter andJak and Daxter: The Lost Frontier).
GOAL'ssyntax resembles the Lisp dialectScheme, though with many idiosyncraticobject-oriented programming features such asclasses,inheritance, andvirtual functions.[1] GOAL encourages animperative programming style: programs tend to consist of a sequence of events to be executed rather than thefunctional programming style offunctions to be evaluated recursively. This is a diversion from Scheme, which allows suchside effects but does not encourage imperative style.
GOAL does not run in aninterpreter, but instead iscompiled directly intoPlayStation 2 machine code to execute. It offers limited facilities forgarbage collection, relying extensively onruntime support. It offers dynamic memory allocation primitives designed to make it well-suited to running in constantmemory on a video game console. GOAL has extensive support forinlinedassembly language code using a specialrlet form,[1] allowing programs to freely mix assembly and higher-level constructs within one function.
The GOAL compiler is implemented inAllegro Common Lisp. It supports a long term compiling listener session which gives the compiler knowledge about the state of the compiled and thus running program, including the symbol table. This, in addition to dynamic linking, allows a function to be edited, recompiled, uploaded, and inserted into a running game without having to restart. The process is similar to theedit and continue feature offered by someC++ compilers, but allows programs to replace arbitrary amounts of code (even up to entire object files), and does not interrupt the running game with the debugger. This feature was used to implement code and to enable level streaming in theJak and Daxter games.
GOAL's first use was for the gameJak and Daxter: The Precursor Legacy. The predecessor language, Game Oriented Object Lisp (GOOL), was also developed by Andy Gavin forCrash Bandicoot.
Since Naughty Dog no longer employs GOAL's primary development and maintenance engineer, and they were under pressure from their newparent company,Sony, to share technology between studios, Naughty Dog transitioned away from Lisp:[2]
In all honesty, the biggest reason we're not using GOAL for next-gen development is because we're now part of Sony. I can only imagine Sony's shock when they purchased Naughty Dog a few years back, hoping to be able to leverage some of our technology across other Sony studios, and then realized that there was no way anyone else would be able to use any of our codebase. Sony wants us to be able to share code with other studios, and this works both ways - both other studios using our code and vice versa. Add this to the difficulty curve of learning a new language for new hires, lack of support from external development tools (we had our own compiler, linker, and debugger, and pretty much had to useEmacs as ourIDE), etc, means that there are clearly a lot of other factors involved. Note, however, that these issues aren't really technical problems, they're social ones.
— Scott Shumaker
However, they have since resumed using it for scripting on somePlayStation 3 games, includingThe Last of Us.[3]
A community project, OpenGOAL, started in 2020 with the goal of porting GOAL tox86-64 by decompiling existingJak and Daxter: The Precursor Legacy,Jak II,Jak 3 and, tentatively,Jak X: Combat Racing assets and recompiling them natively.[4] It includes a GOAL compiler written in C++ as well as aread–eval–print loop to enable a similar workflow to Naughty Dog's original implementation. By November 2023, the OpenGOAL team had produced Windows and Linux ports for the first two games that are 100% completable,[5][6] with aJak 3 port in development as of 2026[update].[7][8]