
3D Game Engine in Lisp - kgthegreat
http://elliottslaughter.com/2011/06/blackthorn-3d
======
Figs
I worked on this project doing most of the input coding (XBox 360 controller &
keyboard), some of the game loop & networking, and some of the game play. If
you have any questions, I'll try to answer as best as I can remember -- it's
been a few weeks since I've worked on it.

Elliott's site seems to be down, but our code is open source:

<http://code.google.com/p/blackthorn-engine-3d/>

You'll find our project development notes for the class (status reports, some
of the initial planning, final report, etc.), along with the code, screen
shots from various points in the development, etc.

A lot of things are probably still a bit messy there; we only had 10 weeks
during the course to hack the engine together. (Although I believe Elliott's
been continuing work on generalizing it since the end of the school year.)

~~~
rsaarelm
Any opinion on which elements were particularly nice to code due to choosing
Lisp? What about anything where choosing Lisp gave you particular trouble?

~~~
Figs
Most of the team was unfamiliar with Lisp starting out, so that was an extra
challenge to it -- only Elliott was an expert, and only one other person had
actually used Common Lisp as far as I recall. I had some prior exposure to
Clojure (although not recent), Python (what I usually use for many of my
personal projects), and Haskell. Trying to use an unfamiliar language for a
fairly serious project in a group setting like this was something of an
experiment in itself.

This lead to a lot of the sorts of problems that you face when you're just
learning a new environment. As such, most of the code is probably not
idiomatic Lisp, although we picked up enough to get something written fairly
quickly. A lot of the places where things like macros or functional
programming could have been used to simplify things were missed due to lack of
familiarity with the way things are done in Lisp. Looking back on my input
code for example, there's an enormous amount of repetition that I could
probably factor out -- and that would have been quite handy around week 8 or 9
of the project, since I needed to extend the controls. One feature that we
found quite handy though were multimethods.

We didn't have too many problems with performance once the game was running,
although we were running mostly on fairly decent machines. Starting things up
with the load and compile was rather slow though.

------
burgerbrain
Might be worth mentioning in this context that the Crash Bandicoot games were
in a Lisp.

~~~
jcromartie
And the developer continues to use Scheme (on top of the standard C++ SDK) to
power their most recent games: Uncharted and Uncharted 2, two of the most
critically acclaimed games of all time.

I'd definitely call Naughty Dog a Lisp gaming success story... Abuse is
another (but not _that_ successful).

~~~
kgthegreat
<http://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp>

------
wlievens
I remember peeking at log or configuration files (can't remember well) of Age
of Empires 2 and seeing them full of S-Expressions.

~~~
ihodes
It was, though it was basically imperative code wrapped in sexps.

EDIT: It was for scripting AI "personalities".

------
pnathan
This is really cool. I have no idea what is going on, though.

Is this a senior project? I'm unfamiliar with the course numbering at your
school.

I'd love to see it even non-commercial open-source, I have some game ideas I'd
like to implement (about 2 projects down the pipe. :D), but don't feel up to
putting together a graphics engine.

~~~
biot
Project is here with video and link to the course as well:
<http://code.google.com/p/blackthorn-engine-3d/>

------
eslaught
Site should be back up. Congrats on taking it down =)

------
jpr
The page doesn't seem to load for me.

~~~
kgthegreat
As pointed out by biot earlier, <http://code.google.com/p/blackthorn-
engine-3d/> has the code and a video.

