Advertisement

Mathematics?

Started by December 28, 2014 02:23 AM
9 comments, last by stupid_programmer 10 years, 1 month ago

Hello world,

Does anyone have advice on mathematics? I pretty much flunked it in school, and now I need it. Where do I start? what branches of mathematics do I need for 2D and 3D? I've picked up a few books today on algebra, calculus, and trigonometry. I'm guessing I'll need some geometry too but I don't have any books on that yet.

If any kind folk have good recommendations on learning resources free/paid, I would be very grateful.

Cheers,

Cree

Linear algebra tends to come in handy with both 2D and 3D games, as does trigonometry and geometry (and honestly, some basic physics stuff really helps as well). Though, your needs will really vary wildly from game to game spanning lots of math and physics disciplines. Depending on how poor your knowledge of mathematics really is, it may not be necessary to actually start from scratch and relearn everything (though that certainly never hurts, and I'm not saying you shouldn't do it). You could always simply brush up on whatever specifics you need to solve a certain problem. For most basic game-math needs, you're typically not the first person to have to solve it, and there are multiple online resources that can help you through them.

I find the "Math for Game Developers" youtube channel incredibly handy for some of the little problems. It's geared toward game related problems, however, you may find yourself a bit lost occasionally, and those math books you have will come in handy to fill some of the gaps. So, i guess I'm kind of recommending something along these lines (as an alternative to relearning everything) tackling your math problems one at a time, as you come across them.

I only recommend this sort of route because starting at the beginning and learning algebra, linear algebra, trigonometry and geometry can be a rather huge undertaking, and one you may lose momentum on long before you've learned everything you'd need. So, if you have a basic understanding, and are just really weak at it or have forgotten most of it (easy to do if you're not using it on a regular basis), simply brushing up on the specific solutions to certain problems can be a, if not good substitute, at least a much less time consuming one. There tends to be a handful of mechanisms that you'll use over and over with games. I'm personally rather weak with math as well, so have kind of just taken this latter strategy. Whlie it would be great to have a vast knowledge of mathematics, I honestly don't see myself simply reading math books for months on end without getting burned out on it.

Beginner here <- please take any opinions with grain of salt

Advertisement

Thanks for the advice Misantes!

When I was in school, all we needed to do was smile to be sent out of the class. No happy children allowed! So I hated it. I passed the standard grades with top marks in computing and music, but flunked everything else. I then went on to tour the world in a punk rock band! ha... true story. Now I'm settling down and trying to pick up games development from where I left off. The programming is coming back fairly quickly, but I keep getting stumped at mathematics problems, and like you said, so far I've just relearned certain things to overcome the problems. Ideally though, I'd like to just relearn everything I was taught in school. But I totally agree with you, a book full of equations is really unappealing....

Math is always good to learn. Speaking as someone bad at math, I occasionally bump into situations where better understanding of math would be helpful. However, it's usually linear algebra related.

Unless you're implementing physics libraries (instead of using an existing one), you probably don't need much more than Linear Algebra.

Have you tried KhanAcademy? It slowly progresses you through the different math subjects, but only after rapidly progressing you up to the subjects you don't already know. It's free, and the guy who started it is really good at math, and (even rarer), good at explaining it.

Thanks for the advice Misantes!

When I was in school, all we needed to do was smile to be sent out of the class. No happy children allowed! So I hated it. I passed the standard grades with top marks in computing and music, but flunked everything else. I then went on to tour the world in a punk rock band! ha... true story. Now I'm settling down and trying to pick up games development from where I left off. The programming is coming back fairly quickly, but I keep getting stumped at mathematics problems, and like you said, so far I've just relearned certain things to overcome the problems. Ideally though, I'd like to just relearn everything I was taught in school. But I totally agree with you, a book full of equations is really unappealing....

If you have the stamina for it, then digging in and just learning it is probably a good route then (one I should probably take, but really don't want to :P). Like servant mentioned, linear algebra is a large portion of it. for 2D games, I've also come across a need for trigonometry (which I'm terrible at), rather often. Depending on how you go about designing your games, angles can come into play quite a bit. It's pretty dependent on whether you're using physics libraries, engines, etc. For say 3D, I think you're less likely to need trigonometry (but then need to learn the joys of quaternions and probably lean more heavily upon matrix-based maths), for various reasons, than when designing 2D games, though that's just been my experience. The type of math you'll need can really depend on so many things (and often there are multiple mathematical ways to tackle a lot of the problems).

The plus side, at least with relatively simple games, is that a good portion of the math needed is often pretty basic stuff (pre-secondary education for the most part), and not terribly hard to learn. There are exceptions of course.

But, I'm pretty much in your boat, for the first time in my life I've not been able to get away with avoiding math, and it's been a little painful.

Beginner here <- please take any opinions with grain of salt

Thanks for the advice guys. I'm lucky in that my day job I have lots of free time and I can read in between customers. I was originally planning on taking my laptop to work to continue studying C++, but that is actually fairly difficult to do. So what I'm planning on doing is working on my mathematics while I'm at work, and working on C++ when I get home. I work 4 days a week, and I do 16 hour shifts... So I should be able to get up to speed on mathematics fairly quickly! :D I hope!

Advertisement

Analytical geometry should prove by far the most useful to do basic things.


I passed the standard grades with top marks in computing and music

Ironically, those are two subjects that are intensely based on mathematics. Programming, music, and physics are all just different (or not so different) aspects of applied mathematics.

Stephen M. Webb
Professional Free Software Developer


I passed the standard grades with top marks in computing and music

Ironically, those are two subjects that are intensely based on mathematics. Programming, music, and physics are all just different (or not so different) aspects of applied mathematics.

I don't want to argue, but you don't really need any math for most of the fields in music. To perform music on an instrument - you do not need mathematics, to conduct - you do not need mathematics, to compose - you still do not need mathematics, maybe the closest thing where you need to "think mathematically" is harmony - but still you don't need to know math to harmonize a melody - you just need to know a set of rules an be creative sometimes. In music you need fine hearing, creativity, and musical intuition. Music is art, mathematics is science. So there's nothing ironic, really.

There is math underlying music, but only in the same sense that there is math underlying grammar (or perhaps a bit more, if you want to understand things like the harmonic structure of sound or if you want to really understand temperament). One can do perfectly well as a musician without knowing any math.

In programming, however, I would argue that knowing some math can help, and knowing how to think mathematically can help enormously.

I happen to be writing an endgame-database generator for Spanish checkers at this time, and I have been using combinatorics pretty heavily the last couple of days. I am sure people can give you examples where linear algebra, calculus, differential equations, probability and statistics all have been useful to their game programming.

This topic is closed to new replies.

Advertisement