Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Part II: Sprite Programming > Hour 6. Treating Bitmaps as Sprites

Hour 6. Treating Bitmaps as Sprites

What You’ll Learn in This Hour:

Bringing bitmaps to life

Drawing lots of bitmaps

Limitations of global variables

A simple Sprite class

Drawing a lot of sprites

This hour continues to explore the capabilities of XNA’s bitmap drawing features via the SpriteBatch class. As we learned in the preceding hour, bitmaps are the building blocks of most 2D and 3D games. Although a game could be designed using just 2D vectors or 3D wireframes—perhaps in a retro style as a homage to such games of the 1970s when graphics hardware was not yet able to rasterize bitmaps—there is little reason to use lines today in a properly designed game. Bitmaps are the name of the game today, for both 2D and 3D games. A bitmap-based 2D game will have small “flat” game characters, vehicles, or avatars to represent the gameplay, whereas a mesh- and matrix-based 3D game will have rendered objects in the game with such effects as real-time lighting and realistic surfaces with reflection and textured bumpiness.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint