Jump to content
  • Advertisement
Sign in to follow this  
cppgirl

math in games

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just was reading the thread below and I didn't want to steal a thread so I'm asking this related question in a new thread. Is complex math really necessary to make games? Or just for really complicated 3D games? I have some books that I haven't read yet that mention some stuff about physics and somebody in that other thread said that game physics is all calculus?? I don't know calculus at all. I don't know trigonometry (sp?) at all either. I know basic algebra i guess. And I think I know C++ ok. But If I want to make games like 'columns' would I really need to know calculus? Or is that just for games like some space first person shooter? I don't even know what calculus is really :D But I don't want to have to learn it just to make games. I'm hoping simple games but still fun to play and can look ok with good graphics could maybe be made without complex math? I don't think a game like Final Fantasy would require complex calculus right? I don't plan on ever making 3D complex physics games anyways.

Share this post


Link to post
Share on other sites
Advertisement
Unless you're planning to implement some heavy physics, you shouldn't need calculus. For 3D work, you'll need some trig and you'll need to know how to work with vectors(the mathematical kind) and matrices.

Share this post


Link to post
Share on other sites
With programming, the more mathematics you know, the better. However, you don't need a huge amount of knowledge to be effective.

For simple games, you won't need to know any calculus at all. Trigonometry would be very useful even for 2D game work, but isn't necessary for games like Tetris.

The bare minimum that I think you really should know would be arithmetic, algebra, logic, probability and of course problem solving. In fact, learning how to solve prolbems is the best part of mathematics.

I'd recommend that programmers also learn linear algebra (simultaneous equations, vectors and matrices), trigonometry and geometry, calculus, number theory, and set theory, but you can get to that after you've starting working on some games [smile]. You can never have enough mathematics. If only I could get my head around infinite dimension topology, I just can't understand that stuff!

Share this post


Link to post
Share on other sites
You don't acctualy need to know anything, just have a good physics engine like Newton Game dynamics, And good Graphics API.
You can simply say:
PutBox(x,y,z);
Box->setMass(45); // thats it

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
...and when it doesn't do what you expect, cpprules?

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
...and when it doesn't do what you expect, cpprules?


Then you post a new thread here on gamedev ;)

Share this post


Link to post
Share on other sites
First you should note that there is no simple answer to your question. It all depends on what and how you want to program. If you aim to be a memeber of a professional team of programmers now or later on that do game programming, then that team will probably consist of experts of different areas of programming. But at least one of the memebers will need to be very proficient with math. It is really up to you if you want to be that individual or leave it to someone else.

For example if you wish to deal a lot with data storage, handling, sorting, manipulating and the like, then you would probably be better off with some degree in algorithms and data structures. But if you are into presentation (not just the actual drawing but the auxiliary things like camera movement and animation), hit-detection and other types of real-valued game logic, then math is very useful.

If you are the one person team you need to know a little of everything. Depending on the game you make the required math needed differs and if you wish to avoid it you can do so by choosing projects that don't involve very much math. But mark my words when I say that many things become greatly simplified if you have knowledge in math, and the more math you know the more possibilities and applications you will see.

In short I would say that the applications of math of any degree in game programming are vast and literally exist in every area of the game. The relation between programming knowledge (like algorithms and data) and mathematics to me is analogous with the realtion between a wrench and a screwdriver. You probably could manage without one of them but if you have both there is no limit to whar you could construct/repair.

I guess that it all comes down to the old paradox of mathematic studies: you don't know why you should learn it until you've learned it, and once you've learned it you couldn't for the world imagine how you could live without it before.

Sorry about the long ramble. [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by boontje
Quote:
Original post by Anonymous Poster
...and when it doesn't do what you expect, cpprules?


Then you post a new thread here on gamedev ;)


Thats Right!!!

Share this post


Link to post
Share on other sites
Programming doesn't really require any skill, other than, well, programmnig.
But depending on what you program, a lot of extra skills come in handy. To write a spell checker for a word processor, you better know everything about the language you're checking the spelling of.
To write a database, you'd better know everything there is to know about how to efficiently store, manipulate and access huge amounts of data.
And to make a game, you need... Well, it depends on the game.
You need to be able to describe what happens in the game mathematically.
If you want to make a game like Columns, as you mentioned, you need to be able to keep track of the score, you need to keep track of which blocks are at which x,y positions. (I can't remember the details of the game, so that'll have to do)
Neither requires any advanced math. You basically need to see if square x,y is occupied, what color blocks are in the neighboring squares, and possibly remove the block and add a few points to the score. And you need to be able to compute where the current block is next time you update the screen.

But what if you want to make, say, Half-Life 2?
For the graphics, you need to be able to describe the orientation, size and position of every model in the game. You need to be able to computer the new coordinates if the model turns 10 degrees to the left.
When the player throws an item, you need to calculate its trajectory. And so on and so on.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!