# Math and 2D game development

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

## Recommended Posts

Hello there sorry for the silly question but I prefer some advices than just going ahead. Recently I started learning how to make simple 2D games.
First one I made was tic tac toe and then I started working on pong but its not finished yet. Im pretty much aware that math is quite an important part of video game development and I just want to ask you guys which branches of mathematics are the most vital ones when it comes to 2D game development .. Lets say for example a simple side scrolling game with a very basic physics engine. And what math/physics will it be required in order to . lets say make it smoother and with better physics , sorry again for the lame question it`s just I feel quite confused atm.Really looking forward to your replies !

##### Share on other sites
For 2D geometric computations in general, knowing your complex numbers in and out can be very helpful.

For Physics, you should learn a bit about how to integrate differential equations numerically (Euler method is the most basic way to do it, and verlet integration is also simple are has some neat properties). It is a difficult subject, but you really need to understand very little of it for a 2D side-scrolling game.

##### Share on other sites
Yeah I know that video game development is not easy at all but I have to start from somewhere

##### Share on other sites
If you want physics, at the very least, you'll need multivariable calculus and linear algebra.

##### Share on other sites
The thing is, you don't really need in-depth knowledge of any given field. You end up cherry-picking a few bits here and there. And like alvaro said, you don't necessarily need to understand it all, as long as you can at least get it functional. Additionally, if you start on a game project of any significant length, there will come a time when you no longer deal with the math at all. Once the framework is done, and you are well into the content generation phase, it is entirely possible that you will forget everything you knew about linear algebra and calculus as regards game development, such that when you start writing the next framework you have to learn it all over again. Happens to me all the time.

Also, don't postpone working on anything until after you feel you know all the math you'll need. Getting a project to work offers a fantastic learning experience to help you pick up the knowledge as you go. You'll go into it a math noob and come out... well, maybe still a noob, but at least a noob with a working 2D game framework under his belt and a better grasp on things than before.

##### Share on other sites
can you guys give me a simple example a chunk of code for what complex numbers can be used ?

##### Share on other sites
Lots of trigonometry.

##### Share on other sites
Seriously, guys, the answer to the OP's question is trig. To make a 2d side-scrolling game you need to know at least trigonometry. I know the OP mentioned physics but unless we hear otherwise I think we can assume he means very simple physics i.e. how much calculus do you need to implement the physics in a game like Super Mario Bros. 3?

1. 1
Rutin
33
2. 2
3. 3
4. 4
5. 5

• 13
• 9
• 9
• 9
• 14
• ### Who's Online (See full list)

There are no registered users currently online

×