Thursday, September 30, 2004


Saturday, September 11, 2004

Lisp in Games

It's not a secret that Naughty Dog uses Lisp to write its games like Jak & Dexter, and you can even look at the Lisp code that was used in Abuse (it is in the data files archive).

But it is more of a secret that at least two other games owned/distributed/whatever use Lisp for their AI. Age of Empires: Age of Kings uses as suspiciously Lisep-like syntax for their AI-scripts. report from the 2002 Game Developer’s Conference Question #6 near the end: &ldquoLISP is more a favorite of academics and rarely used by game developers, though the AI in Halo makes heavy use of LISP scripts.”. And to cheat in “A Bug's Life” you can edit "lisp\options.lsp".

This is a badly written text, basically it's just some links, I found on the usenet, surrounded by a few words

debugging lisp

The Conditions System of Common Lisp is something I have not grokked yet. I had a look at some examples and tutorials, but they usually involved too much information and code, more than I thought is neccessary for “simple” things. Sometimes in OpenMCL, when an error occurs it gives you the chance to assign/change a value or define a function and continue. But the debuggers in SBCL and CMUCL never offered such restarts. Because I knew OpenMCL can do it, and that capability ist often praised in Common Lisp, I thought it is “simple”. But the Condition System tutorials were always complex, using CLOS, creating new classes with :keywords and such, not just one, two functions/macros to remember and if one needs more one checks the manual.

So I was very happy when I found Joel R. Holvecks Usenet Post Re: Debugging Lisp code (stupid newbie question). He explains exactly what I want, getting an error, fix it, and restart from a frame rather than using one of the default restarts (abort). No CLOS, just a macro and a special operator, RESTART-CASE and UNWIND-PROTECT.