Game Oriented Assembly Lisp
From Wikipedia, the free encyclopedia
Game Oriented Assembly Lisp (or GOAL) is a computer game programming language developed by Andy Gavin at Naughty Dog. It was written using Allegro Common Lisp, and used in the development of the entire Jak and Daxter series of games.
Syntactically GOAL somewhat resembles Scheme, though with many idiosyncratic features inspired by other languages such as class inheritance and virtual functions. An example of what GOAL code looks like can be found at [1]. GOAL requires an imperative programming style: programs are comprised of sequence of events to be executed rather than the functional programming style of functions to be evaluated recursively. This is a diversion from Scheme, which allows such side-effects but does not encourage imperative style.
Like many modern implementations of Common Lisp, GOAL does not run in an interpreter, but instead is compiled directly into PlayStation 2 machine code for execution. However, it offers no facility for garbage collection and only very limited means for dynamic memory allocation generally; these are design features intended to make it well-suited to running in constant memory on a video game console. GOAL has extensive support for inlined assembly code, allowing programmers to freely mix assembly and higher-level constructs within the same function.
Because the GOAL compiler itself runs in Allegro Common Lisp, the compiler knows a great deal about the state of the running program, including the symbol table. This allows a function to be edited, recompiled, uploaded, and inserted into a running game without having to restart. The process is similar to the "edit and continue" feature offered by some C++ compilers, but allows the programmer 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 also used to implement the Jak and Daxter games' level-streaming.
GOAL's first use was for the original Jak and Daxter PS2 game; the predecessor language, GOOL, was also developed by Andy Gavin for Crash Bandicoot.
[edit] External links
- http://www.franz.com/success/customer_apps/animation_graphics/naughtydog.lhtml — Franz Inc. success story
- http://bc.tech.coop/blog/060118.html — Page about LISP developments by Paul Graham and Naughty Dog
- http://www.gamasutra.com/features/gdcarchive/2003/White_Stephen.ppt — (Powerpoint) Jak & Daxter: The Precursor Legacy, development overview, lessons learned, very interesting
- http://www.gamasutra.com/features/gdcarchive/2003/Denman_Stu.ppt — (Powerpoint) Highly detalied continuous worlds, about the streaming world loader
- http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/79084d68de29126e/dc50739114bc23f0?lnk=st&q=%22Scott+Shumaker%22&rnum=1#dc50739114bc23f0 — a comp.lang.lisp post from USENET