GKANG 165 Report post Posted September 21, 2012 (edited) So here I am, starting to make games in 2D to learn the ropes. However, I feel like I'm kind of stuck because whenever I buy a book / try to learn something like OpenGL I'm always greeted with a lovely equation that is completely alien to me. Now I know that math is pretty much essential to program in 3D and even 2D, but like, HOW essential? Would you guys recommend that I just go head on into math at the same time as programming? I mean, I'm at basic algebra level right now and it aint cutting it. Thoughts? Edited September 21, 2012 by GKANG 0 Share this post Link to post Share on other sites
Cornstalks 7030 Report post Posted September 21, 2012 Calculus is useful, but not used (in my experience) nearly as much as linear algebra. It's ok to be lost in the math if you're just starting out. It comes with time, and with taking relevant math classes. How much you need math depends on what you're programming. 5 Share this post Link to post Share on other sites
ISDCaptain01 1496 Report post Posted September 21, 2012 khanacademy.org. You get all the math you will ever need without spending a penny on classes. 6 Share this post Link to post Share on other sites
boogyman19946 1487 Report post Posted September 21, 2012 From my experience, a thorough understanding of Calculus goes a long way to simplify most other subjects, especially physics. It's probably easier to work with than Algebra. -1 Share this post Link to post Share on other sites
kd7tck 735 Report post Posted September 21, 2012 [quote name='boogyman19946' timestamp='1348262655' post='4982511'] From my experience, a thorough understanding of Calculus goes a long way to simplify most other subjects, especially physics. It's probably easier to work with than Algebra. [/quote] Calculus uses algebra, so how can it be easier. I would recomend a discrete aproach to physics and drawing calculations. Since most online math tutorials are all geard toward the continuous aspect, you may have a very hard time bridging these two worlds. What you need to do is spend 2 years mastering the clasical continuous approach to calculus, then branch over into discrete math and start translating what you had learned into the way computers process data. The way you solve an integration problem is not how a computer will do it, keep that in mind. -1 Share this post Link to post Share on other sites
boogyman19946 1487 Report post Posted September 22, 2012 [quote name='kd7tck' timestamp='1348269394' post='4982531'] [quote name='boogyman19946' timestamp='1348262655' post='4982511'] From my experience, a thorough understanding of Calculus goes a long way to simplify most other subjects, especially physics. It's probably easier to work with than Algebra. [/quote] Calculus uses algebra, so how can it be easier. [/quote] It somehow escaped my mind that some problems need algebraic manipulation to actually be solvable. After a while of working with it, you start to forget it was once hard. 0 Share this post Link to post Share on other sites
Bacterius 13165 Report post Posted September 22, 2012 [quote name='Cornstalks' timestamp='1348261761' post='4982505'] Calculus is useful, but not used (in my experience) nearly as much as linear algebra. It's ok to be lost in the math if you're just starting out. It comes with time, and with taking relevant math classes. How much you need math depends on what you're programming. [/quote] +1 I agree completely, when I first saw the rendering equation I was like "what the hell is this?", but then eventually I found helpful papers and blog posts, and now it makes complete sense. Hang in there, video game math is pretty intuitive once you get the hang of it. If possible, do maths at the same time, it will help you fathom the equations you see. Do not limit yourself to books if at all possible, there's a lot of good stuff on the net, in particular people who once were in the same situation as you, and wrote blog posts specifically designed to be accessible to newcomers. 0 Share this post Link to post Share on other sites
GKANG 165 Report post Posted September 22, 2012 My main problem is that I'm not sure specifically what I should be learning. I don't want to spend months wasting my time learning "useless math" that I won't really need specifically when programming. I'll definitely check out that link that came early on in this thread though, sounds good. 0 Share this post Link to post Share on other sites
Postie 1559 Report post Posted September 22, 2012 Part of knowing what an equation means is recognising the notation and knowing what each of the symbols stands for. You don't necessarily have to be a calculus wizard to read and then implement an equation. The part where it gets difficult (and requires formal maths knowledge) is proper understanding of the equation and then taking that knowledge and extending it or adapting it for another purpose. Also, I'm surprised no one has mentioned trigonometry. Even in 2D its used an awful lot. 1 Share this post Link to post Share on other sites
DevLiquidKnight 834 Report post Posted September 22, 2012 Take a course on linear algebra, should be almost all you need for game development. 0 Share this post Link to post Share on other sites
Bregma 9199 Report post Posted September 22, 2012 All programming is math. You can write some software without knowing the math, just as you can work as a cashier in McDonald's without understanding accounting. Most web devs seem to get by OK </cheapshot>. If you want to get past the polyester uniform and smile stage, you're going to need to understand what you're doing, not just rotely regurgitate some steps. First and foremost you need algebra. Most basic programming is actually just applied algebraic field theory (sets, operators, intervals). 3D graphics requires the understanding of linear algebra (vectors, matrices). 2D graphics almost always need trig. Audio is sometimes off in Fourier land (real-valued nonlinear functions and polynomial manipulation). Calculus is not necessary for most programming but learning it provides you with useful analytic skills that you can apply elsewhere. Or, be happy in a job with a free virtual sandwich with every shift. 2 Share this post Link to post Share on other sites
Liuqahs15 819 Report post Posted September 22, 2012 (edited) Basic Algebra is not a good place to be, even with 2D game programming. Imagine a game like asteroids, where the ship rotates and shoots on an angle. The only information you have to calculate how to shoot the bullet is the number of pixels it moves across the screen per frame when the angle is 0, 90, 180 or 270 (facing straight up, down, left or right), and (most likely) the actual angle at which the ship is turned. If you have no idea how to solve this problem, you need to really put in the time to learn it. That's not calculus, though. That's Trigonometry/Geometry. Maybe you could somehow solve the problem without ever needing to know what sin, cos and tan exist for, but you could also just learn them and move on. I will say, though, as someone who was completely awful at Math before he started programming, once I had real applications of Math, not only did it become easy, it became [i]incredibly fun[/i]. You should just go find a website/old textbook in your room somewhere, and jump in. Edited September 22, 2012 by Shaquil 2 Share this post Link to post Share on other sites
Kaptein 2224 Report post Posted September 22, 2012 once your normalize your first vector, and all your problems with finding certain info, e.g. what is the angle between the two? what is the distance? how can i make sprite A approach sprite B?.. and so on, just magically goes away in one fell swoop! ill just say this though, this is from my own experience! i had NO idea what i was doing, but i learned over time to use basic trigonometry.. once i learned vectors, many door opened at the same time, so you REALLY need to look into this, because it REALLY pays off especially if you are working with games, which are graphical.. vectors make things so much easier anyways, i don't personally know "lots of math", either. but just knowing what the basics really are and learning that is a huge improvement i wish someone slapped my wrist many years ago and pointed to the nearest vector tutorial site 0 Share this post Link to post Share on other sites
GKANG 165 Report post Posted September 22, 2012 Guys you're all being super helpful. Thanks for the wealth of advice, I've got a much clearer idea of where I'm headed now. 0 Share this post Link to post Share on other sites
viper110110 1114 Report post Posted September 23, 2012 Trig is important. Know the pythagorean theorum. Linear algebra is important. I think a large difference between programming and "mathing" is that when you are programming you have to understand how it works at a higher level. You can know exactly how to calculate a dot product, but if you don't know what the result is and how to use it, you won't be able to program using it. Additionally, you can upgrade from McDonalds to A&W if you know what a dot product is used for but not how to calculate it. 0 Share this post Link to post Share on other sites
Liuqahs15 819 Report post Posted September 23, 2012 [quote name='GKANG' timestamp='1348356275' post='4982763'] Guys you're all being super helpful. Thanks for the wealth of advice, I've got a much clearer idea of where I'm headed now. [/quote] Good luck. I think you'll find that math can sometimes be just as exciting as programming 0 Share this post Link to post Share on other sites