Here comes a harsh fact of life: game programming requires mathematics. One could say that programming IS, in a way, math, but you don’t really need to know math to write the vast majority of programs. Most of the time, you don’t need it to write parsers, to interact with databases, to validate data. Games, however, very often rely on mathematics. If you want objects to move across your world realistically, or if you want to draw things on the screen following certain geometric patterns, or if you want to check for collision between certain shapes, you need math.

But don’t despair! Even though I say “math”, what you ACTUALLY need is geometry. Luckily for us, geometry is probably the easiest part of mathematics! Now, I’m not saying that discrete mathematics, algebra and calculus are useless for writing games (or other sorts of programs), but geometry is the bread and butter of video game programmers.

An interesting thing that I did notice is that, despite my previous assertion, many game programmers do not actually know much geometry! This means that they’ll often do things in extremely laborious, buggy and verbose ways, when it could very easily be done with some basic grasp of geometry. For example, if you want to place several objects along an arc of circle, you COULD do it through trial and error, or place it in an image editing program (like Photoshop) and copying the coordinates, but it will be much easier if you simply use a parametric equation.

So I intend to write a few posts to explain, as clearly as I can, some topics that are important to game programming. These are the topics that I intend to cover:

- Vectors
- Parametric Equations
- Vector bases
- Basic Trigonometry
- Matrices
- Complex Numbers
- Quaternions

While there are many basic and in-depth tutorials of all of the above topics on the Internet, explanations as to why the matter to game programmers and how to use them seem to be scarce, or left as an exercise to the reader. My goal is to make those topics easy to understand and put into use.

## Kenneth Blok

/ 2012-09-03I bought “Mathematics for 3D Programming and computer graphics 3rd Edition by Langyel”, which I consider an absolute must if you want to understand what you are doing.

It gave me a good base for reading the OpenGL Superbible 5th Edition by Writght, Haemel, Sellers and Lipchak.

## Ajay Parmar

/ 2012-09-03Great!! I am waiting..

## Ben Dover

/ 2012-09-03The best way to learn the topics mentioned here is to attend high school.

## Phil Mc Cafferty

/ 2012-09-03and study french of course, as everyone knows the french are the best mathematicians.

## P. B. Moss

/ 2012-09-03Quite clearly whoever wrote the last two posts certainly attended high school as they still posess the pathetic schoolboy humour. Grow up and get a life!

This could be a very interesting series and I look forward to it.

## Alex

/ 2012-09-03I’m a mathematician and the mentioned topics are a piece of cake for me. Don’t need to waste my time on those. Better learn more programming, that can’t be enough for me since this is not my speciality.

## Alex

/ 2012-09-03And geometry is not the easiest part of math, trust me. While in algebra you can solve problems using more or less defined approaches, solving geometrical problems requires way more imagination and creativity. Nevertheless, I agree that the geometrical facts themselves are easier to understand since they don’t require as many sophisticated formulas as algebra. From this point of view, you are right.

## Mike Hanson

/ 2012-09-03You need a lot more than that. Reflection of objects on shiny surfaces such as mirrors, effects of gravity on objects, perspective in 3D games, develop sound effects to enhance image. These are just a few things to consider. I did get my start with geometry writing 2D games.

## FAbio

/ 2012-09-03As an engineer, I caught myself using geometry to solve many problems on development from very simple games, to factory software.

It’s amazing how one problem can become very difficult when you don’t know the math. It’s like riding a mountain bike uphill without realizing it has gears to help you with that.

What I don’t agree with you is that to me geometry is one of the hardest part of mathematics, it requires a lot of imagining (which I am not good at) so you can apply geometry correctly – should I use sin or cosing? This can entangle the brain sometimes and usually leads to some trial and error in my case.

Now, calculus and statistics to me are much easier, it usually requires just to identify a problem and pick the right equation for the job.

## Brendan

/ 2012-09-04Awesome! You have been bookmarked my friend…

## Anthony

/ 2012-09-04Bookmarked, got a huge interest in math and programming, my degree is math, and application of math concepts in an application always fascinates me

## Anthony

/ 2012-09-04Great, Got a huge interest in math and programming, my degree is math, and application of math concepts in an application is exciting. Any physics write ups coming soon, I hear its important in games prog.?

## Nicholas

/ 2012-09-04Exciting! Looking forward to your posts!

## pakiza

/ 2012-09-05nice , i also love maths and computer programming . it is interesting for me too

## David

/ 2012-09-05Ben –

And the best way for you to learn anything is to pull your head out of your *SS.

Rodrigo –

Looking forward to your posts.

## Edouard

/ 2013-01-17Thanks for the article !

I can’t wait to read the one about the matrices.

## hiceka

/ 2013-02-17great article!!

i’m korean programmer , i read your article to translate korean language

thx

## frase de mensagem para celular

/ 2013-12-22Great information. Lucky me I found your blog by accident (stumbleupon).

I’ve saved as a favorite for later!

## Homepage: http://futurebaldnesscures.com/the-best-way-on-how-to-achieve-healthy-hair/185/

/ 2014-02-02Hello, i think that i saw you visited my website thus i came to “return the favor”.I am attempting to find things to enhance my website!I suppose its

ok to use some of your ideas!!

## Indian Government Jobs

/ 2014-07-02Get new program dates in addition to notices published in a variety of local in addition to national newspapers for private and public sector work opportunities straight. The notification could be available in a downloadable in addition to printable file format as Pdf apply for the information.

## big duck long island

/ 2015-10-24Usually they are referring to wwhat is commonly called buddy sex

or sport sex. if I wish tto own, or even more so, enjoy using a

sex toy or sex aid. Three ‘master-slave’ sex cult members were

found guiilty today of killing a young woman who was the

wife of a deployed Marine from Cammp Pendleton, California.

Parents need to accept responsibility forr the safety of their children by being

vigilant andd aware that every social situation has

the potential to harm a child, including a hapopy marriage.

Article Source: you would like tto hhave us at your upcoming event

or wedding, please checkout our website at or request further information and we can check our availability aand put together a formal

quote for you.

## Joellen

/ 2016-04-28I also subscribe to many everyday e-mails which update us together with the best income, deals or additional freebies for your morning.

## FeelSocial review

/ 2017-03-09I was suggested this web site through my cousin. I’m no longer positive whether or not this publish is written via him aas nobody else reallize such designated about my trouble. You are incredible! Thank you!

## Instamate 2.0

/ 2017-03-10I was suggested this web site through my cousin. I’m no longer positive whether or not this publish is written via him aas nobody else reallize such designated about my trouble. You are incredible! Thank you!

## viddyoze

/ 2017-03-25Very s?on this w?b site will be famous among all blogging users, due to it’? fa?tidious articles o? reviews

## List Janitor download

/ 2017-05-26Hi there, for all tie i used too check weblog posts here in the early hours in the daylight, because i love to gain knowledge of more and more.

## جزر المالديف اين تقع

/ 2017-08-11The town of El Gouna on the jap shore of Egypt’s Purple Sea Riviera is

definitely a privately owned and operated resort facility.