Goal Test



Environment and High Level Documentation

Proprietary Information

Copyright 1998-2000 Naughty Dog, Inc.

All rights reserved

Documentation Version 1.15

Sunday, March 20, 2011


Traditional programming languages provide inadequate expression and power for the needs of modern game programming. G.O.A.L. (Game Object Assembly Lisp) is a heavily modified dialect of R5 scheme which attempts to address these problems. Specifically, it is a compiled language, with no interpreter, yet it has a fully interactive listener in which any language fragment may be dynamically compiled, linked and executed into a running program. Inspection and modification of any data structure, as well as dynamic replacement of functions in running code are trivial. Goal includes support for coprocessors and inline assembly with an unprecedented degree of integration. There is a single unified syntax for scheme and multiple coprocessor assemblies. Assembly instructions may be mixed freely with high level code without the use of special inline syntaxes. Variables, registers, and data structures can be accessed identically by both. Goal also has a uniform scheme-like syntax, true macros, and a sophisticated type/object system which gives it similar object power to C++, but with a uniform syntax and better control over low level features. Finally, Goal has a multithreaded runtime kernel which supports separated concepts of &qout process &quot as stack and &qout thread &qout as execution. When tied in with the object system this allows the easy creation of individual state based execution contexts that have control over their own local memory usage. This is perfect for games which have a multitude of different on screen objects each with their own local contexts. Programmers of the world unite! C is the opiate of the masses, the era of real programming languages is on hand!


  1. PC with NT
  2. ACL for NT installed (see Andy or Justin)
  3. Xemacs 21.2 for NT installed (see Andy or Justin)
  4. src/next checked out with CVS

Starting ACL:

Goal lives in ACL, which lives in Xemacs. Run your NT Xemacs, and it should load the "fi" package which connects emacs to ACL. This is controlled by .emacs in your home directory. Compare yours to ~agavin/.emacs if there is a problem.

The source code has a master copy in the CVS repository. In order to update your source from this "update with CVS" by pressing F5 in emacs.

Start ACL by pressing F8 (sometimes this requires more than one press). The first time you run it, "fi" will ask several questions for ACL, press return to all but "PROCESS DIRECTORY" which should ALWAYS be "z:$USER/src/next" or "~/src/next" (insert your user name for $USER). If your .emacs is correct, than the "PROCESS DIRECTORY" default should be correct, and you can press return here as well.

When ACL starts it loads the ".clinit.cl" file in its current directory. If it does this correctly, you will see the propt "user:", if incorrectly,"USER". To exit ACL type (exit) or (EXIT) to match the case of the prompt. Press F8 to try again. If you are getting the "USER" prompt then you either have an incorrect .emacs, typed the wrong "PROCESS DIRECTORY" the first time you started lisp, and are starting lisp from within a file not in the ~src/next directory. Try opening a file in ~/src/next (such as "start") and then running F8 if you have trouble getting the lowercase "user:" prompt. If further problems, check your .clinit.cl links:

[on a SGI or LINUX machine]
cd ~
rm .clinit.cl
ln —s src/next/.clinit.cl .clinit.cl
cd ~/src/next/goal
rm .clinit.cl
ln —s ../.clinit.cl .clinit.cl

the ~src/next/.clinit.cl is the master, and it is from the CVS repository.

Running GOAL:

Once you have a "user:" prompt in ACL, you can run Goal. The goal compiler is written in common lisp. Its files are .cl files in the ~/src/next/goal directory. CVS will often update these files as Andy adds features to the compiler. If this happens, the compiler must be recompiled. The compiler will recompile any out of date files whenever it loads. However if it is already loaded, you will need to force the compile with the (lg) macro.

Use the (goal) macro to load the compiler. If it has been some time since you updated lots of stuff may have changed in the compiler and it is a good idea to compile it from scratch with:

(goal :compile t)

otherwise to launch into goal and compile only what is needed


or to compile everything in the main runtime package

(goal :mg t)

The compile flag forces the Goal compiler to completely recompile itself. This takes 10 minutes. You should get the goal info message and the prompt if the compiler loaded correctly:

Goal III v. 0.9 alpha (Game Oriented Assembly Lisp)
Copyright (c) 1993-99 Naughty Dog, Inc.
Currently localized for (usa ntsc)


You are fully up and running. However, you may need to build the kernel, or to build additional packages. To build the "l1" package for example (and also so the default compiling to game and l1):

(mg game l1)

to force the l1 package to compile everything:

(mgf l1)

Common Goal ACL commands:

(mg [packages···]) — compile 1 or more packages, remembers the last package group compiled
(mgf [packages···]) — force compile 1 or more packages
(lg) – reload and recompile the goal compiler
(cga) – force the recompile of the goal compiler

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s