Search Unity

Do Creating Games Requires Math And Physics?

Discussion in 'Getting Started' started by badassgamer, Dec 12, 2015.

  1. badassgamer

    badassgamer

    Joined:
    Apr 26, 2015
    Posts:
    140
    I was surprised when i saw a course content that taught in univerisity about gamedev , it says that it teaches discrete math, linear algebra , probability,physics, general programing and object oriented programing and even computer graphics .... Lol but i have learning games and even i created some basic things in it but never did any math algebra physics or any of these thing above and even i just learned simple scripting in just one language and while in scripting it requires just basic math like adding values for creating health bar but never did advanced math like algebra ... so i want to know if there is any math and physics in unity3d other than basic adding dividing values . and if not why they teaching these things when developing games does not requires it ? because i want to make sure if we are learning game dev properly because we do not any of these things like algebra or physics
     
  2. FyreDogStudios

    FyreDogStudios

    Joined:
    Aug 23, 2015
    Posts:
    97
    yes. not all of it is really hard maths or physics, it's knowing when to use what. There are things like vector maths that you will need to understand too
     
  3. JasonBricco

    JasonBricco

    Joined:
    Jul 15, 2013
    Posts:
    956
    In Unity it really depends more on what you're actually making. Generally speaking, the answer is yes. But Unity does a lot of that math for you so that you don't have to worry about it. But even within Unity there are games you can make that will require a lot of math. It mostly depends on whether you want to use what Unity already provides or make custom implementations, and if your game is inherently math heavy (example: making a voxel engine in Unity).

    I'll add that linear algebra will be used a lot regardless for any advanced enough project. You work with vectors constantly. But if you make really simple games that are on a Flappy Bird level, you likely won't require much math.
     
  4. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    We did a group assignment a few weeks back (first year students) & our programmer had to use some pretty complex maths to get the aiming, movement & camera to work properly as the standard stuff didn't do what we wanted. He also customised a lot of the physics. This all involved advanced maths & physics understanding by him. This was for a simple 4 person (one PC) shooter.

    As @JasonBricco said, it really depends on the complexity of what you are making. I use mainly standard unity functions to prototype to help pitch game mechanics to the team but then a lot of it is then customised for gameplay reasons.
     
  5. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    601
    Knowing a bit about vectors is good but I wouldn't go as far as taking a course for it. I know I didn't need it to make my game.
     
  6. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,422
    BUT, knowing a lot about vector math may not be required, it certainly make things a LOT easier and gives you more ways to solve the same problems.

    I'd suggest taking a linear algebra course if you're serious about it. This is great, you can sit through the video lectures online for free :) : http://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/
     
    JasonBricco and tedthebug like this.
  7. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    This pretty much has been stated by all the great people above, but to reiterate:
    • Most games don't use complex math, just logic
    Having an understanding of certain math concepts (even if you're not good at calculating them) can help. Quaternions are 4th dimensional representations of a rotation. The dot product of two vectors can help you when trying to check if an object is in front or behind you. I get thru 95%+ of my games without any maths what-so-ever. But - every once in a while I'm glad my wife has two degrees in mathematics.

    For an example of when you'd need to know some complex maths, run the "Tanks!" project in the Learn section, and watch closely when doing the camera section. This could probably be done using "brute force" trial and error, but knowing the maths makes this quick.
     
  8. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Its all dependent on what you are building. Basic vector manipulation is pretty much a must for all games within Unity. Basic trigonometry is a must as well.

    More advanced stuff is needed for any sort of custom physics. And by custom I mean anything not included in the engine by default. Shaders can get math heavy too.

    And of course if you want to build an engine outside of Unity then its heavy maths all the way down.

    Having a solid mathematics foundation is a good idea. Heck, I've even heard designers pulling out spreadsheets to do maths calculations to figure out balance.
     
  9. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    I've definitely heard this. If you're playing almost any game that has any sort of progression, it's recommended that you break it down. How much damage per second can the player put out, modify that by hit rate to get a real number. How much damage does the player take on average, how long can they survive? Use this to tweak values - not endless brute force play-testing. How much experience does it take to level up, how much experience can the player get per minute, how many experience giving opportunities are in a given area of the map, how does this fit against the items that are craftable at that level, etc. This should all be worked out on paper, not by guess work.