Category Archives: Game Development

Auto Fire: Technical Debt

As I am gainfully employed, my time working on AutoFire is mostly relegated to mornings before work plus weekends.  I don’t have any pretty pictures for you from this past week because I’ve been ripping out the guts of the game, getting it into a smoother-running and more manageable shape.

You wouldn't believe the number of pictures with stick figures holding up the word "debt" there are.
The internet contains precisely 51,245,721 stick figures holding up the word “debt”.

In programming there is a phenomenon commonly referred to as “technical debt”.  In short, it means if you take shortcuts  and the “easy way” for quick results, you usually pay the price down the road.  Those temporary fixes and band-aids that you applied in lieu of carefully planning and documenting your work gets built upon again and again…  Eventually that foundation of toothpicks and dried spit can’t bear the weight, and you realize that your work cannot be maintained.  You throw up your hands and say “This has to be completely redone!” This is the day your technical debt comes due.

In game development technical debt is common…  Early in a project you want to prototype all the gameplay quickly to give everyone a sense of how something works.  You try things, you iterate on an idea to make it better, you try to “fail quickly”…  You do all those things that the best game companies hold up as their credo, which means you have to focus on speed and agility.  Try that crazy new control scheme, add a strategy component to your FPS, see what all the goats look like with hats, or whatever the team comes up with.  This behavior does not encourage proper architecture, and often involves what a programmer calls “a hack”.

BUUUUUT game making also is a business, and there is always pressure to move forward because the last problem is in the rear-view mirror…  This comes from folks like producers and publishers, but isn’t just about the folks in ties and suits:  a lot of people on the team can get antsy if they don’t see new things on a weekly basis, because morale is everything in a creative endeavor.  Programmers get tremendous pressure to move on to the next big issue, and frequently they will warn the powers that be of the technical debt that is being accrued.

Of course, when the day comes that the debt must be paid off, it will involve days and days (sometimes weeks!) of time when nothing changes… in fact, the goal of this cleanup is that everything should work identically as when you started.  It’s very hard for an outsider to understand…  One day long ago I witnessed a manager straight-up ask “But can’t you just hack the entire game?”  No… not if you want something that won’t fall apart when thousands of eyeballs and eager mouse clicks are set upon it.

Nonetheless, “hack the entire game” is precisely what the 7DRL is about…  You need results now and you don’t apologize for it later.  You’ve got 168 hours to get to the finish line and you don’t care if you trample over every “Write Smarter Code” author who ever was.  And I certainly did that.

It's finally time to ditch the last of those 2D pixel art sprites...
Now I finally have time to ditch the last of those 2D pixel art sprites!

For AutoFire my control and world update system was my cross to bear…  I piled my inputs and the control of my entities in Unity’s “Update” system, where each object gets called every frame.  I cobbled together some bullshit traffic-cop system to move things in the right order, except Unity plays it pretty fast and loose…  There isn’t really a great way to guarantee that, say, the function that tells a car where to go would run before the function that actually moves it.  Frankly, I started to not fully understand how the damn thing worked at all.

I knew the debt was coming due…  Players didn’t always feel their commands were registered.  10% of the time the smooth movement of an entity would inexplicably twitch.  The enemy vehicles just spontaneously stopped working.  But I knew fixing it would be a slog, which is why I procrastinated by working on some pretty terrain last weekend instead of doing what I should have been doing.

When you have to rewrite someone else’s code, you can get pretty grumpy about that person.  But when you have to rewrite your own code, you decide that months-ago you was either an idiot or a complete dick.  “What was I thinking?” gets uttered out loud several times, as well as “What the crap is this?” and the classic “How the hell did this ever work?!?”

But a week later and all is well.  The code to control everything is about 25% of its original size.  Everything is carefully managed.  Your input is now queued up and doled out to your vehicle on demand.  Now I can get back to the fun part of making things blow up.

Oculus Rift: Weekend Puttering Part 2

I borrrowed the Oculus from work again this weekend and put just a few hours in…  This time I experimented with setting up targets and creating a mechanic where the player can move slowly to new locations by pointing and right-clicking.  Overall it seemed like a worthwhile experiment…  Actually the motion was some of the best part.  I think perhaps just a constantly orbiting viewpoint could work all right, with maybe a few choices as to where to move next.

The goal is to create motion and control that won’t make my wife sick…  Have yet to put her in it, but it might just work.

Oculus Rift: Weekend Puttering Part 1

My company (Hidden Path) was kind enough to let me borrow one of their Oculus Rift DK2s over the weekend to do some experimentation.

I got it working in Unity pretty quickly, and proceeded to experiment with a stationary camera position with a mouse-aim cursor.  After a couple of experiments, I ended up with a model where the cursor points at a single point in 3D space, manipulated by the mouse.  If the player’s view moves away from the cursor, the cursor gets “dragged” with it.  It felt pretty good and snappy in the end.

I also did a simple dumb character using WASD controls, with motion relative to the viewer (ala Mario). That part was easy and I can see the appeal (although with my test sprite character it’s a bit lacking of course).  It was fun to mess around with!

Dungeonmans has shipped!

Hey, did I mention that my buddy Jim Shepard has finally finished his epic, Dungeonmans, and it is fully purchasable on Steam?

He’s done such an amazing job…  I spent a few weeks helping out a little on traps when I was awaiting a move to San Francisco back in 2010, and it was the very thing that made me realize how much I had missed game coding.  I can’t lay any claim at all to the final product because probably 1% of the code I wrote back then made it into the final product, but it was a meaningful moment to me nonetheless.

Back in November, Jim and his long-distance contributors/friends decided to gather in Seattle for a week-long push to get Dungeonmans that much closer to the finish line.  I put in a day or two (as a designer this time) and helped create a couple of “master dungeons”, and it was amazing to see how much the game had improved over time.

dungeonmans old-new
From the early days…                                                       …to release!

 

The coolest part was having an honest-to-god game studio, Adventurepro, in my basement for a week!  These are amazing guys, each with years and years of grizzled veteranmancy (a word I just crafted now) behind them…  They deserve every new success.

Dungeonmans crew

Side Projects

I’ve had to take a break on the article-writing to immerse myself in my work.  Theory is fun, speccing can be rewarding, and hooking up is good, but sometimes I’ve found myself missing real hands-on gameplay programming.

A friend of mine has been creating a Rogue-alike as a side-project labor of love for the past few years, and recently it went from sporadic updates to a full-on development flurry.  This of course made me very jealous, as tile-based engines allow for amazing freedom in creation…  There are few limits and implentation is a breeze.  It’s all about the gameplay.

The game is Dungeonmans, and he releases updates openly as an in-progress effort…  It obviously revels in its old-school presentation…  although the graphics are getting better by the day.   He’s created an overworld and NPC quest system as well as invested a great sense of humor within, so in some ways it outpaces similar indie dungeon-crawlers already.  It even can gather play stats that get collected at the home base for analysis and high scores.

Recently he made the codebase available to a few of us, and we’ve all been diving in and having a blast.  I’ve been working on a trap system recently, and I gotta say it’s the most fun I’ve had with development since Heretic II.  It’s been a while since I’ve worked on something past midnight without even noticing.

It’s not Diablo III, but fun doesn’t have to be developed in 3D by hundreds of people…   Check it out.

Viva la France!

Oh yeah.  I would like to personally thank the entire country of France for the greatest cover ever for a game I’ve worked on. Irreverent doesn’t begin to describe it… If you dare, click for a disturbingly oversized version.
Joypad: France

Play La Marseillaise!

Credit where credit’s due…  I really have to appreciate the fantastic coverage that This is Vegas has gotten from the press in Europe. While I’m really happy with how the U.S. press has responded to the game, it’s still funny to watch how Americans in general spend so much time pondering how much the game is like GTA.  In my completely broad-but-insulting generalization, people on this side of the world just seem to want to know who it is they get to shoot, while Europeans more easily “get it” and embrace the completely over-the-top nature of this game.

PSW: UKWhat is the deal with that? For everyone who complains about how games too frequently fall back on the old stereotypes of violence and thuggery, American gamers are still likely to complain when it isn’t present. People seem to think it’s just the result of high-level censorship…  e.g. in Europe sex = okay, in America violence = okay, but these attitudes aren’t just made-up.  The expectations of the audience certainly shapes the taboos in those respective countries.

Play3: GermanyTo either side here are a couple more recent appearances from the other side of the world… Here are a couple of covers from the UK and Germany, using imagery created by our awesome Art Director Wayne Laybourn. With the help of a great team including our design guru David Heutmaker, he has completely nailed the feel of our game… The colors, the motion graphics, even created a home for some of our more “game-y” elements… We’re not trying to create a gritty portrayal of the city of Las Vegas, folks, and anyone who compares it pixel-for-pixel with the real city is completely missing the point.  The style is like nothing I’ve never seen in any game before it.

Incredible stuff… Cheers, mate!

Rival Blog alert!

Don Hertzfeldt - HatMy first Blog on This is Vegas is now running at IGN, check it out here.  The IGN series won’t just be a soapbox for me, I just kicked it off…  We’ll be working to get as many different Surreal folk represented as possible there, more in the spirit of the sadly departed SurrealGameDesign (of course it will center mostly much around TIV, but I hope our minds can wander a bit).  This particular article covers some of the vision-oriented stuff on Vegas, and hopefully kicks off the TIV coverage with something at least mildly interesting.

We’re going to Vegas next week to show off the game (as well as check out other Midway titles), so you should see some good coverage very soon.  We don’t want to reveal too much too soon, but I am confident that the upcoming showing should answer many questions for people who don’t know what our game is about.

Short update today, sorry I’ve been slammed.  Meanwhile, enjoy some Don Hertzfeldt.

More This is Vegas coverage

This is Spegas!Over the past few weeks there have been a bunch of great references to This is Vegas.  Forgive me while I plug them for a minute. 🙂

Links

Video

One last edit:

My list of coverage can’t even approach this person’s…  Read the very first This Is Vegas blog.