How Naughty Dog Built Custom Languages to Power Its Hit Games

From the custom Lisp behind Crash Bandicoot to scripts still running in modern remasters, here is how the studio built its own tools.

Games by Adeela Tas on  Nov 09, 2026

Long before it became one of the biggest names in PlayStation history, Naughty Dog was a two-person hobby outfit called JAM Software. It started in 1984, when Andy Gavin and Jason Rubin were still in high school. Gavin handled the programming, Rubin drew the art, and by 1996 the two had shipped Crash Bandicoot on a console with only 2 megabytes of memory.

PlayStation had no way of deciding which objects were in front of others, so the team did that homework in advance. On Silicon Graphics workstations, they worked out everything visible from every possible camera position and saved the results.

Uncharted 4 Nathan Drake talking to Elena

Even how characters and objects behaved came from a custom language.

Gavin and Baggett wrote GOOL, which stands for Game Oriented Object LISP, and it swelled from 49,000 lines in the first Crash Bandicoot to 122,000 lines by the time Warped arrived. What really wore the team down was the wait. Every tweak to the code meant around 15 minutes of compiling and linking, and Gavin wanted to bring that down to a few seconds.

His answer, for Jak and Daxter on the PS2, was GOAL, short for Game Oriented Assembly Lisp. Roughly half a million lines of that game were written in it. With GOAL, you could edit code and send it into a running game, and the world streamed in around you with no loading screens.

The catch was that GOAL arrived with its own compiler, linker, and debugger, all built at the studio. Gavin spent more than a year just on the compiler, so he became the person everyone had to track down whenever something broke. After Gavin and Rubin sold Naughty Dog to Sony in 2001, that became a real problem.

Sony wanted its studios to share code, and lead programmer Scott Shumaker later said this was the main reason the team walked away from GOAL: no one outside the studio could work with it. Gavin and Rubin themselves left in October 2004, right after Jak 3 wrapped up the Jak and Daxter run.

When Naughty Dog moved to the PlayStation 3, it wrote the Uncharted engine in C++ and started with a blank slate.

Lisp still wasn't finished with the team, though. For Uncharted, the developers created a new tool called D-Code, or DC. It runs on Scheme, which is another Lisp dialect, and programmer Dan Liebgold explained that having already built a Lisp-based language was part of the reason. DC covers the content that falls in the gap between code and art.

Think particle effects, animation blend trees, weapon tuning, sound setup, cutscenes, and even the sequence the game's chapters play in. If you wanted to set the player's starting spot, you would write it in DC, and the language would turn it into data the engine can load, along with a matching C++ header that tells the engine how to read it.

Uncharted 4 Nathan Drake escaping collapsing structure

Change a value, recompile, and the running game picks it up without a restart, so the change shows up on screen. Scripting lived there too. It began with in-game cutscenes in the first Uncharted, expanded into general gameplay scripting, and got a major rework for Uncharted 2. The studio calls these state scripts.

Each one is built out of states. For example, in Jason Gregory's work, a gate might be locked, opening, or open. Each state spells out what to do when it starts, what to do every frame, and how to react when something happens, like the player kicking the gate.

The code inside a state runs on tracks, which behave a lot like threads, and a track is allowed to wait.

Another Gregory example from 2009 has Drake and Sully shaking hands: one track sends Drake to the right spot, another sends Sully, and each pauses until the other has arrived before the handshake begins. It was simple enough that designers could write these state scripts themselves, not just programmers.

By the time The Last of Us reached the PS3, Naughty Dog had 16 programmers, 20 designers and 6,000 DC files. That added up to 120 megabytes of source code, and the game pulled what it needed into about 5 megabytes of memory.

Dan admits selling the language inside Naughty Dog was hard. Code packed with brackets put off programmers, designers, and less technical staff alike, and using Emacs as the editor didn't help. Once people got the hang of it, many began extending it on their own.

It's still in use. The Last of Us Part II Remastered contains close to 8,000 of these files, and more than 5,000 are state scripts. One drives the space capsule scene in Ellie's museum flashback. While the cutscene plays, separate tracks wait for their moment.

At frame 3,127, as the countdown reaches ignition, one switches the helmet to a setting called "capsule console on." At frame 3,368, right at liftoff, another kicks off the controller rumble, which climbs to nearly full strength and fades out just as the helmet moves to "capsule space."

Jak and Daxter Jak looking worriedly downward

Here is how Jak and Daxter avoided loading screens.

The game held two levels in memory at once, each in its own block so that you could walk out of one and straight into the next without a pause. When the data couldn't keep up, Naughty Dog had a fallback: Jak stumbled. On the PS3, Drake's first adventure never stopped loading.

Levels, characters, sounds, music, and textures flowed in the whole time, all bundled into files known as paks. The easiest way to picture a pak is as a book. The book is divided into pages, memory has a set number of slots, and each slot holds one page, so the game grabs only the pages it needs right now and drops each one directly into a slot.

Because every PS3 came with a built-in hard drive, adding texture streaming took the team around three days. The Last of Us Remastered on PS4 didn't need texture streaming at all, since that console had much more memory. PCs were a harder case because each one loads data at its own speed.

For Drake's PC port, Naughty Dog rebuilt part of the engine around what it called a safety valve, meant to keep playback smooth on all kinds of hardware. It hadn't had to think about anything like that since Jak's stumble. The pak design never went away.

In Drake's first game, characters moved with blend trees. His tree could hold up to 25 animations, and the animation states were written in the same language. From the scrappy byte-saving tricks in Crash Bandicoot to the thousands of state scripts still driving today's blockbusters, Naughty Dog's habit of building its own tools from scratch remains the backbone of how it makes its games.

Adeela Tas

Editor, NoobFeed

Latest Articles

No Data.