GameDev Math

Way back in the murky depths of time, this blog contained a few posts regarding math that game developers might find handy. To be sure these posts were largely the only content on the actual blog itself, which made them easy to find for anyone that cared to look.

As a part of Devember 2015 the blog picked up a lot of pace (maybe; I’m writing this prior to actually commencing) and so the game developer math pages got lost (doubtful) and I thought it would be a good idea to move them to a more “static” position for easier perusal (this at least is true).

The full disclaimer here is that although I am technically a “game developer” in that I have written software which was ultimately a game, it was never in a capacity that anyone outside of my own social circles ever saw. Also there is a gap of at least 10 years where, of all of the software I wrote, none of it was a game. So, is this information actually useful? Beats me.

  1. The Pythagorean Theorem
    • The magic of triangles and the length of their sides, this is also important because it allows you to calculate the distance between two things. In a game, this might be interesting for any number of reasons.
  2. Manhattan Distance – an alternative distance formula
    • In grid or tile based games, in which all movent happens only horizontally and vertically, this alternative distance formula may be more interesting. It may also be useful in other situations as well.
  3. Basic Trigonometry
    • When angles are involved, trigonometry is what you need. This is all about figuring out the angle between two things or determining what position a point will be at when you rotate it.
  4. The Law of Cosines
    • Related to the Pythagorean Theorem AND Basic Trigonometry, the Law of Cosines is something that generalizes Pythagoras to any triangle (not just a right triangle) while simultaneously being both important to know exists for a better understanding of other topics and possibly not being terribly interesting in a game development context at all.
  5. Vectors: Definition
    • Vectors point the way (bad joke!) towards a lot of solutions to problems in game development, but they’re a topic of great magnitude (I can’t stop myself). This first page shows the very basics of vector math by describing what a vector actually is.
  6. Vectors: Basic Math
    • Expanding on vectors (now that we know what they are), some simple math you can do with a a vector, such as adding and subtracting them from each other as well as scaling. This lays the ground work for things to come.
  7. Vectors: The Dot Product
    • Expanding on vectors even more, this article covers the Dot Product, which tells you the angle that separates two vectors. This also includes some juicy nuggets of where the idea for the dot product comes from, to justify that time I added the page on the Law of Cosines despite it’s otherwise dubious value.