Chapter 8. Expanding Your Horizons
Until this point, we have limited our coding to two dimensions. Now, it is time to expand to the third dimension. In many ways, this will not be as intimidating as it sounds. After all, instead of specifying a position using two coordinates (x and y), we will now simply add a third coordinate (z). However, there are some areas where the third dimension will add considerable complexity, and it is my job to help you master that complexity. In this chapter, we will start with the basic understanding of placing an object in a 3D world, including:
3D coordinate systems: You already mastered the Cartesian coordinate system (x and y coordinates). We will discuss how to expand this into a third axis.
3D cameras: The camera in a 2D game is pretty much fixed while the objects move past it. In 3D game programming, we often move the camera forward, backward, side-to-side, or even in circles around the objects in the game.
3D views: How exactly does a 2D computer screen...