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 ...
, 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 Linguistics, linguistic phenomena: One usage refers to a variety (linguisti ...
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 lisping ...
, 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, controller, keyboard, or motion sensing device to generate visual feedback. This fee ...
s developed by
Andy Gavin Andrew Scott Gavin (born June 11, 1970) is an American video game programmer, entrepreneur, and novelist. Gavin co-founded the video game company Naughty Dog with childhood friend Jason Rubin in 1986, which released games including ''Crash Bandic ...
and the ''
Jak and Daxter ''Jak and Daxter'' is an Action-adventure game, 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 install ...
'' team at the company
Naughty Dog Naughty Dog, LLC (formerly JAM Software, Inc.) is an American first-party video game developer based in Santa Monica, California. Founded by Andy Gavin and Jason Rubin in 1984, the studio was acquired by Sony Computer Entertainment in 2001. Gav ...
. 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 ...
and used in the development of the entire ''Jak and Daxter'' series of games.


Design

GOAL's
syntax In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure ( constituency) ...
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 pr ...
features such as
class Class or The Class may refer to: Common uses not otherwise categorized * Class (biology), a taxonomic rank * Class (knowledge representation), a collection of individuals or objects * Class (philosophy), an analytical concept used differentl ...
es,
inheritance Inheritance is the practice of receiving private property, Title (property), titles, debts, entitlements, Privilege (law), privileges, rights, and Law of obligations, obligations upon the death of an individual. The rules of inheritance differ ...
, 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 part o ...
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 c ...
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 Function application, applying and Function composition (computer science), composing Function (computer science), functions. It is a declar ...
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 In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
directly into
PlayStation 2 The PlayStation 2 (PS2) is a home video game console developed and marketed by Sony Computer Entertainment. It was first released in Japan on 4 March 2000, in North America on 26 October 2000, in Europe on 24 November 2000, and in Australia on 3 ...
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 recyclabl ...
, 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 In computer programming, assembly language (or assembler language, or symbolic machine code), often referred to simply as Assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence be ...
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 ...
. 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++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
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 game, 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 install ...
'' 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 ''Crash Bandicoot'' is a video game franchise originally developed by Naughty Dog as an exclusive for Sony's PlayStation console. It has seen numerous installments created by various developers and published on multiple platforms. The series c ...
''. 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 States. ' ...
''.


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 mod ...
by decompiling existing '' Jak and Daxter: The Precursor Legacy'' and ''
Jak II ''Jak II'' is an action-adventure video game developed by Naughty Dog and published by Sony Computer Entertainment for the PlayStation 2 in 2003. It is the second game of the ''Jak and Daxter'' series and it is both a sequel and a prequel to ...
'' 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