O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Math

Don’t skip this section just because of the title! I know that math can be fairly intimidating for many people, but I promise that this will be easy. Math actually plays a huge role in all types of video games, but luckily for us, most of the calculations are done behind the scenes by the computer. That being said, there will be various instances where you will have to do some calculations in your programs. The truth is that throughout the examples in the book so far, we’ve actually done a bit a math, and you probably didn’t even notice.

Let’s start with a simple example of how you would use math. Earlier in this chapter, we used math when we were determining the score when a sphere bumped into a sphere. Do you remember the code we entered? ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required