The most important thing with any of these is to be familiar enough with the concepts such that if you encounter a problem that the particular type of math will solve, you will know where to turn for help. Most of the critical information will be contained within the first few chapters of a book on the subject, the first month or so of lecture in the area, etc. But above all, don't be discouraged if you don't understand everything there is to know about the subject!
Next, where do you go to learn such topics? The internet is full of excellent resources to learning the topics. I usually use Wikipedia when I need to look up one of these formulas. This works well if you already understand the basics of the subject, but not quite as well if you are new to the subject completely. For such cases, I recommend Khan Academy, a non-profit group that teaches pretty much all there is to learn about Mathematics and related subjects, and is ever expanding into new fields. I will link to the key sections of Khan Academy for learning each of the items I include below.
Okay, so what are the basic forms of Math that every game programmer needs to know?]
- Arithmetic- Multiplication, Division, Addition, Subtraction, Exponents, and Order of operations are essential. Knowing basic fractions can help, but isn't required. Inequalities are also frequently used.
- Algebra- Be comfortable using letters to represent numbers. This is heavily used in programming! A bit of basic algebra sometimes helps as well, but this is less important.
- Trigonometry- Be very familiar with Sin, Cos, and Tan. These crop up in a ton of places!
- Geometry- Rays, lines, angles, and basic shapes are often useful, but not strictly required. The more realistic, and graphically intense, your game is, the more you will need to know this kind of stuff.
- Probability/ Statistics- This helps in a thousand different ways. The key thing is to understand the basics of probability, including discrete (Think a dice) and continuous random variables, uniform and normal distributions, etc. These help when you want to assign a random action, place items randomly, make a random map, etc. Statistics including expected value, mean, and standard deviation are also useful concepts to understand.
So, where does this kind of stuff get used? In my upcoming unnammed game I call Project Ahoy, I use these in a number of ways. They include rotating my ship in the direction of travel, randomly placing the cities and wind directions. I will use more intricate math to set wind patterns in place, right now I just do a random wind direction. Algebra is used in making a formula for movement points. Geometry is used to find the distance to the next square.
Ben Pearson is the author of the Amateur Radio and other technology blog KD7UIY and developer of Games and Apps at Google Play pearsonartphoto, where he plans to publish some of the games created by inspiration of gamedev.tv. He is currently working on a Sea Trading game, which you can subscribe to updates at his Google Group. He has been a programmer since a young age, although only recently is learning programming with game engines. He has completed the the Complete Unity Developer Course and the Procedural Generation courses, and is working through the Complete Blender Developer Course and Unity Game Physics courses. He is hoping to soon start Unreal Courses soon. Follow him on Twitter @KD7UIY.