Highest level of math needed for 2D game development?

Started by
17 comments, last by alvaro 10 years, 7 months ago


I consider a solid understanding of discrete math to be a necessary skill for any type of programming.

plus one that!

apparently, the vast majority of CS / math stuff is discrete mathematics. I was quite surprised when i took the class. i'd already gotten to diff eq's in regular engineering math, but discrete was something "a little different" - quite enlightening.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

Advertisement

Trigonometry at the least. Linear algebra if you like your life made easier.

In practice, my math is horrible, and in regular usage of C++ and making 2D games, I don't encounter a need for anything more than addition/subtraction, multiplication/division, occasional powers, and a few other things. I especially find multiplications of decimal numbers useful (0.1 * 0.5 = 0.05), and an rudimentary understanding of cartesian coordinates required.

For 2D rotations, you'll have to learn sine, cosine, and tangent, unless your API of choice already handles that for you.

Everyone saying that you need to know alot of math are talking about ideally. The more math you know, the better. Learning math actually stretches your mind and literally increases your intelligence. Knowing more math makes solving problems easier.

For 3D programming, more math is needed. For 3D physics, even more math is needed.

Seriously, my math level is about 6th grade or less - about halfway through Algebra 1. On a regular basis, I don't find myself encountering any problems I can't solve, except for tiny problems maybe once every four months or so that I have to stop and think through and then research online how to solve those kinds of problems. Maybe once a year or so I encounter a large problem that I have to figure out.

99% of my challenges are programming challenges, not math-specific challenges. Just jump in and see what you can accomplish, and in the areas you find your knowledge of math falling short, then make a note to improve in that area. When you encounter a challenge, learn how to solve it. After encountering and relearning that challenge two or three times, you'll remember it in the future.

It is very important to know math - but don't let a lack of it scare you away from learning programming. You're asking a forum of math fanatics how much math you need to know. That's like asking a car salesman how expensive a car you need to buy (Salesman *rubbing hands together*: "How large of a loan can you get?"). You don't want a junker that gives you problems and constantly needs repair work, but you don't need a mercedes either.

Now that I think about it, there is one problem that keeps coming up in these forums which does require knowing linear algebra and solving a quadratic equation: Aiming at a moving target with a constant-speed projectile. (Sample thread here)

But really, that's the only example I can think of, and there's a good chance you'll never even encounter it.

Addition, subtraction, multiplication, division at a minimum. You'll probably find yourself at a point where you'll need to understand the distance equation (square roots), and some basic trig: sine, cosine, and maybe even arc tangent. You'll be using them more as tools that, while you don't understand how they work, you know how to use them to get done what you need.

I was working on a 2D mobile game where you had to throw an object at a certain rotation depending on the touch input and it would bounce on the walls depending on the angle it collided. I recall having to do a revision on my trigonometry.

Now that I think about it, there is one problem that keeps coming up in these forums which does require knowing linear algebra and solving a quadratic equation: Aiming at a moving target with a constant-speed projectile. (Sample thread here)

But really, that's the only example I can think of, and there's a good chance you'll never even encounter it.

and if the OP encounters that problem he can just click that link and copy the functions :)

[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

People are throwing around the term "linear algebra" when I think they mean "linear equations" (i.e., first year algebra). They are not the same.

You do not need to know "linear algebra" to program games. "Linear algebra" is extremely abstract.

People are throwing around the term "linear algebra" when I think they mean "linear equations" (i.e., first year algebra). They are not the same.

You do not need to know "linear algebra" to program games. "Linear algebra" is extremely abstract.

When I said "linear algebra" in this thread I meant understanding how the dot product works. I suspect others also meant "linear algebra" when they said "linear algebra", as in using matrices to represent linear and affine transformations, which is actually very useful for game programming.

This topic is closed to new replies.

Advertisement