The best part of game development, for me at least, is when everything suddenly starts working. Quite often, there is a critical mass of code that you end up writing for a game, and then – in the span of a week, or even days – you go from “everything is hideously broken and we’re going to die” to “Oh, this might be fun.” We’re right on the cusp of that right now; programming has seen some setbacks this week, mainly due to an outbreak of flu that has consumed the office. Nonetheless, we’ve been hard at work here in Programmertown, trying to get all the excellent artwork and ridiculous designs that people have come up with integrated into the game as quickly and efficiently as possible. Once again, let us take a tour through my folder of wonderful work-in-progress screenshots. Shortly before packing up for Christmas, we got the utility functions working and online. Characters now pick jobs, ranking their preferences for doing a job and choosing the best material available for them to do. They will happily wander around the world, picking stuff up and putting it in stockpiles, entering buildings to work, and doing other varied and exciting things like eating and drinking. The main problem outstanding here, which is a work-in-progress, is improvements to the character animation code – making sure people walk around each other instead of through each other, ensuring that everybody uses the right picking up animation for large objects rather than small objects, et cetera. This isn’t difficult, but it is time consuming.
We are also currently in the process of moving much of the in-game logic out of the C++ engine and into Lua. Mr. Micah J. Best got excited about this over the Christmas holidays and proceeded to bang out a prototype; what we are right in the middle of (prior to Flupocalpyse) is putting all of our existing finite state machines (the code responsible for driving walking, collection of objects, firing guns, drinking laudanum, and other discrete actions) into Lua. Hopefully this will speed up our development times in the long run.
Mr. Christopher Whitman is in the middle of a terrain rewrite, which will hopefully make life better and more varied. With Chris on terrain, and Micah gutting the main pieces of the AI engine, I spent some time last week making the engine faster by optimizing how we upload data to the video card. (For the technically minded, I got off my bottom and rewrote everything to use vertex buffer objects.) What does a man do with extra frame rate? Burn it on special effects, of course. In this case, I rewrote the water code to support reflection and better refraction:
As you can see, our new water code supports both reflections and refractions. Reflections are properly clipped at the water level, to ensure nothing ends up reflecting that shouldn’t reflect. (A tip of the hat to Eric Lengyel and Aras Pranckevičius; Eric first came up with the clipping technique I am using, and Aras was good enough to generalize it for orthographic projections.) One of the nice things about the water rendering is that it is now done, at a per-pixel level, purely as a post-processing effect; it is therefore extremely cheap and possibly faster than our old water. Less rendering errors, too!
I also took the liberty of adding ground fog. David explicitly requested that I add a picture of cacti in ground fog, because – I dunno, he’s weird like that.
So yes, things are coming along. The plan is to try and wrap up the new terrain rewrite, the Lua rewrite, and more code related to artificial intelligence and emergent narrative by the end of January, at which point we have a new list of fun stuff to work on for February. The work must go on! Excelsior! And all that.