Chapter 9. 2D Basics

IN THIS CHAPTER

The XNA Framework not only provides easy ways for us to utilize 3D objects, but it also provides excellent 2D support. There are actually a couple of ways we can achieve 2D inside of XNA. There is true 2D, which is sprite manipulation. We will discuss this kind of 2D. The other kind is actually setting up a 3D environment, but locking the camera so that it is always looking at the same angle and cannot be moved—it is a 3D world with a stationary camera.

Whereas 3D uses models to display our scene, 2D uses images to create and animate our scene. The two dimensions are x and y—there is no z in 2D. It is very common to mix 2D and 3D into the same game. Scores, ...

Get Microsoft® XNA™ Unleashed: Graphics and Game Programming for Xbox 360 and Windows now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.