Public Group

# math

This topic is 4415 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

What math knowledge should I know befor I start with 2d game programming? Its been some years since I've been to school so I dont remember mutch.. would be good if you got some good book sugestions.. just for the math I need with 2d programming, gona start on a computer science in march 2007 so I'll learn the rest there I guess.. :)

##### Share on other sites
Hmm, I know you only want to do 2D (which is a good idea when starting), but I'm guessing it would be good to get up to scratch on 3D graphics math -- because many people do 2D using a 3D API (OpenGL etc), so while you get to avoid a dimension theoretically, practically you still have to think about it.

That said -- things I thought were useful to learn are: Cartesian co-ordinate spaces, Linear Algebra, Vectors + Matrices, Quaternions (not as important to start with as others, but for later maybe) -- that said though, you say you are starting in Computer Science in 2007? Well, I do computer science and we had to learn math -- so it is possible you will learn these things anyway? Don't count on it though -- get yourself a good book :)

My recommendation: 3D Math Primer for Graphics and Game Development -- by Fletcher Dunn & Ian Parberry. Easy to understand explanations -- some examples in C++ code and obviously -- a focus on the math game programmers may use often. It can be an expensive book new -- but I think Amazon usually has used copies for cheapish.

Goodluck!

~Shiny.

##### Share on other sites
Also have graph paper in which you can plot your logic. A lot of good thinking is done away from the keyboard.
It's important to recognize repeating patterns.
Remember the math in compoting styarts at Zero
array[0] is the 1st element.

##### Share on other sites
You might also want to learn Trig.

theTroll

##### Share on other sites
I'm in the middle of getting my Masters in CS and I *never* had the math. My previous area of study was Music Education (we only had to count to 4, everything else was a subdivision :) ). In the process of doing your coursework you will definitely have to come up to speed with the math required to do 2D graphics. The good news is, while you are learning, you will find yourself saying "cool, I can apply this to <whatever>" so it makes it less 'painfull'. I say painfull because I just finshed an algorithms class.

##### Share on other sites
The mathematics of algorithms is useful to know for all programming endeavors. As for 2D graphics in particular:

1) All the material taught in a high school Algebra II course.

2) Trigonometry. It helps to be familiar with all the identities, but IMHO you must know at least the six basic trig functions, how to interpret them in equations, and how to use them yourself.

3) Linear algebra. You should be very familiar with at least the "physical" vectors, how to manipulate them algebraically, and how to interpret equations involving them. It wouldn't hurt to familiarize yourself with matrices.

4) Although this is not necessary at all for the majority of 2D games, it is my humble opinion that the stronger your background in calculus and differential equations, the better. I can think of countless situations where I've wished I knew more calculus so I could get some sticky places unstuck. Besides, basic calculus is a prerequisite for any kind of decent physics simulation, be it 2D or 3D.

My book recommendation is 3D Math Primer for Graphics and Game Development. It assumes items (1) and (2) in the above list, and focuses almost entirely on item (3), which is IMHO the most important.

I should note that this book focuses on 3D graphics. This shouldn't be a problem, though, because the mathematics presented can be readily translate into its 2D counterpart.

##### Share on other sites
Thanks alot for great response, helped alot.. sorry for the late respone.. to mutch happening atm..

##### Share on other sites
If your going to get a degree in computer science, I would recommend minoring in math if possible. That's what I plan on doing, so not only can I learn the math needed for game programming, but I can keep my brain in shape (mathematics wise) for learning new things.

• 10
• 9
• 48
• 12
• 10
• ### Forum Statistics

• Total Topics
631383
• Total Posts
2999690
×