Hacker News new | past | comments | ask | show | jobs | submit login
Super Mario 64 was built with a system written in Lisp (franz.com)
165 points by old_sound on Apr 22, 2011 | hide | past | web | favorite | 50 comments

Mario 64 wasn't itself written in LISP at all. It's models were built in Nichimen graphics, a SGI based 3D design tool written in Allegro CL.

As far as I know, the games we did at Naughty Dog (Crash 1-3, Jak 1-3 + X), and later Uncharted were the only major console games which large amounts of runtime Lisp. The Jak & Daxter series was 99% written in my Scheme dialect GOAL, including all the assembly. The only parts that weren't were libs talking to Sony's libraries (C++).


I loved the "Making Crash Bandicoot" series on your site. It's well worth the read:


Much respect!

Reading about GOOL and GOAL is what got me into Lisp.

Working at a previous game company, on a PS2 title, we spent a lot of time oohing and aahing over J&D's beautifully fluid animations.

I'm actually still playing through the game as part of my "PS2 classics" backlog. Very nicely done!

I didn't realize Uncharted used any runtime Lisp -- could you elaborate?


Uncharted uses a DSL for gameplay scripting. The compiler is implemented in Racket. You can see what it looks like in Jason Gregory's 2009 presentation: http://www.gameenginebook.com/gdc09-statescripting-uncharted...

The compiler is written on top of the low-level system in Dan Liebgold's 2008 presentation: http://www.naughtydog.com/docs/Naughty-Dog-GDC08-Adventures-...

More or less, the sexps that define a state-script get run through a maze of Scheme macros - there's even a pretty decent expression language in there which is compiled to bytecode - and the result is big honking C++ structure which is fed to the Uncharted runtime and interpreted.

In particular, note all those wait-blah-blah calls; those are using call/cc to implement coroutines. Which is something you really really want in a game but which C++ of course doesn't have. (GOAL had native coroutines.)

It's also nice to be able to iterate on the language syntax without having to fool with BNF grammars and so on.

I would guess that the 'worlds' in Super Mario 64 were also done with the software. There are somehow similar 3d worlds in a movie (Jetsons) done with the Symbolics S-Graphics software.

In 1983, Rescue on Fractalus and Ballblazer, the first releases from Lucasfilm Games, were built with a system written in Lisp. It was a 6502 assembler with Lisp syntax and a Lisp-style macro facility, written in Portable Standard Lisp, running in Berkeley Unix on a 4MB VAX 11/750. Unfortunately it was eventually abandoned because the developer had left and it was a bit of a strain on the VAX that was shared by the whole development team.

Yes, I wrote it. Yes, it was my first non-academic programming job. Yes, the users complained about the parentheses, and the slowness. But, they also took advantage of the powerful macro facility.

Fond memories of Ballblazer. An amazing creation for a ~2 MHz 8 bit cpu.

Written by David Levine, http://grokware.com/dl/resume.html who credits the Lisp-based Macro Assembler in his resume!

> An amazing creation for a ~2 MHz 8 bit cpu.

I ran it on an Apple II. It had a 1 MHz 6502. And yet, it felt more responsive than my first IBM PC... Odd times.

> It was a 6502 assembler with Lisp syntax and a Lisp-style macro facility

And I had to use Merlin... Sadly, I couldn't afford a VAX :-(

I built an iPhone game with Scheme, and I have to say, it was the best debugging/development environment I've ever had.

jlongster I was closely following your blog posts about Gambit-scheme on the iphone and was even inspired to try it myself. However this was shortly before Apple changed the developer agreement to add the "stuff that compiles to objective c is not acceptable" clause.

It appears as you have discontinued this project. Was that clause the reason?

here is his blog for reference: http://jlongster.com/legacy/scheme-iphone-apps.html

FWIW, Gambit C compiles to C, not to Objective C. I'm not sure that makes a difference, though.

It wasn't the main reason, but certainly didn't encourage me to keep working on it.

I burned out on Scheme and not having a large community of developers, but I'm starting to work on things again, but not iPhone apps.

Can you elaborate? Is the game in the app store? Github? What dev environment did you use?

Here is an example project on github:


I used Emacs which spawned a REPL connected to a live instance of the app and developed from there. Meaning, the app was running in the simulator/device, and I could evaluate code and instantly see changes.

There is a small list of games (and other applications) written using Gambit-C Scheme at:


Did you ever try Chicken? I'm curious about how it compares to Gambit.

I have yet to develop much in Chicken, but I've looked at it closely. It works on a different philosophy, one of more practicality (and less elegance). Because of that, it's matured a lot, and it has tons of libraries which is a huge benefit.

Gambit is more lean and portable, good for uses like compiling to the iPhone (that would be much harder for Chicken).

That said, I would probably use Chicken for my next project.

Ever used smalltalk?

Doom was built with a system written in Objective-C.

Clairvoyant, those 90s game developers were.

Can you describe it? I thought the code was all C? Or were the tools written in Objective-C? Either way, that's very interesting (big Objective-C fan, here).

John Romero wrote up a pretty cool post about the use of NeXTSTEP and Objective-C at id Software during the 90s.



Doom code is C, DoomEd is Objective-C and ran on NeXT boxes.

my memory is blurry on the topic, so don't quote me on any of the following...

if i recall correctly, directtv boxes are all essentially just web servers and even expose some methods via http. i believe i heard that their hud/gui/etc is all written in javascript and html. incidentally, they also did this a decade ago (or so) when javascript was still quite young.

wow, didn't realize tangential programming conversation was so frowned upon. maybe if they made breakout instead of a television gui the relevance would have been more clear.

It's a little disingenuous for Franz to claim any credit for Nichimen. Nichimen N-Graphics was the spinoff of the Symbolics S-Graphics system, written in ZetaLisp. Symbolics ceased new development and there were customers for the graphics system, so it needed to be ported to a Lisp environment that would run on available hardware.

Franz Allegro CL is a further development of Maclisp, developed during Project MAC at MIT. ZetaLisp was also a direct development of Maclisp. I'm guessing this shared ancestry helped in the software porting and made Franz the natural choice for the N-Graphics. But the press release just blows a lot of smoke about the speed and scalability of Franz.

Why that? Symbolics S-Graphics was a graphics suite exclusively for the Symbolics Lisp Machines. N-World was a very different port of that to Allegro CL on SGI machines. That Allegro Cl was chosen and that this relatively complex piece on software ran on their Lisp is something they had any right to be proud of.

> Franz Allegro CL is a further development of Maclisp

You are completely wrong. "Franz Lisp" was written to be compatible with Maclisp so that it could run Vaxima. "Allegro Common Lisp" was written from scratch with no relation to Franz Lisp or Maclisp.

I see now after more reading that I was wrong and you are right. Franz Lisp was a new implementation that was compatible with Maclisp and Allegro Lisp was a later new implementation. I'm sorry to have posted bad information.

It is cool but I wonder how many customers you get with a story that is 15 years old. The world has moved on.

I did some really early Apple Newton development work in around the same timeframe ('96, '97) and the early Newton development tools were also all written in Lisp. Probably Mac Common Lisp.

Not so strange of course since many people on the Newton team had a strong OODL (Object Oriented Dynamic Language) background. These are mostly the same folks with SmallTalk, Lisp, Scheme and Dylan experience.

Awesome times. But not much of it is left.

I've posted the link. I've have no affiliation with the guys from that site. Just wanted to share an interesting story.

The Jak and Daxter series (PS2) was also written (almost?) entirely in Lisp, too.

All of the AI and character control in Way of the Warrior and the first 3 Crash Bandicoot games was written in GOOL 1&2, my first and second generation LISP systems: http://all-things-andy-gavin.com/2011/03/12/making-crash-ban...

I have all sorts of articles on Crash 1 on my blog: http://all-things-andy-gavin.com/category/games/

For Jak & Daxter 1-3 + Jak X I did a new Scheme based compiled language (GOAL) in which 99% of the games were written. I haven't yet done a big write up on that for my blog, but I will one of these days.

..which incidentally is how one of the villains got his name: http://jakdaxter.neoseeker.com/wiki/Gol_Acheron :P

The same company (Naughty Dog) used a language built on top of DrScheme for game scripting in Uncharted. IIRC the language cross-compiled to C code.

Thanks for sharing this link. I'm giving a talk on Lisp and computer games at my university in less that two weeks from today. It's great to have more examples to share.

BTW. Abuse is a half-C, half-Lisp game.

Good timing. You can also use the results of the Lisp Game Jam that starts today.


Thanks for the info! I haven't been on IRC so much recently and I've missed info about this on #lispgames. I probably won't have time to participate this time though :(.

> NEW: Lisp Games Development Screencast 1

Oh please, use something like blip.tv, as it handles podcasts properly. This way I can watch it on my TV and hack from the couch. I need to get away from my desk to get the creative juices flowing.

I've also found this resources talking about Lips in the gaming world:

http://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp http://c2.com/cgi/wiki?LispInJakAndDaxter <-- regarding Jack & Daxter mentioned in the comments.

Note that the article seems to be talking about the tools used to build the game, not the game code itself. I'd guess this means things like texture editing, level design, and such.

As far as I can tell N.World was a modelling and animation (and rendering) package comparable to Maya. See this press release from 1996: http://findarticles.com/p/articles/mi_m0EIN/is_1996_August_6...

"[... ] our tools were used to model the characters for Super Mario 64".

I bet SM64 was written in C++.

EDIT: ... and possibly large chunks of it in C, too, since the C++ compilers always seemed to lag several months behind the C compilers on new platforms, and SM64 was a launch title.

It was written in C and assembly.

Isn't the tile of pretty clear on that: "… a system written in Lisp". It doesn't say the game was written in Lisp.

This seems like pretty old glory to trumpet in 2011.

Or, that's been on their website for a long time and someone found and posted it here.

Haven't you ever unlocked Lambda Mario? I thought this was pretty clear... ;)

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact