VWarrior 127 Report post Posted December 15, 2006 I know that Math should be a strong part of a Game Programmer's skillset, I was wondering exactly what areas of Math are essential? I've studied a lot of Calculus thus far throughout school, some intro Physics (though I plan to go deeper into that area) and i'm planning on studying linear algebra. What else do you guys recommend I should hit? (Differential Equations,etc?) 0 Share this post Link to post Share on other sites
Telastyn 3777 Report post Posted December 15, 2006 Various levels of calculus/diff-eq are probably the only 'essential' uni-level maths (the quotes meaning that you can get by without, but you're going to limit yourself significantly or otherwise have a hard time of it). [!IMO!]Depending on your interests, statistics or a math-heavy economics course might be of great use. (but then again certain psychology/sociology courses might be of better benefit) 0 Share this post Link to post Share on other sites
Jettoz 288 Report post Posted December 15, 2006 I would say you need to have strong math skills in problem solving, algebra, geometry. However some people take this math thing a bit overboard. Not to brag but I had a 96% average in my Math Pure courses however when I program I only use algebra and problem solving nothing too heavy. I think you need good math skills when it comes to physics in games, 3D games.Don't let your lack of math hold you down from being a programmer you can always learn what you had trouble with or missed online. ^_^ Good luck fellow programmer. 0 Share this post Link to post Share on other sites
K_I_L_E_R 142 Report post Posted December 15, 2006 The skills I found necessary to develop games and programming in general:Linear algebra is absolutely essential as it is also used in statistics and calculus.Single variable and multivariate calculus.Elementary level statistics (1 year of statistics at my uni).Statistics will be the most helpful. A good example is planning a table of data and trying to fit that data to some model. 0 Share this post Link to post Share on other sites
kordova 140 Report post Posted December 15, 2006 Quote:Original post by VWarriorI know that Math should be a strong part of a Game Programmer's skillset, I was wondering exactly what areas of Math are essential? I've studied a lot of Calculus thus far throughout school, some intro Physics (though I plan to go deeper into that area) and i'm planning on studying linear algebra. What else do you guys recommend I should hit? (Differential Equations,etc?)What kinds of games do you want to make? What is your intended area of expertise?Quote:Original post by JettozHowever some people take this math thing a bit overboard.Explain, please. 0 Share this post Link to post Share on other sites
VWarrior 127 Report post Posted December 15, 2006 Quote:Original post by kordovaQuote:Original post by VWarriorI know that Math should be a strong part of a Game Programmer's skillset, I was wondering exactly what areas of Math are essential? I've studied a lot of Calculus thus far throughout school, some intro Physics (though I plan to go deeper into that area) and i'm planning on studying linear algebra. What else do you guys recommend I should hit? (Differential Equations,etc?)What kinds of games do you want to make? What is your intended area of expertise?Quote:Original post by JettozHowever some people take this math thing a bit overboard.Explain, please.Well I don't really have any bounds in my head right now in terms of what kinds of games i'd like to make, but as for my intended area of expertise, I'd like to be skilled in Gameplay/User Interface programming. BTW, its nice that you guys mentioned Stats as thats in my planned curriculum. 0 Share this post Link to post Share on other sites
daviangel 604 Report post Posted December 15, 2006 Quote:Original post by K_I_L_E_RThe skills I found necessary to develop games and programming in general:Linear algebra is absolutely essential as it is also used in statistics and calculus.Single variable and multivariate calculus.Elementary level statistics (1 year of statistics at my uni).Statistics will be the most helpful. A good example is planning a table of data and trying to fit that data to some model.Yup I pretty much 2nd everything in your list especially if you are going to work with D3D or Opengl anything 3D really.Linear algebra will probably the most helpful since right away you will have to work with matrices as soon as you do anything 3D.If you are going to use any sort of realistic physics in your game calculus will be necessary to understand the equations you work with.Numerical Analysis would be helpful so you can distinguish between garbage in vs garbage out. 0 Share this post Link to post Share on other sites
pulpfist 528 Report post Posted December 16, 2006 Statistics comes with probability calculations which is very useful for AI among other things.Without beeing a math guru I can easily see how Im gonna use it to make an "intelligent", self learning AI =). Another useful tool when writing AI is fuzzy logic. Something your school probably wont teach you unless it is geared towards game programming or something similar. 0 Share this post Link to post Share on other sites
ToohrVyk 1596 Report post Posted December 16, 2006 Discrete math is a definite requirement for all things in computer science. Advanced logic and some game theory may come in handy as well. That's about all for general computer science, I'd say.In game programming, I'd say basic euclidean geometry and basic linear algebra are a plus, anything past the basic level of competence in these fields is seriously overkill. I mean, "Look at me, I can compute the eigenvalues of a sequilinear form, ZOMG MY GAEMS ARE FNU!"If you want to play with funny mathematics in computer science, check out:Stochastic computations (e.g. Quantitative Finance)Galois connections (e.g. Abstract Interpretation)Temporal logics (e.g. LTL verification)Level-sets (e.g. Image identification)Unusual topologies (e.g. Algorithmic Geometry) 0 Share this post Link to post Share on other sites
3dnewbie 100 Report post Posted December 16, 2006 I agree with the last poster. _Basic_ math knowledge about the topic mentioned by last poster is helpful, _although_ not necessary in my opinion. After all, graphics programming is very visual and if i don't get something, i see it on screen and then know what to fix or alter. I don't need to calculate or do any advanced trigonometry. Ofcourse, once you are are an advanced programmer and you want to pull of cool visual effects, then everything you have learned in physics or math will ofcourse give you a very real edge over those who have not. It could also give you some advantage (trig) to make some faster algorithms for example.Don't forget, most things new programmers learn are tricks from others anyway. Pretty much all things like BSP trees, or graphic tricks they learn from reading articles or other programmers showing them or copying code. I actually think that if you want to show off nice graphic tricks you first implement them (sometimes by accident) and then, once you understand what you have done you can shortcut it into an algorithm by using your math knowledge.But seriously, it also all depends on what you want to do. If you do not want to create a visual spectacle, but just use some basic 3d objects and space, you don't need any math. That goes for any basic game, but also a basic space sim.But that's just my opinion and i'm _not_ an experienced opengl programmer. Although i can say that i'm not an expert in advanced math, i can say that i'm pretty far in creating opengl software that i visualized from the beginning. And this is after 2-3 months or something. 0 Share this post Link to post Share on other sites
Ezbez 1164 Report post Posted December 16, 2006 Seeing as many high schools skimp out on this (I'm in high school, can't say about college), matrices and vectors are incredibly useful. Besides, they aren't that complicated (compared to other maths), so they are well worth the time investment, if you haven't already. 0 Share this post Link to post Share on other sites
serratemplar 1656 Report post Posted December 16, 2006 How about Differential Equations? What is the value of that in comp sci and should aspiring graphics programmers take that? =) 0 Share this post Link to post Share on other sites
ToohrVyk 1596 Report post Posted December 16, 2006 Quote:Original post by serratemplarHow about Differential Equations? What is the value of that in comp sci and should aspiring graphics programmers take that? =)They have their uses in game development. Basic differential equation knowledge can be useful when understanding integrators as part of a physics engine, for example. In general computer science, they also have their uses in computer graphics and geometry (level set representations) and systems modelling (hybrid temporal automata), and some others I might be forgetting. 0 Share this post Link to post Share on other sites
VWarrior 127 Report post Posted December 16, 2006 Quote:Original post by ToohrVykDiscrete math is a definite requirement for all things in computer science. Advanced logic and some game theory may come in handy as well. That's about all for general computer science, I'd say.In game programming, I'd say basic euclidean geometry and basic linear algebra are a plus, anything past the basic level of competence in these fields is seriously overkill. I mean, "Look at me, I can compute the eigenvalues of a sequilinear form, ZOMG MY GAEMS ARE FNU!"If you want to play with funny mathematics in computer science, check out:Stochastic computations (e.g. Quantitative Finance)Galois connections (e.g. Abstract Interpretation)Temporal logics (e.g. LTL verification)Level-sets (e.g. Image identification)Unusual topologies (e.g. Algorithmic Geometry)I have taken some basic Discrete Math and I can definitely see myself applying that in Game Programming, especially when it comes to A.I. 0 Share this post Link to post Share on other sites
smc 292 Report post Posted December 16, 2006 In the future Gometric Algebra may become a common place tool for graphics/physics. A book geard for computer graphics programmers will be published by Elsevier next year 0 Share this post Link to post Share on other sites
nikhilesh 122 Report post Posted December 16, 2006 Good knowledge of trigonometry is helpful for graphically intensive game programming. 0 Share this post Link to post Share on other sites
alway616 122 Report post Posted December 16, 2006 Quote:Original post by EzbezSeeing as many high schools skimp out on this (I'm in high school, can't say about college), matrices and vectors are incredibly useful. Besides, they aren't that complicated (compared to other maths), so they are well worth the time investment, if you haven't already.well said, im in algebra 2 and the total for these two are so far:matrices: 5 class periods (45 min ea with a horrible teacher)vectors: 0then again we live in a tiny Ohio town where the average IQ is about five and a half...lol one day i was programming in C++ on the school comp and the teacher thought i was hacking the school's network :D 0 Share this post Link to post Share on other sites
Fred304 382 Report post Posted December 16, 2006 An essential mathematical skill is to understand how floating point numbers work. Lots of rules that apply to real numbers do not apply to floats, e.g.:(a+b)+c != a+(b+c)a+b-b != a(1/a) * a != 1floats work in powers of two. One implication of this is that the number 0.1 cannot be represented by a floating point number. thus 0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1 != 1.0Avoid floats whenever precise results are necessary.You should learn boolean algebra. I see lots of people writing code such asbool function(int x){ if (x>0) return true; else return false;}instead ofbool function(int x){ return (x>0);}[Edited by - Fred304 on December 17, 2006 4:31:33 AM] 0 Share this post Link to post Share on other sites
VWarrior 127 Report post Posted December 16, 2006 Quote:Original post by Fred304An essential mathematical skill is to understand how floating point numbers work. Lots of rules that apply to real numbers do not apply to floats, e.g.:(a+b)+c != a+(b+c)a+b-b != a(1/a) * a != afloats work in powers of two. One implication of this is that the number 0.1 cannot be represented by a floating point number. thus 0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1 != 1.0Avoid floats whenever precise results are necessary.You should learn boolean algebra. I see lots of people writing code such asbool function(int x){ if (x>0) return true; else return false;}instead ofbool function(int x){ return (x>0);}Ahh yes...something I was guilty of during my early days of learning C++, lol. I don't do that anymore, though. 0 Share this post Link to post Share on other sites
taby 1265 Report post Posted December 17, 2006 Physics, the more the better. 0 Share this post Link to post Share on other sites
ToohrVyk 1596 Report post Posted December 17, 2006 Quote:Original post by Fred304Lots of rules that apply to real numbers do not apply to floatsTrue, and let's not forget the fabuloustic property of some chipsets: float a = GetSomeValue();float b = a;assert (a == b);printf("%s", "Oh, look, a side-effect");assert (a != b);Quote:Avoid floats whenever precise results are necessary.Unless you prove the result precision to be within a tolerance range. 0 Share this post Link to post Share on other sites
Zahlman 1682 Report post Posted December 17, 2006 Quote:Original post by ToohrVykTrue, and let's not forget the fabuloustic property of some chipsets: float a = GetSomeValue();float b = a;assert (a == b);printf("%s", "Oh, look, a side-effect");assert (a != b);?!What happens there, exactly? 0 Share this post Link to post Share on other sites
ToohrVyk 1596 Report post Posted December 17, 2006 Quote:Original post by ZahlmanQuote:Original post by ToohrVykTrue, and let's not forget the fabuloustic property of some chipsets: float a = GetSomeValue();float b = a;assert (a == b);printf("%s", "Oh, look, a side-effect");assert (a != b);?!What happens there, exactly?The printf call flushes one or more registers, thus reducing the precision of either a or b, which makes the condition evaluate to false the second time. Not very robust or reproductible, I agree.A more robust example that I did not remember right away, as presented in the original paper (pages 8-9):do_nothing(double*) { }if (z != 0) { do_nothing(&z); assert (z != 0);}The code forces a flush of z, reducing its precision to 64 bits (from a full 80-bit internal representation) and making the assert fail. 0 Share this post Link to post Share on other sites
serratemplar 1656 Report post Posted December 17, 2006 Here's the most "classical" example of floating point math breaking the rules.10^60 - 10^60 + 1 = 1You agree - I hope =) - and most compilers will agree too, because they'll group the first two together as identical symbols, zero them about due to the subtraction, and give us one. However...10^60 + 1 - 10^60 = 0 according to machine.Because 10^60 + 1 = 10^60 (1 just gets discarded as it's beyond the scope of the float's precision) and 10^60 - 10^60 = 0. To some degree, addition is not associative in floating point math. This isn't consistent though, because if you substitute a number "big enough" for 1, the math will start working as you expect it to.I didn't learn this all in a math course though; I learned it in architecture and assembly class =) 0 Share this post Link to post Share on other sites