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.
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.
Inkscape is a very good freeware software. It's a vector drawing program in the style of Adobe Illustrator. The graphics for CometCrusher were created with it and then exported from it in the PNG file format. To...