Michael Abrash on Games Programming
An anonymous reader sent in an awesome article by Michael Abrash (If you don't know, I'm not telling). Tons of great bits in there, advice, anecdotes etc. Definitely worth a read if you are
either a programmer, or a game fan.
One counter argument to the notion that violent games like Quake cause violence is that such games actually give an outlet to violent tendencies, preventing them from manifesting themselves in everyday life. If you believe that argument, you could extend it to believe that games have prevented some people from becoming serial killers, thus saving lives.
I doubt many people who write games believe either side of that. I know I don't. But it's what you asked for, an argument that games save lives.
When I tell people that I'm a Computer Science major, their first reaction is that I'll probably make lots of money. Regardless of the truth of that statement, it saddens me that people think of that first. Even many of my peers are in this program because they think it will be a ticket to a high paying career, even though they hate what they are doing.
So its incredibly refreshing to see an article like this. This reminds me why I chose computer science -- because I love it! Its in my blood! Call me a geek, but binary search is beautiful (log n!!). I can't stop reading about this stuff after school and on weekends.
It almost seems like Abrash really enjoyed his time with game programming, but wanted to 'do the right thing' and go into "a software field with deep structure and long-term challenges-something more significant, difficult, and ultimately rewarding." But in the end, his love for games and graphics programming won out.
Thank you for this inspiration, Mr. Abrash!
I consider Mike Abrash my personal hero. His writing inspired me to get into graphics programming. He has a simple way of writing, and he makes it a pleasure to follow him thorough the complex concepts he writes about.
Mike's "Zen of..." books should be on any graphics programmer's bookshelf.
It's kind of sad that he now works for Microsoft, but I guess it's good for MS--if nothing else it proves that they CAN hire talented (and old-school) coders.
His tips on the second page are golden! Particularly:
Get past the abstractions and know what your code does. Profile in many ways: profilers, NULL drivers, bracketing key code with timing calls, breaking into the debugger at random and seeing where you are. If you don't do this, you're guessing.
Knowing what to optimize matters as much as knowing how to optimize. Otherwise, you'll optimize the wrong thing, and end up with really fast slow code.
> games cover a huge range of technologies-graphics, physics, modeling, scripting, AI, networking, databases-more than any other kind of software I can think of. What I finally realized was that, for me at least, game programming is the sweetest spot in all of software development.
They might be fulfilling to the programmer, but that does not necessarily mean that games programming is the highest form of programming. Don't get me wrong, I like a Quake deathmatch with the rest of the office as much as the next guy, but to say that games programming somehow transcends other software is wrong.
Surely it's much more fulfilling to say that you created the software that runs a hospital which saves people lives, or that we sent man to the moon on one of your programs. Compared with these games seem just a little trivial.
I'm a game developer working on the Open Source Genesis3D game engine for a new version coming out.
It has always been my dream to do some type of programming that was constantly a challenge as I tend to become bored very easily. There is always some challenge to game programming as you do your best at something then have to do even better next time around. You are constantly trying to out perform the best out there and constantly pushing the computer to it's limits with the latest games.
It can be a great field to be in but getting in is the difficult part as along the way you are viewed as a game programming wannabe and most people don't even make it over the "write a simple game" hurdle. Even after getting into the area you have to prove your worth against others at or possibly above your level of knowledge. Reading a ton of tutorials doesn't always help as you have to break away from the tutorials sometime and take your own steps out in doing a game or an area of a game. Alot of people fall down at this point too and never get back up because they decide it is too hard and don't really understand what is going on so they continue on the tutorial path or just quit all together. For those that break away from tutorials and understand what is really going on to make the game run can great some good games. From there it is a matter of finding a game company to take you in. Of course you would want to get into a company that is constantly using the latest things and this isn't always easy either.
The road is long but can be very enjoyable for those that have the patience, always want a challenge, and have fun with their job.
I have no idea if I explained that like I wanted to. But I know what I meant.
www.HearMySoulSpeak.com
There's a similar sentiment in the hacker community I have witnessed in open source projects. I've participated in a few, and I inevitably get blank stares when I ask for an SRS or architecture document so my components blend well and extend the current structure elegantly. Nevermind when I ask where in the source tree to drop my UML diagrams. I just ask that for kicks nowadays :)
In the business world, no one gets paid to write code. We get paid to ship software, and I've found that regardless of their attitude coming into the project, everyone is delighted when we ship a solid product on time and within budget. It's so rare a thing in this industry that coders get simply giddy at the thought of telling their friends they actually did it.
From my experience, a realistic estimation and budgeting system and thorough engineering process is the number one most effective perk in terms of retaining happy programmers.
-- ShadyG
Nerd Rock In Progress
You have to be comfortable in the basics at least. Actually, to do well in any area of computer science, you have to be generally good at math, not necessarily a master, but you still proficient and if you run across something you don't understand, you need to have the ability to sit down and teach yourself. IE, I know basic linear algebra, when I run across something that requires a new skill, I sit down with a text book and acquire it. When I read Abrash's book "Zen of Graphics Programming", I remember thinking to myself about the difficulty of the math (I was in late middle school, early high school), but after working through it, it's kinda neat to see what you can do with numbers. And Abrash is one hell of a programmer and thinker. He and Donald Knuth are two of my favorite CS guys.
Humorless sig goes here.
This is so true. Just visit Sourceforge and check out projects that die between working and complete. There are so few programmers who can actually finish a project. More so than pure programming ability it separates the great from the merely competent programmers.
I myself am on the verge of spending some serious cycles on NL programming (adding 'smart' bots to a MUD) and am curious what about NLP he didn't find satisfying. Seems to me NLP is one of those 'deep knowledge areas the industry is moving to'.
Well, at least in all the games I've ever played the AIs are stupid as fu**, especially when it comes to language, so obviously somebody needs to look into it.
In many games, polygonal objects are stored at several levels of detail; objects close up are drawn with more complex models. If you always use the lowest LOD model for collision detection, people will notice how much better it is than a cubic bounding box but will probably not notice a couple cm difference in the detail silhouettes.
Like Tetris? Like drugs? Ever try combining them?
Will I retire or break 10K?
Oh, come on now. Are you telling me that everyone in the electronic entertainment industry would die if suddenly there was no more demand for new computer games? I think that most of the people in that industry would be talented enough to roll into related areas rather than slowly starve to death due to lack of income. For example, a graphics programmer could certainly get a job doing engineering graphing software (something I have done, in fact I got that job because I had experience writing games and doing graphics programming), or a game logic programmer could move into the AI field, etc, etc.
Sorry, but it's a little too indirect to actually make the claim that it "saves lives" that way. Certainly it puts bread on the table for a lot of people, but I'm sure none of them would die if it all went away. Interesting argument, though.
--
www.scorbett.ca
While this article was great in terms of general programming knowledge, it seemed to neglect a detail that many game developers sadly overlook. A game is *nothing* without playability.
Mr. Abrash spends quite a bit of time in the article talking about the best ways to go about programming a game. This is obviously something that comes through in his designs, since the certain software company he developed for spent more time on their game engine than they did level design. This tendancy is even stronger in today's game market where the 'definitive' FPS's are Quake 3 Arena and Unreal Tournament. Both of these spent much, *much* more time on engine development and programming than they did on making their games enjoyable.
Don't get me wrong... Q3A and UT are loads of fun, but compare them to the playability of Half-Life, a little older game that is based (IIRC) on the Quake 2 Engine. There's a lot of custom code in HL, but the majority of it is still a big Q2 total conversion. Valve focussed on playability, story, and fun in HL, rather than code and this shows. I'll play Q3A for a little while, especially if I'm waiting on a long download, but I've lost entire weekends to the plot details in Half-Life.
Programming can be and end unto itself, and even *should* be in some circumstances, but its only half of the equation when building a video game.
The next Slashdot story will be ready soon, but subscribers can beat the rush and slashdot the links early!
This paragraph made me smile.
Aim high, think big. Right now is a particularly good time for ambitious game programming, because so much more is possible now than ever before, thanks to CPU performance and 3D accelerators.
You know -- that's as opposed to five years ago when CPU performance was at its lowest in over ten years.
I mean, you know, I dig the point and all, but won't it always be a good time for ambitious game programming?
-- dR.fuZZo
I've been doing this subconsciously for years, but I didn't really take note until this past Christmas. My gf and I were at Walmart buying a tree, and it was pretty friggin' sharp. To carry it to the car, I needed gloves. No gardening gloves were to be found in the garden department, so my gf asked an employee where the tools were, thinking they might be there. I instinctively re-asked the question in a different way: "Where can I find gloves suitable for protecting my hands from the tree spines?" We found then in sporting goods. The tool department was a proposed design, but analysis led me back to the core problem that needed solving.
Of course when I got home, I realized that I didn't need gloves at all. The problem was scratched/punctured hands, not an explicit need for gloves. On that same trip, we had already purchased a tarp to lay over our carpet. I could have wrapped the tree in it and not needed the gloves. So I actually failed to address the original problem to determine the most efficient solution. Still learning after all these years :)
Back to software engineering, this new focus has been of tremendous help in developing product requirements, architecture, and design. I feel much more confident that the product my team develops is actually providing a useful service to the customer, rather than usefulness being accidental to the cool technology we invented.
-- ShadyG
Nerd Rock In Progress
but my boss tells me that we have 2yrs of work to do by July. Optimize code? Hell, as soon as something looks as if it might possibly work one day it is ripped from my hands, stamped with Version 1.0 and shipped to the customer. I'm told that 'we'll fix it later', but there is another list of features that are slated for the next release (December).
I do code as the author suggest at home on my own projects. I'll rework a program at the drop of a hat if I see or hear of a better way. But, at work, and I'm sure this holds for the vast majority of programmers, code is considered optimized when it works correctly on 95% of a regression test set.
Aah, change is good. -- Rafiki
Yeah, but it ain't easy. -- Simba