Game Oriented Assembly Lisp facts for kids
Paradigms | Multi-paradigm |
---|---|
Family | Lisp |
Designed by | Andy Gavin |
Developer | Naughty Dog |
First appeared | 3 December 2001 |
Stable release |
3 / 7 February 2012
|
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) is a special programming language made for video games. It's a type of Lisp language. Andy Gavin and the team at Naughty Dog created it.
GOAL was used to make all the Jak and Daxter games. It was built using another programming language called Allegro Common Lisp.
Contents
What Makes GOAL Special?
GOAL's way of writing code looks a lot like another Lisp language called Scheme. But GOAL also has many features for object-oriented programming. This means it uses things like classes and inheritance. These help organize code into reusable parts.
GOAL is designed for an imperative programming style. This means programs are like a list of steps to follow. It's different from some other Lisp languages that focus on functional programming.
How GOAL Runs Games
GOAL doesn't need an interpreter to run. Instead, it gets directly compiled into PlayStation 2 machine code. This is the basic language the PlayStation 2 understands. This helps games run very fast.
GOAL also has special ways to manage memory. This helps it run smoothly on a video game console. It can even mix regular code with assembly language code. Assembly language is a very low-level way to talk to the computer. This mix helps make games run even faster.
Making Changes While Playing
The GOAL compiler was made using Allegro Common Lisp. It has a cool feature that lets programmers change code while the game is running! They can edit a part of the code, recompile it, and put it into the game. They don't have to restart the game.
This is like an "edit and continue" feature found in some other languages. But GOAL allows much bigger changes. This feature was very helpful for making the Jak and Daxter games. It even helped with loading game levels as you played.
How GOAL Was Used
GOAL was first used for the game Jak and Daxter: The Precursor Legacy. Before GOAL, Andy Gavin also made a language called Game Oriented Object Lisp (GOOL). He used GOOL for the Crash Bandicoot game.
Later, Naughty Dog stopped using GOAL for a while. This was partly because they became part of Sony. Sony wanted Naughty Dog to share their technology with other studios. But GOAL was very unique, and other studios couldn't easily use it.
Also, it was hard for new programmers to learn GOAL. And there weren't many outside tools for it. Naughty Dog had to make their own tools like compilers and debuggers. Even so, Naughty Dog did use GOAL again for some PlayStation 3 games. This includes The Last of Us.
OpenGOAL Project
A community project called OpenGOAL started in 2020. Their goal is to make GOAL work on modern computers (like those with x86-64 processors). They do this by taking existing Jak and Daxter: The Precursor Legacy and Jak II game files. Then they "decompile" them and "recompile" them to run natively.
OpenGOAL includes its own GOAL compiler. This compiler is written in C++. It also has a "read–eval–print loop" (REPL). This helps programmers work in a similar way to how Naughty Dog originally did. By November 2023, the OpenGOAL team had made versions of both games that can be fully played on Windows and Linux computers. A version for Jak 3 is also being made as of 2024[update].