a life of coding

Tuesday, May 09, 2006

Game Lispers

I've made some pretty technical blog posts so far.  They've covered Objective-C, Java, Lisp, KML / GoogleEarth, python, ruby on rails, Mono, C++.... lots of topics that I don't generally talk about IRL because if I did, I wouldn't have any friends ( atlHack aside).  At the same time, I don't get many (well, any) comments to any posts, so for a long time I was pretty certain that no one was listening to the blog either.  Well, it turns out that I was wrong, and I get a lot more blog hits than I ever suspected.  Some of them are via search engines, so in addition to page hits I have the search queries that brought you guys here. 

My last post / rant focused mainly on some of the queries that I see, so I won't indulge myself with yet another rant.  Instead, I'd like to talk about one query that seems to show up every month for a least a couple of hits: "naughty dog lisp".  Of every statistic on the awstats page (and there are a lot of them) this is my favorite.  Every time I see the count increment I smile, knowing that my blog is getting hit by some of the most elite hackers in the world.  Why do I say that?  Lets break this down:
  • Game hackers:
    • Are excited about their work.  Any time people are excited about their work, they will be naturally better at it than if it bores them.
    • Deal with a lot of hard problems: real-time performance optimization, media (sound, graphics, physics), and concurrency.
    • Generally push the hardware to its absolute limits, just for the fun of it.
  • Lisp hackers:
    • Are looking for ways to make themselves more efficient.
    • Aren't scared of complex systems, but probably appreciate simplicity and elegance
    • Are working on the bleeding edge of development, even if that edge happens to be 50 years old.  Lisp does not have hundreds of Dummies books. 
    • Value function over form.  There is no flashy IDE for it.  It doesn't generate documentation from your comments.  Its value is not in decoration, but in raw substance.
Given that people searching for "Naughty Dog Lisp" are in both of these groups, I would say they are a formidable group.  But enough about them, I have real substance for this post.

I have started experimenting with OpenMCL's OpenGL bindings.  For a long time, I have battled with graphics programming.  The majority opinion is to use C and OpenGL, or C++ and a scenegraph library (Ogre3d is nice, and cross-platform).  I appreciate the performance of these solutions, but I have always felt limited once my programs exceeded a few hundred lines.  There isn't much you can do in a few hundred lines of code, especially if you've got visions of Oni in your head.  So I have played with a number of programmer-efficient alternatives, like python, and my own 1/2 of common lisp, Commotion.  (Commotion has somewhat transformed into a graphical programming language, akin to Max/MSP, which might be best implemented on top of lisp - but more on that later.)  But PG's talks are eating away at the back of my mind - its time to leave the cheap substitutes behind and take on the real deal.

Which brings us to the listener interactive part of this post.  I know that there are people out there reading this, and some of them are chasing the same unicorns that I am.  If this is you, I want to hear about it.  There's a comment button down there that's getting lonely.  Anonymous comments are allowed, so there are no account-related excuses.  Have you written a game in lisp?  Screensaver?  Music?  Maybe you're just interested, or your Intro to Computing class is in scheme and you want to do something useful with it.  Anything goes, except for comment spam, which recieves swift death.


  • Hi there; a friend linked me to your entry, knowing that I work for Naughty Dog. First off, thanks for calling us "elite hackers"; it warms my heart!

    Now, about Lisp...my own experience with the language extends only so far as a few major mode for Emacs (the project I joined NDI to work on is mainly in assembly, so I haven't had to learn GOAL). But having seen my coworkers in action, I must say I'm amazingly impressed. In a medium like games where the quality of the product is rather squishy and subjective, the advantages of an interpreted language (rapid prototyping, instant turn-around time for changes) cannot be understated.

    For example: the other day I was sitting at my desk twiddling my thumbs in the middle of a five-minute compile (after making a tiny, largely inconsequential change). At the next desk over, in those same five minutes, a designer and a programmer spec'd out a new weapon effect, implemented it, had it running in the game, and had gone through at least a dozen minor iterations (e.g. "let's try it with slightly larger particles...no, that's too large...what if the particle centers were white, and faded to purple on the edges?...sweet, but let's give it more muzzle flash..."). I was blown away!

    Of course, as stated in the article you referenced, GOAL is not your average Lisp. It was designed from the ground up by a very, VERY smart man to be efficient; we're not going to see that level of performance with an off-the-shelf Common Lisp interpreter. If I were going to be implementing a game from scratch (oh, the delicious freedom!), I probably wouldn't bother with high-level language bindings for OpenGL; the core low-level guts of the renderer should be written in C (or assembly!), and that's that. It's the higher-level game objects that would benefit the most from being scripted in a higher-level language. Their focus is less on raw performance and more on flexibility. That's the stuff you're going to be iterating on as your game takes shape; once your renderer works, you want to put it aside and never touch it again! This seems to be the trend most commercial games are taking (for example, Unreal was doing this with UnrealScript back in the late 90s).

    Well, I hope that this has been more than a ramble. I wish you the bestof luck with your experiments; keep the Lisp flame alive!

    - A. Dog

    By Anonymous Anonymous, At 5/9/06 12:16 PM  

  • Update the Commotion page with screenshots and the initial release! You can add the documentation later. The bleeding edge thanks you.

    Also, the realtime-lisp-music depends only on our implementation of sonic boom chuck. I'm ready when you are. Let's bang it out in a weekend.


    By Anonymous Anonymous, At 5/9/06 5:10 PM  

Post a Comment


Create a Link

<< Home