Skinny Boy

My son David has always been kind of skinny. It’s been a bit of a concern for me and my wife for a while…even though he seems to eat a lot (and eat a lot of protein), he always looks a little underweight.

He recently had to have some shots, since he’s starting kindergarten this year. So we took him to the doctor. The nurse weighed him and measured him and then told us, “Well, he’s in the seventy-fifth percentile for his weight…”

I was aghast. “He only weighs seventy-five percent of what he should?”

“Oh, no, oh, no!” she laughed. “That means he weighs more than seventy-five percent of five-year-olds.”

“So he’s actually over the normal weight? Why does he look so skinny, then?”

“Well, because he’s in the ninety-fifth percentile for his height.”

I was stunned. He doesn’t look skinny because he’s underweight, he looks skinny because he’s about six inches taller than the average five-year-old! And he just turned five two weeks ago!

Needless to say, I was relieved.

Getting Started in Game Programming

I’ve thought for a long time about writing an article on how to become a game programmer on your own. The problem is that everybody and their kid sister has written an article on this subject, and most of them are better than anything I could write.

But there is one thing I can do to help the budding game developer, and that’s point out which books he probably should be reading (and which ones he probably should avoid).

There are a couple steps on the path to becoming a game programmer. First, you have to pick your language. Your language is C++. There, wasn’t that easy?

Yeah, I’m being a little facetious. If you’re just writing games for yourself and don’t want to get an industry job or ever work on a team, you can write your games using whatever language, libraries and helper programs you want.

But if you want to become a professional, you’re going to have to learn C++. End of story. Oh sure, other languages might be helpful, but the vast majority of game development (both on PCs and on consoles) is done in C++. Why? Because it works, and more libraries have been written for it than any other language. There are free C++ compilers for almost every operating system on the planet. And there are more books on C++ than any other programming language.

Let’s talk about what to avoid. Avoid books that promise to teach you how to program a game in a short amount of time. What most of these books teach is how to use a scripting language or a gamemaker program to make games. This won’t be useful to you if you want to become a professional game developer. Specifically avoid the book 3D Game Programming All in One, as this book is basically just a tutorial for the Torque game engine and teaches you nothing about programming. Also take careful note of any book that promises to teach you DirectX; some of them actually use Visual Basic instead of C++, which makes them darn near useless.

So here’s what I suggest.

First, get a compiler. You cannot learn C++ without a compiler. If you’re on Windows, get Visual C++ Express and be done with it; there’s no sense in messing around with anything else. If you’re on another operating system you’ll probably end up with some version of GCC, which I don’t know much about, but it’s in widespread use so research shouldn’t be that hard.

Second, you need to learn basic C++ syntax. There are a lot of books on this subject. Tons and tons of them. Most of them are crap, but even a crappy book can suffice here if it does actually cover the basics. Now, back when I learned C++ I did it from a book that included a floppy disk with a copy of Borland’s Turbo C++ on it…that’s how long ago it was. So I’m not that familiar with the current crop of books, but the one I keep hearing about is Accelerated C++. You probably won’t go wrong with it (but this is the only book I will recommend that I haven’t actually read).

Once you’ve learned basic C++ and are familiar with your compiler, it’s time to get a more thorough overview of the language, and the best book for that is none other than Stroustrup’s The C++ Programming Language. Now, this book covers the entire language and most of the Standard Template Library and it’s not particularly difficult to read. But it should not be your first C++ book, because it isn’t a tutorial. I would recommend going straight through the book, reading each section and writing little programs in your compiler to demonstrate to yourself that you understand each concept – this is exactly how I learned C++ on my own. I would also recommend making double sure that you understand how classes work, how inheritance works, and how pointers work before you proceed to the next level. If you can’t tell me what a reference to a pointer is and why you would want to use one, you probably shouldn’t go on yet.

Now you know how to do pretty much everything in C++. But there’s more to learn, because there are a lot of things in C++ that you shouldn’t do even though you can. The next two books I would recommend are Meyers’ Effective C++ and McConnell’s Code Complete. Both of these are outstanding books that will make you a much better programmer practically overnight if you take the time to read and understand everything they say. Effective C++ will tell you about all the common traps C++ programmers fall into and explain how to avoid them. Code Complete is a bit higher level – it will teach you how to design your programs before you start coding so that your code doesn’t get so tangled you can’t deal with it any more. Code Complete is especially important if you plan to become part of a programming team.

Now, during the course of reading Effective C++ and Code Complete, you will probably encounter information that contradicts what you read in earlier books. In this case, these two books win.

Now you’re a hardcore C++ developer, but you still don’t know anything about game development. Therefore, your next book should be Llopis’ C++ For Game Programmers. This book is going to directly contradict things you’ve previously read; in this case, this book wins. You’ll be doing lots of stuff in game development that would make your average OOPmeister wince; that’s just the way game development is. Some of the content in the book will be stuff you already know. That’s okay, because the rest of it is pure gold. Pay special attention to the section on memory management; this is a vital concept that most game development books ignore because it can be quite difficult.

I’m also going to recommend that you read McShaffry’s Game Coding Complete at this point. Make sure you get the latest edition, which at the time of this writing is the fourth edition. This is the only book I’ve ever seen to cover how to design and write an overall game engine, as well as how to create a resource handling system. Again, these are both topics that most game development books ignore because of their difficulty. This book will also cover the basics of just about every aspect of game development, including graphics, sound, physics and networking.

If you’ve been reading and coding dilligently then you should now have a solid understanding of the basics of professional-level game development. Now there isn’t so much a progression as just a list of books I’d recommend.

The Graphics Gems series – if you’re doing 3D programming, and especially if you’re doing 3D programming on a platform that does not have hardware acceleration, then you must have at least the first book in this series. Yes, it is terribly expensive, but it’s worth it.

The Game Programming Gems series – this was an attempt to create a series like Graphics Gems, but for general game development. As they progressed the information presented became more specialized and less vital – but again, you should definitely own at least the first book.

If you are just starting out with Direct3D, then the book I’d recommend is Introduction to 3D Game Programming with DirectX 9.0 by Frank Luna. This book actually lives up to its name and will take you in baby steps from initializing Direct3D to particle systems, multitexturing, shadows, landscape rendering, picking, and pixel and vertex shaders. Make sure you get the first edition of this book, as the second edition will focus on DirectX 10 and will do everything with shaders. That’ll be interesting, but it won’t be a “for beginners” book like the first edition is.

Hope this helps!

Planitia Design Pass

Okay, Planitia. Here’s the basic design I am visualizing.

You’re a god. Your people worship you. You gain mana from their worship, and how quickly you gain mana is dependent on how many of them there are. There are three things you can do with your mana:

  • Raise and lower the land. This will give your villagers more space to expand.
  • Spend it to teach your villagers new things, like how to build new buildings or how to do certain tasks better.
  • Cast spells that either help your villagers or impede your enemy’s villagers.

I was not planning on including direct control of your villagers (though this could change). This would result in a very Populous-style game.

The only problem is that if the base game is growing your civilization with no direct control over your villagers, that’s not really a game. it’s a software toy. To make it a game, there are two options.

The first is to give the player external, computer-enforced goals, like “create 50 villagers” or “generate 1000 mana” or “expand your village to this size”. Since the actual game play will be pretty simple, this may not make for a very fun game.

So we get to the second option. The one where you build up your village so that you can destroy all who oppose you, burn the bodies, salt the earth, collect their souls to offer to your dark god, etc, etc. Option two would probably be more fun. Option two requires either multiplayer or a half-decent AI. Both would be hard to do in 40 hours. So we’d end up with a game with very simple gameplay, but you can play skirmish against the computer and/or multiplayer with someone else over the net.


Feed Fixed

I’m not a big user of RSS, so I hadn’t noticed that my site’s feed was broken until a friend at work told me. It should be fixed now, but the fix involved upgrading the site to the most recent version of WordPress, so some other things might have gone wibbly.  If you see any problems, please let me know.  One additional benefit of this is that I might be able to get this site listed on an aggregator like now.

The Voices of Hit & Myth

Hit & Myth had a budget of roughly three dollars and some pocket lint, so we were forced to do most of the voice acting ourselves.

Forced to. Really. We had no choice. It’s not like we liked making silly voices.

And, okay, I’ll admit it. I’m posting this stuff because I did a lot of voice work for this game and I want people to actually hear it.

If you’ll recall, when I came on the Hit & Myth project, it didn’t have a sound engine and it didn’t have any sounds! I came on at the end of March and E3 was in May, so this was a priority. We grabbed some stuff from our libraries but a lot of stuff had to be done from scratch, and fast. So one evening TJ O’Leary, our sound designer, fired up his recorder and I spent about an hour doing a bunch of zombie, wraith, ghost, alien, and skeleton voices. TJ liked most of them enough that he left them in the final game.

Later, after E3 was done, it was time to record the actual dialogue. Just about everybody pitched in. Here’s what everyone did and some samples.

Wynne McLaughlan, our chief designer and writer
Cadbury (the hero) – Wynne said this was his best Monty Python impression.

Michael Morlan, our producer and an experienced filmmaker and actor
The Narrator
The Big Kahuna
Santa Claws
Billy-Bob 209
The Jabberwock
Cthuluhoop (the main baddie)

Eric Peterson, our studio head
The Cheshire Cat

Mike McKinley, one of our artists
Santa Claus

Dave Shramek, designer
Pervis the Poltergeist

Steve Garcia, another artist
Jerry the Elf – Steve beat me out for this part, and I’m actually glad, because his Jerry was much better than mine.

TJ O’Leary, our sound designer
The Caterpillar

Robie Kentspeth, the only non-Gizmondo employee. She is a professional filmmaker and actress and a friend of Mike Morlan’s. She did all our female voices. I especially liked her Alice.
The Cyber-Reindeer
The Red Queen

Crypt Keeper
Scary Beast
Flesh Golem
Robie the Robot – This is basically our homage to the classic arcade game Berzerk.
The Balloon Elves – I insisted this line be in the game. It’s a reference to the Gnomish Flying Machine unit in Warcraft II.
The Suicide Elves – And this line was a reference to the Troll Batrider unit in Warcraft III.
The Snowman
The Scrinch
The Card Knights – For this voice, I basically just imitated the Spy unit from Command & Conquer: Red Alert.
Tweedledee and Tweedledum
The White Rabbit – I hate this voice; I pretty much came up with it on the spot. Wynne liked it, so I guess that’s all that matters (Wynne and Mike Morlan were co-voice-directors).
Shub Nogginsplitter (the last boss) – This is my standard demonic voice. My kids hear this one a lot.

I ended up doing almost every non-boss enemy in the game, plus a couple of the bosses. Ryan once described Hit & Myth as a continual battle between me and Wynne, and every time Wynne kills me I pop up in a new form.

And finally, this is my favorite bit from the intro movie.

HFBB Design, Part 2

When you know more about what it is you like about these games specifically, then a design will start to form.
– Dave Shramek, in a previous comment

Actually, what I liked about those games were the little coherent computerized worlds that they presented. Just about all of these games had wonderful little touches that made them feel more real. Powermonger had the birds that would fly around – useless from a game perspective, but a wonderful little detail. In Syndicate Wars, you can have your agents jump in a car, which you can then drive around the street. You can even have them take the monorail if the city you’re in has one. And of course, there’s the fact that you can blow up every building in the city if you try hard enough.

And now that I’m thinking about this, I remember a short story I wrote in high school about a king who rules a fantasy world where everthing anyone ever roleplays in this world actually happens. The king has a magical miniature diorama of the entire world that he can use to watch as the various adventures unfold, and doing so is his favorite pastime. I think I might identify with the king just a bit 🙂

But that sounds more like a tech demo than a game, so I’m still thinking.

One thing I have come up with, though, is a title for…whatever it is. I’m calling it Planitia, which is the Latin word for “plain” (as in”grassland”, not “unattractive”).

HFBB Design, Part 1

So I need a game design based around a heightfield/billboard engine.

First, let’s be explicit. What do I mean by a heightfield/billboard engine?

I mean a base world defined by terrain, and that terrain defined by a heightfield. Other models may sit on top of this heightfield, but the heightfield is the “ground” of the world.

Units in this world will be done with billboarded sprites. A “billboarded” sprite is one that is actually rendered as a 3D object, but is always rotated so that it faces the player.

Lots and lots and lots of games have been made with this system, and some of them have been truly great, like…

Populous (It counts, although you couldn’t rotate the map):




Dungeon Keeper

Dungeon Keeper

Syndicate Wars

Syndicate Wars

Myth: The Fallen Lords and Myth II: Soulblighter

Myth: The Fallen Lords

You can see that this engine style lends itself to real-time games with strategic elements (although none of the above are “real-time strategy” games as that phrase is defined today).

I definitely want my game to be real-time. I want the player to have buildings and units. I want the game to be fantasy-themed or mythology-themed. I also want the player to be able to raise and lower terrain, and I want that to be an actual game mechanic. But I’m not sure if I want the player to be able to directly control units. And I’m not sure if I want resource gathering.

Standard real-time-strategy: The player has direct control over resource gathering, building creation, unit creation and unit direction.

Populous: There are no resources. The player has indirect control over building creation and unit creation, and unit direction.

Powermonger: Some resources can be gathered directly. Others simply control what you can build in each city. The player has indirect control over building and unit creation, direct control over special item creation, and direct control over his army (but not villagers).

Dungeon Keeper: The player has direct control over buildings, resource gathering and resource collecting units, but only indirect control over fighting unit creation and direction.

Syndicate: Syndicate is more of an action game than a real-time strategy game.

Myth: There are no resources. There are no buildings. The player has direct control over his units.

Notice that Powermonger and Dungeon Keeper are practically mirrors – in Powermonger, the player indirectly controls the creation of his army, but directly controls the army itself. In Dungeon Keeper, the player has more direct control over the creation of his army (though not total control) but has little control over the army itself (he can drop his monsters directly over the enemy, but if they don’t want to fight they’ll just walk away).

Hmmm…this is going to take some pondering.

The Dragon’s Lair

This post on the Rampant Coyote’s blog got me thinking about the Bluth/Dyer games in general, all of which I loved despite their frustrating gameplay. So I typed “Dragon’s Lair” into YouTube.

Boy was I surprised.

All of that footage was cut from Dragon’s Lair (except the dragon fight at the end). The most intriguing to me were the scenes where there were several different possible exits from certain rooms. This footage got all the way through the animation process before being cut.

I think with that footage, a very good case can be made that Rick Dyer originally had a very different design in mind for Dragon’s Lair.

The Dragon’s Lair we got is a tightly linear game, where rooms are thrown at the player in random sequence and the player must memorize the moves necessary to beat them by rote. But the animated sequences that show Dirk leaving some scenes through alternate exits strongly suggest that the castle was originally designed to be coherent, not random. Which would have given the game an aspect of exploration and required the player to not only figure out the correct sequence of moves to get through each room, but also to figure out the best path through the castle to the dragon.

This, frankly, would have been fantastic and would have given the game much-needed depth. It also would have paved the way for future games to do the same. It’s a shame that the feature had to be cut.


MainState.cpp: What the hell? I’m versioned! And properly backed up! And the backup is even off-site! It’s like he…he cares!

I mentioned in my Inaria postmortem that I was going to stop using my PDA for code storage/transport and set up a real Subversion server. I’d put it off because I figured I’d have to see if my web host supported it, learn how to telnet into the server, install the software, create the repository, install TortoiseSVN on my machine, and then see if it all worked.

But with me starting another new project, I figured it was time, so I went to the web configuration panel for my server space that DreamHost provides me to see if DreamHost supported Subversion servers.

Not only do they support them, but there was a button there to automatically set up an Subversion server in my web space. I clicked it, and now I have a Subversion server and all my files are properly source controlled now. I’m sure they sleep much better because of it.

MainState.cpp: Damn straight!

It has occured to me that I haven’t said enough good things about DreamHost on this site. DreamHost is fantastic. The number of problems I’ve had with them is zero. Every time I look to see if a particular feature is supported, the answer is yes. And nine times out of ten, they’ve already done the work of setting up that feature for me. I will definitely be renewing my service when it expires next year. (For the record, I have the Code Monster package.)