This is probably the first time I've ever sacrificed pieces with a plan in mind, and had it actually work. I'm playing black, and my sacrifice move, 24. ... Nxg3 was the beginning of an attempt to clear the G and H files so that I could eventually promote my H pawn. Crazy huh?
It gets crazier. Then on 27. ... Qxf4, I am again sacrificing a piece, this time my Queen, to clear up the G file.
Of course, Shredder made plenty of mistakes that allowed my scheme to work...so there was definitely some luck involved. Still, it felt good to see a plan - a risky plan - work.
Here is what it will look like when it's "print ready"
By the way, you'll of course need a copy of the On Lisp pdf. You can get this at www.paulgraham.com, but that copy doesn't work with lulu because the fonts are not embedded. Since On Lisp is widely available online (such as here and here), I figure it's probably ok to share the pdf I used (which was graciously passed to me from another lisper). You can get that pdf here.
I can't go into the specifics of what the test was asking for, but I will mention some of the things I personally think are interesting about my submission.
The terrain engine is from scratch. It's not awesome, but hey I wrote this in a week.
All the 3d math is done in software using my own matrix and vector classes. I'm using OpenGL only to do the final device-space rasterization of the triangles. Some coders might scoff at this, but personally I don't think you can really claim to understand how the 3d pipeline works unless you've written one. It's trickier than it sounds.
The fog effect is new. It's just billboards, so nothing too special from a graphics standpoint. Still, I'm happy with it and I think it's pretty good for what little I had to work with. I would say that if I had any differentiating skill as a game programmer, it's that I'm decent at "doing a lot with a little".
I've never implemented a skydome before. That was a lot of fun to write, mainly because once it's in, it's a very convincing effect. There is definitely a "wow" moment the first time you see it working.
The follow camera uses 3d b-spline interpolation. It's not great, but I think it works for a quick prototype.
The world is procedurally generated using a height field based on a 2d Perlin Noise function. Also, the player can walk in any direction indefinitely, and new terrain and "ominous boxes" will be created. The box placements and terrain heights are consistent too. That is, the player can leave a spot and return to it, and the environment will be exactly the same. There are few tricks to make this all possible. For example, to make the terrain infinite, the player never actually moves beyond a 2 meter radius from the world center. Every time he would, I shift the player and everything in the world to keep the player "in bounds".
As mentioned, it took me about a week to put this together using the home brew tech I had at hand. Here are screenshots showing some of the steps along the way.
I started by creating a procedural height field.
Next I added some fake shading, based on height.
Then I gave each terrain "tile", a sand texture. Each tile is assigned a random texture (out of 6) to be shown at a random 90 degree orientation. I've also added a player character.
I wanted to give the scene a surreal feeling. So I added some unexplained floating boxes.
I thought wind would help sell the dry/sandy environment. So I added this dust effect and a looping wind sound effect. I also added piano music.
Finally, I wanted to add a skydome. The geometry and uv mapping for the skydome is created procedurally. Here I'm testing to make sure I'm generating the shape correctly.
And here's the same geometry as above (right), now with textures. I was surprised how well it turned out.
The Mercenaries 1 team was actually pretty small by today's standards, and so most of the programmers had both a core set of tasks and a whole bunch of miscellanea to work on. One such miscellaneous feature I ended up doing was stats tracking (how many head shots, most used weapon, etc). I also ended up writing the credits sequence for the game. And so, since I knew both features well enough, I made it so that when you finished the game and got to the end of the credits sequence, you would see major stats related to your performance.
Well, it was the first stat, "Total Play Time", that triggered an interesting conversation with the Quality Assurance team. As you may know, a QA team, by virtue of having to play the game for hundreds and hundreds of hours, will eventually acquire a zen-mastery for whatever game they are testing, and the Mercs QA team was no exception. And so the question was raised, "what is the fast possible time a person can possibly beat Mercenaries?". It was an interesting question. After all the QA team knew the exact rules flow-chart for every mission, the location of every key game entity, the fastest routes to any location from any other location, and best weapons and vehicles for any given situation. Plus, they were damn good at the game.
Someone (I think it was me, but I don't remember anymore) guessed that the game could be beat in under 2 hours, and that became the challenge. The Quality Assurance teams both internally, and at LucasArts were at least aware of this challenge, and it's certain that some where trying to beat it. How do I know? Well, one day, very very late in the product cycle, I got this picture in my inbox:
Apparently it had been done! One of the testers beat the game in under 2 hours. What's more, he or she never died and never retried. Wow. The claim, of course, is that this was achieved without cheating, on a final or very near final revision of the game. If true, that's pretty incredible. I've never even completed the game (because it's frickin' impossible to capture the Ace of Spades, and I won't have a kill on my record. I wont!), and here someone was able to fly through in only 1:54:51. Congratulations to the fine sir or madam who somehow pulled this off. Surely this is a world record.
One of the main programmers on our project (which has been officially canceled as to-be-published product, and is now more of an on-our-free-time indie thing) created a replacement for the old geometry editor we were using. It's so much better than what we had, that I feel compelled to share pics here.
Some of the features include:
insert new points (between two existing points)
remove existing points
comprehensive undo and redo
grid step size adjustment
camera zooming and panning
toggle-able unit circle guide
Lots of cool stuff for an editor that was made in a weekend or maybe less. By the way, I created that gun for fun, but also to try to make something that would have been, practically speaking, impossible with the old editor. I made heavy use of undo/redo, vertex insertions, zooming, and so on.