🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Highest level of math in game development

Started by
16 comments, last by mikfig 14 years, 9 months ago
Can anyone tell me what the highest level of math they have ever encountered while developing? For example: would knowledge of differential geometry apply? How often does one use differential equations? etc...etc... Oh, and to be specific, I would mean while developing a game engine. Like math encountered in some new fandangled graphics technique, in the development of that awesome soft body physics engine, etc. Thanks, mikfig
"WARNING: Excessive exposure to politicians and other bureaucrats has been linked to aggressive behavior." - Henk Hopla
Advertisement
The short answer is "keep going". No matter how much mathematical knowledge you have (assuming a highschool or undergraduate math background), there will always be some new-fangled technique that requires some bit of maths you haven't encountered yet.

On a less facetious note, you are unlikely to encounter much beyond analytic geometry when developing an engine. For other topics in game development, I would suggest a background in set theory, probability, and logic (often lumped together as 'discrete maths'), as well as a solid grasp of single-variable calculus (multi-variable never hurt either).

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Ok, would it ever make sense then to get a masters in math?
"WARNING: Excessive exposure to politicians and other bureaucrats has been linked to aggressive behavior." - Henk Hopla
My degree is in computer science and the highest math required is Calculus III. Linear Algebra is also important in game programming. You dont have to be a math genius just become familiar with it. Math just requires practice and the more you practice the easier it becomes.
For most games, including 2D graphics, basic physics, and collision detection, you'll need a very solid grasp of algebra and trigonometry - high-school level should be fine.

For 3D graphics (and some collision detection), you'll need matrix math and a good grasp of vectors (again, solid algebra).

For advanced physics, you might need some calculus and even a bit of differential equations. That's advanced high school or first-year college calculus.

Beyond that, you should be fine.

The only time I've ever needed calculus or advanced college-level math was when writing a game involving a simulation of a black hole and the warping of space-time. That involves extremely complicated partial differential equations - but even then, a good first-year college calculus course was enough (with perhaps a bit of physics math as well).

But that was a special case - I knew I was doing something that uniquely required higher math. You'll know if you're going to do something involving higher math - and unless it's a complicated physics simulation, it probably won't need more than a solid grasp of algebra.

Quote: Original post by mikfig
Ok, would it ever make sense then to get a masters in math?


Not if the purpose is for game development.

Like I said, the absolute maximum you'll need for game development comes from first-year calculus and perhaps a bit of "Math for Physicists." My first "Math for Physicists" class, the one right after calculus (I was a physics major), will take you to the limit as far as what you need to know.

There are reasons to get a masters in math - but not if game development is your aspiration.
I'm not a game developer in my day job (I do Linux development for a large Japanese company).

And I *just* this last couple of weeks had to do proper linear algebra again; Gaussian elimination solving of stuff. And that's the first time since Uni a decade and a half ago.

Now, I don't think of myself as a good mathmoid. By which I tend to mean "I can't really think about group theory in my head". And as a result, I had to go look up solving this stuff on some websites... on the other hand, I at least knew roughly how to do this, roughly what an answer was going to look like and so on.

I think the main thing that maths as part of a compsci education gives you is that you know the methods are available, rather than actually using them all the time.

As swiftcoder says, logic stuff is bread-and-butter computing; I studied digital electronics for a while, and hence I seems to have a better grounding in this than a lot of compscis. Kernaugh maps, de Morgan's laws and so on. In modern games, dynamics is useful; knowing what momentum is, impulse, KE and so on.

If you're worried about not being a great mathematician, I wouldn't overstress about it. Being able to think clearly and reason about things can make up for any lack of that weird innate maths ability that proper mathmoids have.

My husband, for example, started as a mathmoid and graduated compsci. He can do maths in a way that I can't -- he can look at pages of integral stuff and not get scared :-). But actually I end up doing more maths intensive stuff...
Quote: Original post by mikfig
For example: would knowledge of differential geometry apply?


We've had a number of conversations here that have involved differential geometry.

Quote: How often does one use differential equations?


Games are basically idealized physical simulations, and physics is described by differential equations, so I'd say that the answer to this one is, "all the time."
Basic Algebra and Geometry is a must.

Linear Algebra as a whole is very handy for graphics, and physics. Matrix/Vector Algebra in particular is almost essential.

Differential equations and Finite Differences tend to be useful when modeling physics. Example: My little platform game that I have been working on includes friction, air resistance, moving platforms, swimming in water, and conveyor belts.

Numerical Analysis seems to be very useful too, although a lot of the same concepts are inherent in most computer science courses.

Differential Geometry, for the most part isn't used much in games, but is interesting in its own right.

I have also been thinking of getting a Masters in Math. Not really for game programming, but because my Bachelors in Math seems inadequate right now in my job searching, ... and I like research.
The sentence below is true.The sentence above is false.And by the way, this sentence only exists when you are reading it.
The leading engineers at companies like Havok, PhysX or Pixelux have mostly PhDs in either math, physics or engineering. The solvers to simulate e.g. fire, smoke or fluids in current blockbusters like e.g. Star Wars are most often developed at universities (like e.g. Stanford or Berkeley).

Examples:
http://people.cs.ubc.ca/~rbridson/
http://physbam.stanford.edu/~fedkiw/
http://www.cs.berkeley.edu/b-cam/
Differential geometry is useful. Off the top of my head, suppose you're trying to model a camera path where basically you want the camera to be attached to a path that it travels as a function of time. So that it looks smooth, you want the speed of the camera to be constant over the entire curve. This is a problem in differential geometry.

There are ways around it by approximating the curve rather than representing it analytically, but there are times when analytic solutions are both the most accurate and the most efficient -- for example, if memory usage is a big concern.

Curved surfaces are becoming more and more prevalent in graphics programming, especially with the introduction of DirectX 11 and automatic GPU tessellation. So it's not a stretch to imagine that analytic representation of surfaces will start to be more important in the coming years.

This topic is closed to new replies.

Advertisement