views:

190

answers:

9

I'm not new to programming, but I am new to game programming. It was always my dream to create games, and since I'm 21 today, I think better start now than later.

In the past I had no problems with math, but I did have the constant feeling that I could solve the problems but not understand what was happening.

"Why am I doing this and what exactly does it solve?"

Where would I start if I want to start learning math for game programming?

Edit: Some people are asking me to say which kind of math I'm looking for, but truth be told I don't even know that. I'm a complete math newbie. I did a calculus class in Uni but like I said I just solved them but didn't really know why or how.

+10  A: 

Linear algebra and trigonometry are probably the most important in graphics programming. This would include things like matrices/vectors, dot product and quaternions. In the area of physics this would be mechanics and light, which use trig. Other than that, libraries exist to handle most advanced mathematical problems.

Some Guy
Here are some good books that I or people I know have found useful: Real-Time Rendering, 3D Math Primer for Graphics and Game Development, and Mathematics for 3D Game Programming and Computer Graphics. You can find most of them on amazon.
BigSandwich
+1  A: 

If you have time to read, I recommend the the open-source physics and math textbooks light and matter. Linear algebra would be important, too – I enjoyed Strangs textbook, Linear Algebra. Both these resources have no specific game-oriented focus, though.

The MYYN
+2  A: 

Don't forget if you have specific Maths questions to head over to http://math.stackexchange.com!

If you find you need a particular item, such as Linear Algebra, Google "Open courseware" + "Subject". You'll find MIT in the States are great for this - they publish quite a lot of their course. For example: http://ocw.mit.edu/courses/#mathematics.

Ninefingers
A: 

I think the answer most people gave ie "What kind of math?" is most relevant.

Ars digita had a series of lectures on Discrete math: http://aduni.org/courses/discrete/

Or maybe you are looking for physics, not math for game, if so there was a book published a while ago called something like "Physics for Game Programmers". Google it. It maybe out of print but you can still find it at a library.

or are you just talkingg about 3d geometry for graphics, in which case you probably don't want to lear math at all. Just DirectX and OpenGL ( and mainly OpenGL ).

HandyGandy
+1  A: 

GameDev.net is a good resource, they have a math and physics forum and are obviously focused on game development.

http://www.gamedev.net/community/forums/forum.asp?forum_id=20

Michael
A: 

The best way to figure out what you need to know is to try doing what you want to do and see what it requires.

If you can do calculus to any degree then it will help. Another answer mentioned linear algebra and trigonometry which are useful daily. There's no way to say what you need to know though without knowing what you need to accomplish, so just start programming and figure out what you need! If you need help on something specific shoot a question to http://gamedev.stackexchange.com/. Indeed, several questions recently required only trigonometry to solve.

dash-tom-bang
+1  A: 

If you would like to teach yourself how to "understand" what to do to solve math problems, try these 2 excellent books, which will require only high-school level of math skills:

http://www.amazon.com/How-Solve-Aspect-Mathematical-Method/dp/4871878309/ref=sr_1_1?ie=UTF8&s=books&qid=1284140178&sr=8-1
http://www.amazon.com/Mathematical-Discovery-Understanding-Learning-Teaching/dp/4871878317/ref=sr_1_6?ie=UTF8&s=books&qid=1284140178&sr=8-6

Victor Sorokin
A: 

Don't buy any books if you can help it. Instead, download books from the net. If you have to buy (some books are worth it), buy second-hand (from abebooks, for example). The textbook industry is a scam.

  • In terms of mathematics, you at least need an understanding of basic geometry and linear algebra.
  • Some understanding of calculus can be very helpful.
  • Some statistics doesn't hurt.
  • The above four subjects are usually taught during one's first year in university (in North America, that is). They are not difficult. A determined person who is not hopeless in mathematics can cover the basics of euclidean geometry, linear algebra, calculus, and statistics over the course of one summer, without undue exertions (2-3 hours per day should do it).
  • Numerical analysis is highly relevant to computing. Studying numerical analysis requires a proficiency in linear algebra.

As you get better in math, you automatically also get better at programming.

Apart from the math, you might want to learn some physics - in particular, basic mechanics.

Good luck and have fun!

JackKane
A: 

The most relevant "advanced" mathematics in game development is matrix and vector manipulations. These are considered a part of linear algebra. Matrices and vectors are the data types used in both 2D and 3D graphics and physics. Matrices generally represent the scale, orientation, and position of an object. Vectors generally represent a point in space or a direction and magnitude in that direction.

A strong familiarity with these concepts and their manipulations as crucial to any field of game development, even if you're not directly interacting with them. If you touch graphics, animation, positional audio, collision detection/reaction, physics, or game objects interacting in any physical manner, then you will use matrices and vectors heavily.

Alas, I find it's difficult to find practical teaching of mathematics in literature. More often that not it's buried under layers of theory. I like being told forth right that a 4 x 4 matrix can store a position vector and three axis vectors that represent an object's position, orientation, and scale.

Sion Sheevok