Search Unity

[Solved] What math should I learn in spare time?

Discussion in 'General Discussion' started by GTHell, Aug 8, 2016.

  1. GTHell

    GTHell

    Joined:
    Jan 5, 2016
    Posts:
    256
    I have a lot free time after school about 2-3 hour per day and have no access to computer at school. I want to learn math that also benefit to game development. I know vector and matrix is important and is there anything else beside the two?

    Please don't tell me to learn more English in my spare time :)

    EDIT: Thank for the help everyone!
     
    Last edited: Aug 10, 2016
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    Quaternions.

    In general, if you have solid understanding of school level vector algebra, geometry and trigonometry, it'll help you a great deal.

    Also, you'll learn a lot of english from reading technical documentations.
     
  3. landon912

    landon912

    Joined:
    Nov 8, 2011
    Posts:
    1,579
    Some good old Calculus never hurts.

    Try to do some of the old AP Calculus BC tests. If you can do those, you're off to a decent start and keep moving up.
     
  4. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Depends how much math you want to use in a game. You don't REALLY have to learn quaternions whatsoever to make a good game. Mostly you will be doing simple arithmetic, 'formulas', maybe some trigonometry, dealing with regular angles and such, pythagoras, ... you likely aren't going to do a whole lot with vectors and matrixes unless you want to do more advanced stuff. Unity does a lot of this for you. I think your time might be better spent learning to program better and to problem solve and do useful calculations with code in real projects.
     
    GarBenjamin, RavenOfCode and Ryiah like this.
  5. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    613
    Knowing Calculus always helps (with life and numbers) :D

    If you want interesting math related topics to read about in your free time that doesn't require a computer, Game Theory might interest you. Also you might be interested in Statistics, Economics, etc.

    There's a lot to read about that's related to math, it doesn't have to be limited to traditional stuff like geometry, calculus, trigonometry, etc.

    What are you studying in school? I come from a finance + computer science background so topics such as financial mathematical modeling and artificial intelligence really interest me.
     
  6. Mwsc

    Mwsc

    Joined:
    Aug 26, 2012
    Posts:
    189
    The kind of math that comes in graphics physics and games is awfully applied.

    I suggest learning how to use the math, when it is given in an API.
    It is less important to know the proofs and all the algorithms.
    Knowing how to use the tools is hard enough without also knowing how to build them.

    For example, you will want to know how a system of equations can be written and solved as a matrix.
    You will want to know what an eigenvector means, and how to use them, if you were given a function to compute them for you. Similarly with the singular value decomposition. Know what it means to take a partial derivative to calculate curvature of a mesh.

    The best way to learn this stuff is with matlab or scipy, as you can just type commands, the math gets done, and you can use the results to do something fun. If you aren't at a computer, you could read the parts of the books that explain the concepts, but skip the proofs and algorithms. Also skip to the excersizes at the end of the chapter that show you the story problems and so on where it gets applied.
     
  7. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Skip the proofs? But those are often the most fun! And understanding the proofs does give you a much deeper appreciation for the concepts you are dealing with.

    As to the OP, start off with the fundamentals. Algebra and calculus should be second nature to you. Once you have those down well, start exploring. Linear algebra and geometry are useful for game graphics. Differential calculus and mathematical modelling are useful for building complex game logic. Number theory is useful for encryption. Statistics and modelling are useful for data analysis.

    The list goes on. While some math is more useful then others, very little math is ever wasted.
     
    Last edited: Aug 9, 2016
    landon912 likes this.
  8. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    Dot product and cross product like the back of your hand. All sorts of vector manipulation. I think vectors and matrices are a large enough topic to spend your time on to get to mastery. Matrix rotation can keep you up for weeks. What about matrix to quaternion conversion? and to/from Axis-angle? Also, I'd say basic Newtonian physics, to better understand time steps, etc.

    As @imaginaryhuman pointed out though, this stuff isn't absolutely necessary, but having a grasp of it will help a lot.

    Oh, I also agree that learning software architecture principles at this point is more worth your time, especially if you're using something like Unity to do a lot of the nitty gritty math for you.
     
    RavenOfCode and Kiwasi like this.
  9. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    What's your current ability in maths? No point asking you to learn partial derivatives if you've never seen calculus before
     
    Kiwasi likes this.
  10. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    ...this thread is everything that is cancer about the Unity forums.

    Q: "What math do I need to make games?"
    A: "Calculus."

    P.S. "OP... do you even know what partial derivatives are?"

    Person asks question. Person gets useless, wrong answer(s). Then hey, let's switch topics to the OP and his current skill level in maths. Maybe there's something there to troll.

    Yeah, no. Pretty clear why there are fewer and fewer people around each day.
     
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
  12. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Either you interpreted my comment wrong or I worded it badly. Not gonna bother arguing which because there's no point in that. I'll try to clear up the misunderstanding instead. What I was trying to say is that if we don't know his current ability it's harder to make sensible suggestions, like my comment/joke, there wouldn't be any point in recommending partial derivatives if he hasn't done calculus

    Again I think we have a misunderstanding here. I don't care about some random person on the Internets math ability so I can laugh at it, I have better things to do. But like a lot of subjects the things you can learn in maths are dependent on what you already know. Example someone suggested eigenvectors but that would be a bit silly if the person in question doesn't know vectors

    What I was aiming to do was get info that would allow better catered advice; obviously you and potentially others didn't see it that way. Apologies to OP if he received it in the same manner
     
    angrypenguin and aer0ace like this.
  13. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    My point is it's totally off base. All you need is to understand functions, order of operations, fractions to decimal conversion (i.e. division) and vector math. It helps to understand trigonometry a little bit. Geometry should be well understood.

    But that's it. It's not rocket science. People who barely make games blow this stuff so out of proportion that I wonder if people reading this just go... aw man, calculus? Crap. I'll never get this.

    Okay. So to make a game you literally need to be fergie crossed with einstein, mixed with jesus. That's how hard it is.

    Just get on with it. Quit lying to people. Anyone can make a game, just depends on what game for the person's skill level.

    I don't know why..but when I saw "calculus" I just wanted to vomit blood from my eyeballs. Is that what it took to use rigidbodies to make a floating water effect? Calculus?

    I just can't even right now.
     
  14. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Of course you don't need any of this if you're using an engine like Unity, but the OP has said he want's to learn more maths that also benefits game development. Not just maths for the sake of programming, at least the way he worded it

    I definitely see your point Master Frog that this stuff is pretty overkill but if the OP want to learn more maths then why not?

    p.s I have used linear lines of regression before for GUI stuff. Not saying its the right way, or that you need it, but having the tools at your disposal doesnt hurt, and sometimes you do use the most unexpected things
     
    landon912 likes this.
  15. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,025
    I don't advocate learning random theoretical math unless you enjoy it on its own. Much better to design an interesting project that goes along the lines of something you want to do in future, that happens to involve math.

    If you like physics, why don't you make a simple flight simulator with aerodynamics? Make some procedural mesh generators that create geometric shapes? Make your own pathfinding project with A* algorithm? etc.

    For your own sake, don't go and get some random book and start studying theoretical examples. It's a horrible way to learn anything to do with game development. Reference material is just that.
     
  16. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    I have seen one thing consistently in my life, and it is this: to the man with a hammer, every problem looks like a nail.

    Yeah, you can use a trigonmetrical quantum physiological reverse sine wave dark matter equation to figure out the distance between your character and the goal. Or, you can just... you know... use subtraction.

    As a person who is interested primarily in games and making them I can tell you that simpler solutions work better, faster and more consistently and are more easily re-purposed to other bits in your code that need something similar but slightly different. Once you get over yourself and the notion that you need to "prove" how smart you are by using complicated solutions, and just realize that understanding how to do something for yourself that millions of other people have already understood is NOTHING. It is less than nothing. It doesn't prove anything. And, in fact, those same people have went ahead and thrown into a library for you (just cause they're cool folks) because, admittedly, the "Richard Gubb reverse sine wave equation of dark matter in ecocentricity to the power of 9" method of figuring out "x given y" is kind of trifley and annoying and really doesn't give you any benefit for memorizing it.

    Since you are all my competition, potentially, I shouldn't even be telling you this. But oh well.
     
    Last edited: Aug 9, 2016
    DanRamnauth likes this.
  17. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Well each to their own. Some people like to learn for the sake of learning, or enjoy maths for what it is. Some people like to apply things and use them in real world scenarios

    If the OP only wants a bigger maths toolset for game dev then i agree that all these suggestions are pointless. If he enjoys learning maths then they aren't pointless. You can't really blame anyone with the lack of that info
     
  18. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    It's a bit hard to tell at times what he's actually asking because the OP's grasp of English isn't the greatest. He may have worded things in a way that implies more than intended.

    It wouldn't hurt. :p
     
    QFSW likes this.
  19. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Yeah I feel the same way which is hard to know exactly what he wants. Masterfrog may be right, he may not
     
  20. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    My interpretation of the OP was also "I want to learn more math, what should I learn?"

    It's true that virtually no math is required to make a game with unity. If you understand basic addition, subtraction, multiplication you'll do fine. Maybe throw in some basic vector math if you want to work in 3D.

    On the other hand, a strong math background does open a world of possibilities. Actually understanding the math behind physics or collision detection or transformation matrices can be useful.
     
    landon912, Ryiah and QFSW like this.
  21. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    Mine was that he wanted to learn more math but it had to be useful for game development. Normally this will be geometry and trigonometry but like you suggested it can be more complex math depending on the game you're developing.
     
  22. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,025
    Also, if you're going to do game dev as a career, you're going to specialise, and that might involve getting into some hardcore math that you normally wouldn't encounter as a jack of all trades. It all depends on what you're aiming for.

    But if you don't know what you're going to aim for just yet, the worst thing is to start working out of a textbook - complete game-related projects for your resume would be a much better investment of time.
     
    Ryiah likes this.
  23. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I'm not entirely convinced. If you want to be a generalist developer, then yes, just pick up maths as you need it. But if you want to specialise in something like physics, you'll want to get the math early. As a general rule it makes sense to keep your math a year or two ahead of what you actually need. Learning math and how to do the job at the same time can be overwhelming.

    Edit: As a disclaimer I come from a very math heavy industry. This highly colours my approach to game dev, and to maths in general.
     
  24. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,025
    Well I think what's more overwhelming is looking at a heavy-duty maths textbook and wondering what to study.

    Taking into account @GTHell's recent posts, for someone trying to begin a career in game dev I think it's more important to show all-round skill - and there's no better way to do it than to have a portfolio of complete mini-projects that show off everything from programming ability to engine experience to maths ability.

    Especially for self-study, practicing heavy theoretical material - unless you really enjoy it and you're doing it purely for that reason - is the surest way to destroy motivation, self-discipline and momentum in my experience. When you don't have all the fanfare of getting your work marked, getting encouragement and feedback from peers and professors, you absolutely need some way to reference your progress in practical terms. The best way to do it is to have it actually function as part of a game prototype.
     
    QFSW, Ryiah and Kiwasi like this.
  25. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    Looks like it's time to create a thread on how to read and respond to threads. We're at that point.

    Look, I know it will never be as fun as bitching endlessly about the forum change... but could people maybe, I don't know, try? Just a little bit?
     
  26. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
     
  27. GTHell

    GTHell

    Joined:
    Jan 5, 2016
    Posts:
    256
    The math that I know and good at is Vector, Number theory, Matrices and Logic. I've learn all the advanced math because since last year me and my friend hire a private teacher to teach Math, Biology, Physics & Chemistry (All advanced topic because I'm Asian) but the interesting part is it's been a year after I graduate and I can't recall or remember anything at all. I just want to graduate so I only try hard for that time and never review those lesson again.

    Thing I've learned and forgot almost everything: trigonometry, polynomial interpolation, calculus,advanced geometry....etc

    I just want to study them again because I have background but I'm not going to study them all just the one that benefit to real world and game development. It's hard.

    Here's a book I'm interested in. Take a look at the content and review:
    3D math primer for graphics and game development
     
    angrypenguin likes this.
  28. landon912

    landon912

    Joined:
    Nov 8, 2011
    Posts:
    1,579
    I don't quite understand why you're exploding. @GTHell asked for math that helps with general game development.

    Sure, in Unity almost all of the math is abstracted away from the end user. But he didn't ask: What math is needed to make a (simple) game in Unity.

    I suggested the broad topic of Calculus(among others) because it's quite useful to be able to mathematically understand motion and change in game development.

    You are probably correct in the lines of being able to google your way through having to actually understand or write the math yourself. But, actually understanding the logic behind it will open many more avenues.
     
    Last edited: Aug 10, 2016
    angrypenguin likes this.
  29. GTHell

    GTHell

    Joined:
    Jan 5, 2016
    Posts:
    256
    He probably didn't know that Matrices is important if you try to make something without visual. Nested loops is also a concept of Matrices(i,j) and i use it a lot to find diagonal and it work best in 2d game and especially card game and any board game that require Row and Column.
     
  30. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    That's actually the things you want to know.
    Trigonometry, calculus and advanced geometry.

    A simple example: can you write Ray-vs-Sphere intersection test from scratch? How about OrientedBox-vs-OrientedBox test? How about without looking the theory up online?

    This kind of thing.
     
    aer0ace likes this.
  31. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    Open up a random Siggraph paper, and if it looks like nothing but Greek (granted it probably is), then keep trying to learn more.
     
    landon912, Ryiah and Mwsc like this.
  32. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    Honestly it'd probably be much more efficient for you to simply start making a game. When you run into problems... if you find you do not know enough math to create a solution... then you will know what you need to learn.

    Many people here obviously love math so they find value in learning as much math as you can. But that is a completely separate endeavor that you can take up as a hobby if you like. It is not a requirement for game dev.

    I've been on a refreshing journey lately to simplify everything and even in my 3D projects have no need for anything more than the most basic of math. I'm talking about addition, subtraction, multiplication and division. These are the core for everything. Sure you may find use for some things such as sqrt, sin and cos and those are readily available. However, all of these things can be created by you. At their core all are simple addition, subtraction, multiplication, division. Sometimes if conditions and even loops.

    So... ultimately what math do you need to know? + - * /
     
    Last edited: Aug 9, 2016
  33. GTHell

    GTHell

    Joined:
    Jan 5, 2016
    Posts:
    256
    I'm doing this as a hobby. I read book, do research and learn thing that is interesting and feed my knowledge. I'm doing game development in Unity just to express idea and the thing that doesn't exist in current games gen.
    This make me question myself.

    What if you don't know much about trigonometry and it isn't a topic that is easy to understand?
     
  34. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    Then don't use it. Change the problem. Use + - * / maybe % if and for.

    Simplify everything. Complex math generally is tied to solving a complex problem (some people use such things to solve simple problems). Break problem down into multiple simpler problems. Now solvable with simple math.
     
  35. dogzerx2

    dogzerx2

    Joined:
    Dec 27, 2009
    Posts:
    3,971
    Trigonometry, trajectories, physics, geometry in space.
     
  36. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    narm.jpg
     
  37. Mwsc

    Mwsc

    Joined:
    Aug 26, 2012
    Posts:
    189
    I agree with the subjects you suggest studying, but don't the undergraduate courses that teach those materials usually focus on concepts and problem solving, rather than proofs?

    If you want to stay at a level below calculus, then all you need is 8th grade algebra.
    Of course you can write lots of games without doing any substantial math.
    But this thread is about what to study, for someone with lots of free time, but an interest in math, which implies stacks of advanced textbooks.
     
  38. Mwsc

    Mwsc

    Joined:
    Aug 26, 2012
    Posts:
    189
    Calculus is required material for freshman in every math, science, and engineering discipline.
    It would be rather odd to consider yourself a game developer and not even know what it means when we say "antialiasing means taking the integral across a pixel area".
     
    landon912 likes this.
  39. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    Honestly. I don't care. And here's why. I don't feel the need to prove that I am smarter than other people. Because I am not insecure and I don't need to participate in condescending, elitist circle-jerks.

    Honestly... this thread has demonstrated what this forum has become. An elitest, critical, unhelpful, condescending a-hole central of the game development universe.

    Who really cares any more. Just keep talking to hear the sound of your own voice in an echo chamber. There are tons of other communities out there where the regulars are game developers, not chemical engineers or artists or writers or whatever the hell's sitting around preaching from atop their soap boxes.

    Cool. You like education. Now show us your game. I won't hold my breath.
     
  40. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,162
    Why don't you just leave? All you ever do is complain about the forums.
     
    landon912 and McMayhem like this.
  41. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    If complaining about the forums is a reason for someone to leave the forums, then by definition, shouldn't everyone have to leave? For F***'s sake. Did you guys somehow forget the fit you collectively threw when they switched to lithium?

    You're probably right, though. I should gtfo like everyone else. I guess I'm just stubborn and tend to hold onto things long after it's pointless.
     
  42. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    Uh oh, looks like master-frog is going to implode? Everything OK buddy or are you having another one of those weeks?
     
  43. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    I have been meaning to ask.

    What do you even do? I see one little WIP but the last post was... like 6 years ago?
     
  44. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    Sent you a PM.
     
  45. Master-Frog

    Master-Frog

    Joined:
    Jun 22, 2015
    Posts:
    2,302
    What has happened to this forum, I don't even know.
     
  46. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Back to the OP's question
    If you don't have a solid grasp of trig thats probably a lot more useful to learn than calculus for now
     
    Ryiah and Kiwasi like this.
  47. Buhlaine

    Buhlaine

    Community Manager

    Joined:
    Feb 5, 2016
    Posts:
    348
    Please keep the discussion on topic and keep the Developer Network Rules in mind. We don't want hostile environments on the forum, and I don't want to see the thread derailing any further.
     
  48. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    Basically, you should be able to solve things like "ray-sphere" query (given a ray and a sphere, find whether they overlap or not, and where they overlap) either via algebraic approach (solve as system of equations), or via geometric approach (knowing nature of both objects, determine situation when they overlap).

    If you do that for major primitive pairs (Primitive is - ray, sphere, axis-aligned cube, oriented cube, triangle, cylinder) - just sit down and find a way to do it on paper, I'd say you're good to go.

    Most of the gamedev math will be vector math/algebra, however, if you decide to go deeper, and say, attempt to write physics engine, you'll need need heavier weaponry.

    Most of the time, you'll get by just fine with vector algebra, though. Many complex problems can be reduced to vector algebra solution (which may not be very efficient), as long as you can use them intuitevly and has decent grasp of geometry.

    Even this knowledge isn't technically required to make games, but it'll definitely help.
     
    landon912, Ryiah, QFSW and 2 others like this.
  49. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,025
    @GTHell you know what's the only skill really worth teaching yourself at this point? The ability to learn something new, and apply it to a game development situation, as fast as possible. It's a waste of time trying to give yourself some sort of learning programme that will give you all the knowledge you'll ever need.

    You know why you didn't remember what you learned last year? Because you never applied it to anything - like most high school/university students you were 'just trying to pass'. That's what it seems like you want to do all over again. Ditch that mentality immediately and become someone who is able to react properly to a new problem they stumble across.

    So again, make a game to solve a problem. Your problem is collision physics? Make a game/mini-project that involves complex collision physics. Your problem is geometry? Make a game/mini-project that involves a lot of geometry calculations - how would you calculate the lead for a moving target for example? This will make you remember it because it is practically useful to you, now and in the future. You will have a bunch of functioning reference material for your own games as well as being able to show them off to your employers.

    Stop trying to plan for futures that you don't even know anything about - give yourself a concrete goal that involves making something work in Unity, and just go ahead and get it done.
     
    aer0ace, Ryiah, QFSW and 1 other person like this.
  50. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    Logic design which is pretty much the same thing as discreet mathematics and include set theory.