Category: The Game Biz

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!


E3 Reaction

I watched all three press conferences live. My reactions:

Nintendo: By far the best of the three conferences. They managed to present a great sense of fun, starting the moment a grinning Miyamoto took the stage with a Wii remote (I guess I’m used to the name now) to conduct a virtual orchestra that was playing the Zelda theme. The only odd part of the conference was the fact that they didn’t announce a date or a price…even though both should be obvious. The Wii will ship in either October or (more likely) November, and will cost $250 at the most. Why not just go ahead and announce?

Nintendo is in a great position for this round of the console wars. First, they are at the bottom, so there’s nowhere to go but up. They will have the cheapest console by far, with the most interesting technology. And the Wii is basically just a souped-up GameCube, which means that GameCube games will run natively (no emulation or extra hardware required) and their third-party developers already know how to make Wii games.

Sony: Sony’s conference was literally “more of the same” – the same game types we already love to play, only with graphical improvements. The PS3 is going to look fantastic, and apparently every game made for it is going to be a dirty, grimy post-apocalyptic first-person or third-person shooter. The only innovation they actually have is the tilt control, which of course was added after they saw the Wii remote and doesn’t work as well as Nintendo’s version. Tilt control is one thing, but the Wii remote actually gives you what is effectively a mouse pointer – this was explicitly demonstrated in Nintendo’s demo of Zelda: Twilight Princess.

Microsoft: Boring, boring, boring. Halo 3 trailer was terrible. The crowd snickered at Viva Pinata, even though that’s just the type of game Microsoft needs to expand their audience. It’s telling that Microsoft is currently struggling to expand its audience out of the 18-34 male demographic while Nintendo, which already has a market across all demographics, is fighting to expand the entire gaming market. And in the end, I’ve got no sympathy for Microsoft here…they are simply reaping what they sowed with their “She kicks high” crap.

It wasn’t until near the end when they demonstrated how the Xbox 360, Windows Vista and cellphones could be integrated that I perked up. That type of close integration has been necessary for a long time, and it’s strange that a game studio is having to be the one that gives it to us. So at least Microsoft can say that it has truly innovative new technology, unlike Sony.

Microsoft has one big problem, though. They launched before Nintendo announced the Wii remote. Sure, they can still make a controller with tilt features, but it won’t be standard in the box and thus developers won’t be able to rely on it being there. Now, it’s possible that Microsoft will come out with a tilt controller and push it hard and it’ll effectively become the “standard” 360 controller. Sony was able to do this with the Dual Shock controller for the PS1. But it’s going to be tough.

Big winner: Nintendo, though if they had just announced date and price it would have been a Flawless Victory.
Second: Microsoft. They truly innovated with Live and now they are extending it even further.
Loser: Sony. “We’re afraid to try new things! We’re going to give you everything you already play with better graphics! And we’ll charge you six hundred freakin’ bucks to do it!”


Yay! Wait…

Hey, whaddayaknow? Gamasutra has started a game development podcast! Awesome!

First topic: the demographics of video game players.

Wheee.


Quoted on Gamespot!

I regularly listen to Gamespot’s Hotspot podcast. They’d been poking merciless fun at Stefan Eriksson for a while, but with his arrest it looks like that story is over (for now). On April 11th’s podcast, the guys briefly mentioned Warthog Studios and how it sucked that Gizmondo’s sleazy execs managed to take us down with them.

So I sent them a short email thanking them for mentioning Warthog positively and not lumping us in with the seedier aspects of Gizmondo.

And what do you know, they quoted it on yesterday’s podcast, and even mentioned the URL of this site! That was darn nice of them.

Thanks Rich, Bob, Alex, and Jeff!


Employed

I am now employed. The lucky company is Aspyr Media. It’s going to be an interesting job, and one I look forward to doing. I’ll certainly learn a lot.

Now, I don’t actually start work for another two weeks. A smart person would use that time to work on Star Revolution…we’ll see how smart I actually am.


Ditto

I’ll be glad when I can get out of the construction business and back into the restaurant business.

– Joe Bastianich, during the difficult contruction of his restaurant Del Posto

By the same token, I’ll be glad when I can get out of the “convince employers I’m a game developer” business and back into the game development business. For one thing, the game development business pays much better.


Quoted on Gamasutra!

My post on Gizmondo closing was quoted in this Gamasutra news article! Super coolness!

Of course, they didn’t bother to link to my blog OR mention me by name, so the odds of that bringing in new readers are pretty small.

Still…quoted on Gamasutra!


The First Cut is the Deepest

I can now tell the Gizmondo story (which is also the Hit & Myth story). I can tell it now because it’s over.

I already told the story of how I came to Gizmondo, so let’s pick up where that one left off. When I arrived at Gizmondo in late March of 2005 I jumped straight into Hit & Myth, our fast action/RPG hybrid based on lead programmer Ryan Clark’s Zarria engine. The game had a basic editor and engine going but had few of the features of a finished game, and a lot of those features had to get in quick because we wanted to demo the game at E3 in May.

The E3 demo went well, despite a bug in my code where if you started fiddling with the controls while the game was loading it could become non-responsive after the load finished. Doh.

But once that was over it was time to push to the finish line. The quick-and-dirty subsystems I created for the E3 demo had to be polished or replaced with more functional ones. The game had to be internationalized. We worked our butts off for several more months.

It was around October that things started getting weird. Now, granted, the then-CEO of Gizmondo had always seemed kind of fishy, but then a newspaper article came out in Europe that accused him and some of the other Gizmondo investors of having ties to the mafia of all things. The CEO eventually resigned and left a huge mess in his wake.

Hit & Myth went gold in late October, but Gizmondo didn’t have the necessary cash to publish it. They didn’t even have the cash to pay for the XForge library we had used to create the game, requiring us to spend another month rewriting the game to work without that library. (By the way, I really liked XForge. It made developing the game a lot easier and I recommend it.) Then we started working on other projects, like the Gizmondo version of Johnny Whatever (which could still be the most awesome game ever if done right – imagine a cross of Guitar Hero with Grand Theft Auto III). But the mood was kind of tense…it was becoming obvious that the future of the company was in doubt.

And then in December we didn’t get paid. It made for a lackluster Christmas, but I personally had some savings to draw upon and our family helped out so it wasn’t that bad. A little more investor money came in, Gizmondo caught up on our payroll and it looked like the crisis was over. We were assured that over $50 million was coming into the company.

Then in January we didn’t get paid again. Turns out the investors had a lot of strings on that money and one of their requirements was a massive reduction in headcount. It also became obvious that they were waiting to get the stock price as low as possible so they could buy more of the stock (and gain more control) with their money.

The head of our studio made an impassioned plea on our behalf to our corporate masters in Europe – all the other studios had already been cut and without us there would be no one to create unique content for the Gizmondo device.

But in the end it was for nought. The studio closed and we are all scattered to the winds (which is a nice poetic way of saying we’re unemployed).


Gizmondo Studios Texas was the best place I ever worked. The people were awesome, the project I was working on was perfect for me, and the office building itself was very cool (it was a renovated theater). And leaving hurt. But it’s true – the first cut is the deepest. Leaving Gizmondo didn’t hurt nearly as much as leaving Origin did, even though by the time I left Origin I practically hated my job there (though of course I wouldn’t admit it to myself).

So now I’m unemployed. What does this mean for Star Revolution? Well, in theory I should have more time to work on it…but in practice I’m spending that time polishing my resume and improving this website. Hopefully I’ll get something soon so Star Revolution doesn’t get too far off track. And in the meantime, there’s another idea bouncing around in my brain…


Visual Studio Express

You probably already know this, but just in case you didn’t: Microsoft is making the Express versions of its Visual Studio development software free for a year. These are full-featured compilers for the Visual Basic, C++, C# and J# programming languages, and yes, you can make commercial software with them.

I don’t know why Microsoft hasn’t been doing this all along. One of the reasons I am where I am today was because I found a book that had a learning edition of Visual C++ 6 on it. The learning edition put a “Not for Commercial Use” popup at the beginning of every program you made for it, but was otherwise full-featured, giving me very valuable experience that later got me my first programming job. I always wondered why they didn’t make that edition available for free download from their web site.

Of course, this is probably Metrowerks’ worst nightmare, and this will probably coax the last few Borland users into the arms of the behemoth. Still, when the behemoth makes it easier to learn software development and reduces the development cost of making commercial software, you can’t help but be a little grateful.


He Still Annoys Me…

…but I have to hand it to Greg Costikyan. He’s putting his money where his mouth is.