Where to learn 2D Math for game dev

Started by
11 comments, last by Serapth 7 years, 12 months ago

I think the guys above already listed most of what you want, so I could just add that you can also find a lot of good material at stackoverflow just by googling for specific topics (example: c++ angle between two vectors, etc...)

I would like to make a comment on the games you listed though, as I think you should rearrenge them a bit with concern to the math required. I assume you didn't really set any specific order to them when you wrote it down but I would consider something like this

- Mario (simple physics, not to much shannanigans, mostly algebra and some trig)

- Zelda 2D RPG (a bit more physics involved which means you need dive a bit deeper into that field)

- Terraria (Here you also start going into the procedual generation which is really a area of its own, more statistics than algebra/physics)
- Diablo 1 and 2 Isometric (Procedual generation as well as more advanced physics to have all interaction with skills/effects creatures etc as well as more math to generate the visual effects)

- Plant vs Zombie Well, I haven't played it, dont know how to rank it ^_^

So, for the games listed In my mind there are actually three (or four) seperate fields linear algebra/trig., statistics for procedual generation as well as physics (mainly mechanical, forces, impluses etc). So I would highly reccomend you start with the case with the simplest physics etc to just get used to the math tools you require, as soon as you start feeling a bit more confident try adding a bit more physics effects etc and start moving on from there

Ah, and don't be discuraged if a simple thing such as getting two blocks to collide, bounce or even rotate after the collision gives you a really hard time, some seemingly simple things can have some tricky physics (for a beginner) but it's all part of learning ^_^


Currently making BorderStrain, 2D Sandbox ARPG www.BorderStrain.com

Advertisement

I would modify the list of games yet again to incorporate this list of games from this article. I think the list will help slowly build on skills and math to make each new game a little easier to make.

  • Pong = Simple: input, physics, collision detection, sound; scoring
  • Worm = Placement of random powerups, handling of screen boundaries, worm data structure
  • Breakout = Lessons of pong, powerups, maps (brick arrangements)
  • Missile Command = targeting; simple enemy ai, movement, and sound
  • Space Invaders = simple movement for player and enemy, very similar to breakout with the exception that the enemy constantly moves downward, simple sound
  • Asteroids = asteroids (enemies) and player can move in all directions, asteroids appear and move randomly, simple sound
  • Tetris = block design, clearing the lines, scoring, simple animation
  • Pac Man = simple animation, input, collision detection, maps (level design), ai
  • Ikari Warriors = top down view, enemy ai, powerups, scoring, collision detection, maps (level design), input, sound, boss ai
  • Super Mario Bros = lessons of Ikari Warriors (except with side-view instead of top-down view), acceleration, jumping, platforms
  • Legend of Zelda
  • Terraria
  • Diablo 1 & 2
  • Plant vs Zombie

I think that will cover the major concepts and also build skills while you are at it.

I did a collection of common 2D gamedev math recipes, covering the basics like moving in a given direction, orbiting an object, rotating to face an object, collision boxes and circles. Basically 99% of the math you need to make a basic 2D game.

If you run into trouble and need to move beyond the basics, Khan academy is a very good source. For me, my ancient OAC calculus textbook has been invaluable believe it or not. Granted, there is no such thing as OAC anymore, so that's not a lot of help.... these days it would be about the same as a 101 level course I believe.

This topic is closed to new replies.

Advertisement