Essential math skills for game programmers
Kamal Aittah
23/ 7 / 2021

Essential math skills for game programmers

Hi everyone, this is Karim.

 

We’ve talked about game programming fields in a previous episode. And as we’ve seen, there are many fields of game programming. But there’s one thing that is common between all of those fields and that is mathematics.

Yes, one thing that makes people hesitant to step into Game programming is the math required. But is it really required?

With the new game engines like Unity and Unreal, it became marginally easier to write a game without really knowing a lot of math since these engines are packed with out-of-the-box math libraries that just do the job for you. But no matter how good these math libraries are, you still need to know how to use them.

 

Not to mention that they can only do so much, and if you really want to level up your skill to pursue a career in AAA studios where they push the limits of the industry, you really need to be able to solve complex mathematical problems and execute on the theories that you study.

 

So what kind of basic math do you really need to know as a game developer and how to develop your math skills to rival that of AAA game programmers?

 

  1. Linear Algebra

    Linear algebra is very important, in fact, you have to master it if you really want a career in the game industry as a programmer. It is concerned with object transforms in the game world (Position, Scale, Rotation), it is concerned with aiming and shooting, casting out spells in certain directions with certain angles, and many more. Mastering the basics of Vector math and Quaternions will help you better understand whatever engine you’re working with as well as solving problems like a pro.

  2. Calculus

    Ever said to yourself (Wow, this game has very realistic physics). Well, guess who had to do a lot of calculus?
    Although most major game engines nowadays provide you with POWERFUL physics engines, sometimes you just need to write your own physics-based material and integrate it with the engine. And this happens when you are trying to realize something that isn’t provided by default.

  3. Geometry

    Much like Linear Algebra, Geometry helps you solve problems when dealing with objects behaviors inside the game world. The only difference is that sometimes, solving a problem using Geometry will be more optimized, simpler, and more maintainable in the long run which is why you should master it along with Linear Algebra.

  4. Probability & Statistics

    You will need to be good at these two especially if you are developing a complex AI behavior or in need of solving a balancing issue. For example, Probabilities are used in most MMORPGs to balance map monsters according to a threshold or according to the average player level. This makes the game fresh as it doesn’t feel too easy the stronger you get. Another example will be AI in RTS. If you play RTS games and go against bots, you’ll notice that the difficulty level actually makes a bot either a complete doo-doo or a mega-Chad countering all of your plans and always having an edge over you. This is because statistics are being computed throughout the match where the enemy AI analyzes your state and statistically predicts your next move and counters it.

 

These are the essential math skills that I believe every game programmer should at least know the basics of. Now to level up your math skills is not as simple as just studying more or getting an advanced class. Because math on paper is actually a bit different than math in real life.

Solving a pre-made and tested problem in exams or websites isn’t near solving game development problems that often have more to it than meets the eye. This is why I always advise you to execute what you learn right away.

It doesn’t have to be something fancy, it doesn’t even have to be a full game, not even a mini-game. Just a scene where you get to solve a specific math problem, say for example you want to make the player able to lob the ball. As simple as it might seem, without a proper understanding of Vector math this task becomes ten times harder. So what you do is study vector math and understand its foundations, then make a simple scene where you lob a ball with the press of a button. If you want to get fancy, have the lob change curve according to power. This simple way of immediately executing on what you learn will make you more confident to solve problems that might face you in-game development and before you know it, you’ll be fulfilling the requirements of a AAA studio regarding both math and coding skills.

Hope you learned something new today, and Goodluck in your game development journey.

Need help with game dev?

We are ready to discuss the details of your project. Just shoot us an email