Skip to main content
GameDev.net gamedev.net
🔒 Locked

Math Requirements

Started by PixelOp Apr 8, 2005 at 3:47 PM 11 replies 2.7k views
Original Post
PixelOp
PixelOp
I always see under the requirements for C++ programmers that you must have a good grounding on math. This poses a problem for me. One of my career goals is to someday become a C++ game programmer (of course learning other languages down the road as well), however, I absolutely hate math. It's just something I don't enjoy at all in any shape or form. My question is do you really need to be a rocket scientist in math to be able to become a successful game programmer? If I had to take a guess, I would assume it's really for anyone looking to code the physics portion of the game, or something similar. I don't see programmers who are working on the HUD or something like that really using a lot of complicated math, other than averaging the scores to display your results or whatever. It’s always been one of the things stopping me from truly learning a programming language like C++. I’ve just never liked math very much. Not primarily because I’m not very good at it (hint hint), but because it’s just something that’s really not in my nature. Thanks in advance!
-PixelOp
Inmate2993
Inmate2993
Not to discourage you, but a strong mathematic understanding is almost crucial to any non-superficial programming. The reason being is that all of computing is related to serious number crunching. Take for example a Pong physics engine, you would need to keep track of the Direction and Magnitude of the Ball, and be able to mathematically calculate the angle it hits the Walls and the Paddles. With that collision, you then have to calculate a new direction and magnitude for the Ball to travel at. Without any knowledge of math, this very basic example would totally escape you.
william bubel
hplus0603
hplus0603
Math is very similar to the core of programming: follow rules to generate results. The main challenge is in defining what results you want, and selecting the right rules to folow among the many possible.

You need math if you want to do character behavior, physics, AI, graphics, tools, or databases. Maybe there's some area of games that's not one of those that you could fit in, but I wouldn't hold my breath.

If you enjoy programming, I'm surprised that you wouldn't enjoy math. Perhaps you've only ever had poor teachers?
enum Bool { True, False, FileNotFound };
PixelOp
PixelOp
Quote:

But: I suggest that you just start a simple hobby project and learn to program. Once you run into a problem that can be best solved with a mathematical trick the "boring math"-stuff suddenly becomes interesting, and learning it will not be painfull anymore.


That's exactly what I was thinking of doing.

Thing is, obviously engines are only going to get more and more sophisticated, requiring more mathematical intellect. I just don’t know, saying that I actually land a job in game programming, that I will be happy dealing with math problems everyday for a living.

I guess we’ll see where things take me. :)
Thanks for the reply guys.

P.S
No hard feelings Inmate2993
-PixelOp
matches81
matches81
As Nils (anonymous Poster) wrote before:
As soon as you need some assumingly boring math to implement some cool stuff, it´s suddenly not that boring anymore... I study computer science at university here in Germany and my study consists of lots of math, which is, I have to admit, mostly boring in theory. But as soon you have to use math to solve a problem you encounter when programming a game, you´ll most certainly find it shockingly less boring ;)
So I´d say: Don´t get too frightened because you actually might run into some math during coding. Just start a small project and see for yourself if you like it or not... I guess there´s nothing to lose after all.
WithoutRemorse
WithoutRemorse
Quote:
Original post by matches81
As Nils (anonymous Poster) wrote before:
As soon as you need some assumingly boring math to implement some cool stuff, it´s suddenly not that boring anymore... I study computer science at university here in Germany and my study consists of lots of math, which is, I have to admit, mostly boring in theory. But as soon you have to use math to solve a problem you encounter when programming a game, you´ll most certainly find it shockingly less boring ;)


My God in heaven, you've just described me!

Yes, math does become much more interesting when you use it on a regular basis in programming. It grows on you that way, sort of like a conneseur's tastes in wine, for example. Now I've suddenly developed an understanding of vectors, normals, cross products, etc.

It's also very important for other things. For example, if you want to save a screenshot to a jpeg or other format, you'll want to know how much space to allocate to memory to do it.
me22
me22
Programming really does help make math fun.

I was one of the few who really enjoyed my linear algebra class, because I knew that all the matricies and vectors were exactly what I used to make my little pool game. IT's a great thing to start out with, since it's so immediate. Want to light your triangles? You'll need a cross product. Want to test if you can see something? You'll need a dot product.

And if nothing else, math gives you more options in your programming. Ever written a loop like this?:
for ( int i = 1; i < N; ++i )    total += i;

Some simple series math lets you replace it with:
total = ( N ) * ( N + 1 ) / 2;

Even things like calculus can be useful, if less so. The best post about that I saw on these forums basically said, "I've only really needed calculus once in 5 years programming. But that one time, I had an elegant 5-line solution that otherwise would have needed a few hundred lines of ugly hacks."
MaulingMonkey
MaulingMonkey
I've found a lot of math classes boring.

But I remember looking up in a dictionary about cosine and sine, so I could use them to make things move in 2d given a facing.

Seeing as how young I was, it was years before I was taught about cosine and sine in a math class. And then it was fairly boring, because I allready understood about it :P.
Wavarian
Wavarian
A defeatest attitude towards mathematics is going to get you nowhere. You only need to tell yourself that you hate it so much, and that you can't do it before your mind starts to believe it.

Feel out the challenge - and rise to meet it.

Everyone who has replied here have offered valuable advice - if you can find or visualize a real-life problem that can be solved using math, you are that much closer to understanding its purpose.
subflood
subflood
Ahh, this is a great time to quote Feynman

"Physics is to math what sex is to masturbation."

leiavoia
leiavoia
I agree with everyone about it not being interesting until you need it. I did not get into programming until i was out of school, but i DID save all my highschool math notes (for whatever weird reason). It wasn't until i started programming collision detection and response code that i had any use for vectors and some non-trivial geometry. Then i dug out my notes and found it all very interesting because it suddenly had a use, in a video game no less!
PixelOp
PixelOp
Very good points guys. I really appreciate all the feedback and advice!

You're all totally right. I'll keep pursuing my goal and when i run into a difficult problem, I’ll follow your suggestions. :)

Thanks guys.
-PixelOp

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.