Sign in to follow this  
Nanook

math

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 this post


Link to post
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 this post


Link to post
Share on other sites
Just algebra to start with. Manipulating formulas does take some time.
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this