Game Oriented Assembly Lisp
   HOME

TheInfoList



OR:

Game Oriented Assembly Lisp (GOAL) is a
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming l ...
, a
dialect The term dialect (from Latin , , from the Ancient Greek word , 'discourse', from , 'through' and , 'I speak') can refer to either of two distinctly different types of linguistic phenomena: One usage refers to a variety of a language that ...
of the language
Lisp A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech. Types * A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lispi ...
, made for
video game Video games, also known as computer games, are electronic games that involves interaction with a user interface or input device such as a joystick, game controller, controller, computer keyboard, keyboard, or motion sensing device to gener ...
s developed by Andy Gavin and the ''
Jak and Daxter ''Jak and Daxter'' is an action-adventure video game franchise created by Andy Gavin and Jason Rubin and owned by Sony Interactive Entertainment. The series was originally developed by Naughty Dog with a number of installments being outsourced ...
'' team at the company
Naughty Dog Naughty Dog, LLC (formerly JAM Software, Inc.) is an American First-party developer, first-party video game developer based in Santa Monica, California, Santa Monica, California. Founded by Andy Gavin and Jason Rubin in 1984, the studio was acqu ...
. It was written using
Allegro Common Lisp Allegro Common Lisp is a programming language with an integrated development environment (IDE), developed by Franz Inc. It is a dialect of the language Lisp, a commercial software implementation of the language Common Lisp. Allegro CL provides t ...
and used in the development of the entire ''Jak and Daxter'' series of games.


Design

GOAL's syntax resembles the Lisp dialect
Scheme A scheme is a systematic plan for the implementation of a certain idea. Scheme or schemer may refer to: Arts and entertainment * ''The Scheme'' (TV series), a BBC Scotland documentary series * The Scheme (band), an English pop band * ''The Schem ...
, though with many idiosyncratic
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
features such as classes,
inheritance Inheritance is the practice of receiving private property, titles, debts, entitlements, privileges, rights, and obligations upon the death of an individual. The rules of inheritance differ among societies and have changed over time. Offici ...
, and
virtual function In object-oriented programming, in languages such as C++, and Object Pascal, a virtual function or virtual method is an inheritable and overridable function or method for which dynamic dispatch is facilitated. This concept is an important ...
s. GOAL encourages an
imperative programming In computer science, imperative programming is a programming paradigm of software that uses statements that change a program's state. In much the same way that the imperative mood in natural languages expresses commands, an imperative program co ...
style: programs tend to consist of a sequence of events to be executed rather than the
functional programming In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that ...
style of functions to be evaluated recursively. This is a diversion from Scheme, which allows such
side effect In medicine, a side effect is an effect, whether therapeutic or adverse, that is secondary to the one intended; although the term is predominantly employed to describe adverse effects, it can also apply to beneficial, but unintended, consequence ...
s but does not encourage imperative style. GOAL does not run in an interpreter, but instead is compiled directly into PlayStation 2 machine code to execute. It offers limited facilities for
garbage collection Waste collection is a part of the process of waste management. It is the transfer of solid waste from the point of use and disposal to the point of treatment or landfill. Waste collection also includes the curbside collection of recyclable ...
, relying extensively on runtime support. It offers dynamic memory allocation primitives designed to make it well-suited to running in constant
memory Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembered ...
on a video game console. GOAL has extensive support for inlined assembly language code using a special rlet form, allowing programs to freely mix assembly and higher-level constructs within one function. The GOAL compiler is implemented in
Allegro Common Lisp Allegro Common Lisp is a programming language with an integrated development environment (IDE), developed by Franz Inc. It is a dialect of the language Lisp, a commercial software implementation of the language Common Lisp. Allegro CL provides t ...
. 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 the ''edit and continue'' feature offered by some C++ 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 the ''
Jak and Daxter ''Jak and Daxter'' is an action-adventure video game franchise created by Andy Gavin and Jason Rubin and owned by Sony Interactive Entertainment. The series was originally developed by Naughty Dog with a number of installments being outsourced ...
'' games.


Uses

GOAL's first use was for the '' Jak and Daxter: The Precursor Legacy'' game. The predecessor language, Game Oriented Object Lisp (GOOL), was also developed by Andy Gavin for '' Crash Bandicoot''. Since Naughty Dog no longer employs GOAL's primary development and maintenance engineer, and they were under pressure from their new
parent company A holding company is a company whose primary business is holding a controlling interest in the securities of other companies. A holding company usually does not produce goods or services itself. Its purpose is to own shares of other companies ...
,
Sony , commonly stylized as SONY, is a Japanese multinational conglomerate corporation headquartered in Minato, Tokyo, Japan. As a major technology company, it operates as one of the world's largest manufacturers of consumer and professional ...
, to share technology between studios, Naughty Dog transitioned away from Lisp: However, they have since resumed using it for scripting on some
PlayStation 3 The PlayStation 3 (PS3) is a home video game console developed by Sony Interactive Entertainment, Sony Computer Entertainment. The successor to the PlayStation 2, it is part of the PlayStation brand of consoles. It was first released on Novemb ...
games, including ''
The Last of Us ''The Last of Us'' is a 2013 action-adventure game developed by Naughty Dog and published by Sony Computer Entertainment. Players control Joel, a smuggler tasked with escorting a teenage girl, Ellie, across a post-apocalyptic United State ...
''.


OpenGOAL

A community project, OpenGOAL, started in 2020 with the goal of porting GOAL to
X86-64 x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit version of the x86 instruction set, first released in 1999. It introduced two new modes of operation, 64-bit mode and compatibility mode, along with a new 4-level paging ...
by decompiling existing '' Jak and Daxter: The Precursor Legacy'' and '' Jak II'' assets and recompiling them natively. It includes a GOAL compiler written in C++ as well as a
Read–eval–print loop A read–eval–print loop (REPL), also termed an interactive toplevel or language shell, is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user; a program written ...
to enable a similar workflow to Naughty Dog's original implementation.


References


External links


Naughty Dog Software: Raising the Paradigm of Video Gaming – Again…Thanks to Lisp and Allegro CL

Jak & Daxter: The Precursor Legacy
(PowerPoint) – development overview, lessons learned
Highly detailed continuous worlds
– about the streaming world loader {{Lisp programming language Lisp programming language family Functional languages Object-oriented programming languages Common Lisp (programming language) software Video game development Domain-specific programming languages