# What math subjects are involved in game programming?

This topic is 1335 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm preparing to make a video course about maths. Not all mathematics in general but the specific concepts needed to program games. I want to help people get into programming and/or gamedev without the fear of maths. I'll try to do my best to explain things in a clear manner, show visual examples as much as i can etc.

The format of this course is my voice and the screencast of what I draw with my tablet. I may mix it with images and some very visualy stimulating math videos I can find (you can help here too).

But I want a solid syllabus that makes the course available to virtually all levels and doesn't leave any game or programming related math concept out.

This is what I have thought:

1. I will first teach "pre-algebra" concepts:
1. a relaxed overview of number theory (integers, floats..)
2. then order of operations
3. variables
4. equations and inequations
5. factors and prime numbers
6. fractions
7. percents
8. functions and graphs overview.
2. Then more algebra itself:
1. some equation solving
2. more complex function concepts (domain and range
3. graphs 2 sort of (linear functions, finding slope etc)
4. overview of system of equations and how to solve them
5. matrices
6. Not sure if talking about series (arithmetic, geometric..) or logarithms...
7. Introduction to function of circles and ellypses
3. Pre-calc:
1. more equations and graphs
2. more logarithms? (like their properties and such)
3. more functions (composition etc)
4. very basic geometry (radiant vs degrees etc) and Pitagoras
5. trigonometry

Each of those concepts will be a video-class of about 5-15minutes.

And I'm kind of stuck. Did I put too much in? Where should I introduce vectors? What else is needed for programming in general or gamedev in particular?

All ideas and suggestions are welcome

Thanks!

BTW: This will be a free course, doing it for the fun and to give back.

Edited by Neithan

##### Share on other sites
It is possible to make games without advanced mathematics.

But it is very difficult to make advanced games without advanced mathematics.

3D mathematics is linear algebra. If you don't have linear algebra you are going to have a nasty time doing much in a 3D world.

Then you can have more complex simulations. If your game physics is simple Newtonian math and you don't do anything fancy in response to collisions you can get away with a combination of trig and linear algebra. But anything more complex and you will want significantly more math, depending on the actions. Fluid simulations generally need math for fluid dynamics. Modern graphics require significant mathematics, be prepared to implement masters-level and PhD-level research papers; you don't necessarily need to understand the math to blindly implement the algorithms, but it absolutely helps.

Over the years I have heard many people say variations on, "I wish I had more math skills". I have only once heard someone complain about knowing too much mathematics, and that was because he was tired of people bothering him trying to have him break down the math into simpler tasks that others could understand.

##### Share on other sites

Random thoughts:

I would definitely include logarithms, if only to grant more understanding to algorithms with O(log n) and O(n log n) complexity, since those are an incredibly important part of programming theory.

Variables is always a crazy concept when trying to teach algebra within the context of programming.  That was a huge breakthrough moment for me when i realized that "x = 5" is radically different for algebra than it is for programming.  Equations in algebra versus conditionals in programming can be a similar source of confusion.

For fractions and percents, delving into the subject of rounding methods can be important for programmers, whereas rounding tends to be treated as an advanced tangential subject within math.  Mostly because standard mathematical techniques tend to have difficulties dealing with rounding, whereas within a programming context, rounding is no big deal.

I consider mathematical functions to be most relevant to programming when thinking about how to map some combination of input values to an output value, and achieve a certain type of behavior.  This shows up a lot in game mechanics where miscellaneous game variables influence the value of another game variable, and also in animation, where time and certain attributes of an animation affect the visible properties of the animation.

Not sure about factors and prime numbers.  I guess they're relevant for cryptography, but that's not really a big deal for most game programmers.  Maybe in terms of writing quick 'n' dirty hash functions and pseudo random number generators, though.

For trigonometry, it's good that you cover it after linear algebra.  It would probably be useful to make sure you emphasize that most of the time, if a game programmer is using trigonometry directly in code, there's a very good chance they'd be better off using linear algebra; they just gotta think about the problem from a different angle.  (Heh, a pun.)