top | item 6095905

Essential Math for Games Programmers

264 points| Baustin | 12 years ago |essentialmath.com | reply

38 comments

order
[+] dvt|12 years ago|reply
I think many analytic-type of people (I am part of this group) live in a fantasy land in which the smarter you are, the better game you'll make. Wrong. It's cute that you know how to interpolate quaternions from memory, but that won't make you spit out a good game. First of all, lets look at the term "game programmer": this term is slightly odd -- often times, especially when just starting out, you'll be making games in an indie environment; in such a case, you'll need to be a good game designer. Making an amazing indie game is probably the best way to get in the game industry. Studying math is not.

I'd sum up the most important skill like this: "learn how to finish projects". You can know all the math (or design) in the world, but if you can't finish anything, no one will be impressed unless you want to be code monkey #3249 at EA (and who wants to be that?). This seems easy when read on paper, but in reality it's fucking hard a shit. I've probably abandoned about 95+% of game projects I started. Anyone that says they finish more than 50% of the projects they start is full of shit. This is a skill -- and it's by far the hardest one to hone.

Note that it's not that I don't approve of OP's hard work compiling the list, I just think it perpetuates the idea that good games == good technology. Carmack is a CS genius, sure. But more importantly, he's a damn good game designer.

[+] nilkn|12 years ago|reply
I agree with most of this post except this:

> Making an amazing indie game is probably the best way to get in the game industry. Studying math is not.

There are many specialized graphics programmers in the industry. They do not design games. They do not write dialogue. They do not make any art. They don't make sound effects. They don't design plots. But they absolutely do need to know linear algebra and a lot of the stuff listed here. I think the only problem with this post is that its title suggests it's aimed at the general game programmer, but it's actually aimed at the graphics or physics programmer, the sort of guy who would work on the Unreal Engine itself, not a game made with the Unreal Engine.

EA is probably a really crappy place to work (don't know for sure, but that'd be my guess). However, I've heard amazing things about, e.g., Valve, and I think they'd be more than happy to hire a brilliant graphics programmer who's never shipped an indie title that he built from scratch.

[+] mathgladiator|12 years ago|reply
> fantasy land in which the smarter you are, the better game you'll make

This is very true. I can testify that I work very hard at making my own 3D/2D game engines/gui frameworks. Yet, how many games I have finished: 0

> I've probably abandoned about 95+% of game projects I started

We should start a club ( http://jeffrey.io/wall-of-shame )

> perpetuates the idea that good games == good technology

I think, we are very fortunate, to be in this realm of easy and cheap CPU. good technology, back in the old days, were critical to putting out amazing games. This was simply due to the fact that without the crazy tech, you wouldn't have anything worth playing.

Now, woah, I can have my browser in an emulated android instance running on my emulated linux machine run games just as good as SNES.

For some new side projects, when I just "let go" of all the tricks and crazy algorithms I know and just "code to get things done"; it's like flying. Maybe in the next couple of years, I'll actually finish a game... Maybe

[+] groby_b|12 years ago|reply
Having worked in that industry for 15 years... You might want to study math after all. It's going to be part of the job interview.
[+] bloodorange|12 years ago|reply
If you are not working at a large game-dev studio, you need both skills. Most of what you need to do is already 'designed' but often you end up taking calls on things that are not clearly laid out for you.

You may also end up working where there is a clear 'game designer' and 'game programmer' separation even if it is a small studio (20-30 people). In both these cases, you need to know your basic 3d maths to be useful in your role.

I concede that it's much easier nowadays since you end up using an engine that abstracts most things for you. Nevertheless, you do end up hitting the limits of the engine and may want to implement that killer feature yourself.

I have encountered all of these situations. I'll say that the minimum you should know if you want to be a game programmer is:

  - high school level algebra

  - high school level trigonometry

  - basic 3d vector mathematics

  - an understanding of graphics transformation (and the corresponding matrices)

  - basic splines
If you are looking for a very specialised role, then you can probably forget these and focus on say AI or Networking but I see that as too risky in an industry that is already infamous for its treatment of employees.

[Edit: Formatting]

[+] chipsy|12 years ago|reply
There's an extremely important design skill in knowing what kinds of algorithms might be fun to turn into a playable form, and doing that is a mix of getting past preconceived "all games are like this" notions, and having substantial breadth of technical experience(i.e. if you're still in high school, it's too early to expect anything, even if you're a prodigy). But I will agree on this point - it's not the same as doing the complicated engineering needed to match existing game tech feature-for-feature. Nobody will notice a better photorealistic renderer - but they might notice an aesthetic or a kind of simulation that's completely untried or previously abandoned.

And there's also increasingly a place for "outsider" works now, because the off-the-shelf tools are very capable. Tech skills still help smooth the way with those, but I've encountered a lot of people who aren't deep into CS and get by with a lot of handholding from friends. I find this more interesting than traditional gamedev now, since there are so many perspectives outside of the tech sphere.

[+] lackbeard|12 years ago|reply
Nowhere in the post does its author imply that a game is good if and only if it was built using good technology.

You present a reasonable idea. But it's totally orthogonal to the content of the post, so I wish you hadn't made it here.

[+] exDM69|12 years ago|reply
> I think many analytic-type of people (I am part of this group) live in a fantasy land in which the smarter you are, the better game you'll make.

These days this should be called "essential math for game engine programmers". You're not going to write a good 3d game engine without knowing how to interpolate quaternions, for example (needed e.g. in skeletal animation).

If you just want to write a game, you should pick up an existing engine and go with that. No extensive math or 3d skills required.

If, however, you want to learn how computer games work underneath the surface, you will have to learn the math.

[+] ameen|12 years ago|reply
Carmack was a damn good game designer. Considering the reception and the financial performance of RAGE (id's latest release), I'd say he isn't that good a game designer he once was.
[+] kayoone|12 years ago|reply
I can only recommend for any programmer to get into graphics/game programming even if you dont have any prior knowledge. The required skills are vastly different from web development for example. While in Web Development its alot about Architecture, Services, binding countless of Technologies together in the right way, game/graphics programming is alot more about programming clever and well-performing algorithms and math. Add some network programming (multiplayer) to the mix and you have one more extra level of complexity to master. Gave me alot to learn!
[+] tinco|12 years ago|reply
There's a lot of binding technologies together in games programming nowadays too.

Component oriented programming makes it rather easy to pick a technology, make a component out of it and adding it into your system.

Especially if you use a prebuilt/popular component system like Unity3d you can almost just click and drag technologies together.

It's true that if you need any of your components to perform extraordinarily then you'll have to dive deep and become an expert, or make sure you find an expert to help you.

Ofcourse, if you want to do everything yourself, then you might have to learn everything yourself , and you'll have to master a lot of things. It is true that games programming covers (almost?) every field in computer science. I guess this is the result of games basically being simulations of (part of) the universe.

[+] zalzane|12 years ago|reply
I agree with this comment. Developing a game is one of the most complicated and rewarding projects you can perform on your own. I would go as far to say that developing a complex game may even be on the level of operating system development.

I know dozens of independent developers who work on their own games (myself included) - people who work in fields completely unrelated to CS/video games, but still work on games simply because they are such complicated projects to develop.

If you're the kind of person who thrives on difficult algorithmic and code architecture problems, I highly suggest giving game development a shot.

[+] GeneralMayhem|12 years ago|reply
Game dev certainly also requires a lot of high-level architecture work. Making a good modern game basically requires being world-class at everything, all at once.
[+] altharaz|12 years ago|reply
Getting into embedded system is also a very good exercice to structure your mind and pay attention to your algorithms.
[+] xedarius|12 years ago|reply
Probably worth noting that over time the games industry has become more specialised. The skills listed are essential for working in certain areas, for example rendering, engine work and physics.

Knowing how to interpolate a catmull rom spline is not required of a network programmer.

If you're considering a career in the games industry the best advice I can give you is to create a demo of your work. Do not build something ontop of a mod, build something of your own, be original and creative (something that the list does not emphasis). Don't worry if you can't draw, it matters not.

[+] dvt|12 years ago|reply
I disagree slightly. I think that building a mod is, bar none, the best way to test the waters of game design. Furthermore, many (many) extremely talented game designers got into "real" game design by modding: from Counter-Strike, to DOTA, to Natural Selection, building a good mod is easier and far more consequential than slogging through building yet another Pong clone.
[+] binarymax|12 years ago|reply
Wow this resource is awesome. I don't really write games per se, but I enjoy writing interactive visuals - and this will definitely help me get to the next level. Thanks!
[+] randac|12 years ago|reply
I was thinking the same... I was about to browse through some of the demo code, but the links are broken..
[+] Cederfjard|12 years ago|reply
Besides this, are there any other resources you would recommend for getting into writing visuals?
[+] gcb0|12 years ago|reply
This is only useful if you're writing your own 3d engine. For 2d and for using existing engines just go read about polar coordinates and get really good at trigonometry in general, both not much represented on this ... probably a requirement new reading any of those anyway.
[+] mrcactu5|12 years ago|reply
I really wish they'd use PDF instead of powerpoint.

It's really surprising there's this much math in videogame programming.

There is all kinds of awesome geometry algorithms out there but I didn't know if they were used in the real-world. http://www.cs.jhu.edu/~misha/Fall09/

My background is in math without too much knowledge about specific video games but I really love shapes. I wonder if I could fit in there.

[+] nudetayne|12 years ago|reply
The universe is governed by math. There's a surprising amount of math in everything.
[+] cwarrior|12 years ago|reply
As a starting web programmer who has to create a lot of css/javascript animations, this is amazing.
[+] jheriko|12 years ago|reply
i'm always wary of this kind of stuff. learning things upfront - not just for games, but in general for programming - is often a fantastic waste of time. the greatest skill to learn imo is how to research a problem effectively when you hit it and how to (re)invent wheels when you need to... also, my experience is that things learned this way stick better and are understood more thoroughly.