Math Book For Game Programming

Started by
9 comments, last by Eric Lengyel 7 years, 8 months ago

I am mainly interested in 2D games but possibly also 3D games. What is the recomendation for a subject and title of a very great mathematics book for this purpose?

Along the way I have heard linear algebra might be the way to go.

I am mathematical and have studied algebra, analytic trigonometry,statistics, analytic geometry, calculus one and calculus two. However it's been awhile.

Thank you,

Josheir

Advertisement

I happen to like Mathematics for 3D Game Programming and Computer Graphics myself. Its probably the most approachable book I've come across on the topic, though it doesn't go to the depth that more serious academic texts do, nor does it touch on much 2D at all.

The lack of 2D isn't as bad as it sounds -- much what's called "2D Graphics" in an academic sense is stuff like drawing lines and other do-it-yourself rasterization -- what's left of classical 2D techniques usually has a 3D extension (e.g. transformations), is supplanted by 3D techniques (e.g. painters algorithm vs. depth-buffer), or is basic algebra. For 2D games, rendering happens almost exclusively through 3D APIs today so you're probably better served by understanding the 3D stuff that makes your 2D game go. That's not to say that the classic 2D stuff never comes up -- it sometimes does -- but its not the most practical place to start.

throw table_exception("(? ???)? ? ???");

IMO the best if you want to learn a good foundation is Essential Math by Van Verth, can be found at essentialmath.com. I liked it so much I wrote some slides, maybe you'll find them interesting: http://www.randygaul.net/2014/09/24/mathematics-slides-for-gamedev/

For 2D games you'll just want to know about vectors, matrices, linear and affine transformations. This will get you very far. Then also a decent understanding of the graphics pipeline, as in, getting a triangle from the CPU to the GPU to the screen. From here writing shaders can be pretty simple as long as the foundational understanding is good.

Thanks for the plug, Ravyne. I also have a new book coming out this month that covers more topics and goes into a lot more detail:

http://foundationsofgameenginedev.com/

So, Essential math covers vectors, matrices, linear and affine transformations and then another topic not in the book is getting a triangle from the CPU to the GPU to the screen?

Thank you,

Josh

Actually that is in that book too :)

Thanks for the plug, Ravyne. I also have a new book coming out this month that covers more topics and goes into a lot more detail:

http://foundationsofgameenginedev.com/

I'm not seeing that on Amazon. Where can one obtain a copy?

IMO the best if you want to learn a good foundation is Essential Math by Van Verth, can be found at essentialmath.com. I liked it so much I wrote some slides, maybe you'll find them interesting: http://www.randygaul.net/2014/09/24/mathematics-slides-for-gamedev/

For 2D games you'll just want to know about vectors, matrices, linear and affine transformations. This will get you very far. Then also a decent understanding of the graphics pipeline, as in, getting a triangle from the CPU to the GPU to the screen. From here writing shaders can be pretty simple as long as the foundational understanding is good.

Some cool stuff in there! The convex hull algorithm makes sense; I hadn't figured that one out yet. And I've been trying to figure out if it was possible to do collision detection with a cylinder. I figured it was, but the cylinder point thing makes pretty good sense too. How do you determine the rotation needed to axis align it? I assume any rotation or translation you do on the cylinder must be performed on the point as well?

Anyway, nice presentation!

IMO the best if you want to learn a good foundation is Essential Math by Van Verth, can be found at essentialmath.com. I liked it so much I wrote some slides, maybe you'll find them interesting: http://www.randygaul.net/2014/09/24/mathematics-slides-for-gamedev/

For 2D games you'll just want to know about vectors, matrices, linear and affine transformations. This will get you very far. Then also a decent understanding of the graphics pipeline, as in, getting a triangle from the CPU to the GPU to the screen. From here writing shaders can be pretty simple as long as the foundational understanding is good.

Some cool stuff in there! The convex hull algorithm makes sense; I hadn't figured that one out yet. And I've been trying to figure out if it was possible to do collision detection with a cylinder. I figured it was, but the cylinder point thing makes pretty good sense too. How do you determine the rotation needed to axis align it? I assume any rotation or translation you do on the cylinder must be performed on the point as well?

Anyway, nice presentation!

Thanks! Usually the cylinder is defined as: A, B and radius, where B - A defines a line segment inside of the cylinder, and the radius defines the size of the cylinder radius and sphere caps on either end. So we can treat B - A as our axis to align upon, and yes this transformation would also be applied to the point in question.

Thank you, Randy!

Josh

This topic is closed to new replies.

Advertisement