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

4. Game #3, CometCrusher > Game resources

Game resources

Images, sounds, and other game data files are called resource files. For this game, we will need quite a few. With Monkey, all resource files have to be stored inside a subfolder of your project with a name such as yourGameName.data. For CometCrusher, we will need the following types of resource files:

  • Player ship image
  • Shield image
  • Comet images
  • Bullet image
  • Explosion particle image
  • Background star image
  • Bitmap font image to draw game stats
  • Explosion sound
  • Shot sound

So, let's go over these different types of resources, and how you could create them.

Images

Almost every game needs some graphics. In the initial chapters, we have used graphical primitives such as rectangles, circles, and lines. Monkey can draw these out of the box. For CometCrusher, we will now use images.


  

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