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

Chapter 5 Game Initialization and Shutdown

CHAPTER 5
GAME INITIALIZATION AND SHUTDOWN

by Mike McShaffry

image

There are a million little details about writing games that no one talks about. Lots of books and websites can teach you how to draw textured polygons in Direct3D. But when it comes to figuring out your initialization sequence, you'll find little discussion. Most programmers hack something together over time that eventually turns into a horrible mess.

I've written this chapter to show you the ins and outs of the entire initialization and shutdown sequence. As you check out the code in this chapter, keep in mind that every game is different and may require a different initialization sequence. Hopefully, you'll gain an understanding of the approach presented here and be able to adapt it to your particular situation. Truly elegant solutions and algorithms rarely just fall out of the sky. They usually come to you after seeing some code that is close to what you need, and you push it the rest of the way yourself.


  

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