Game Development Reference
In-Depth Information
Creating sprites— Even if you are not an artist, it still helps to be able to
make simple sprites yourself. It enables you to quickly make a prototype of
the game. And maybe you will find out there also is an artist inside you.
To create sprites you first of all need good tools. Most artists use paint-
ing programs like Adobe Photoshop or vector drawing programs like Adobe
Illustrator. But others work with such simple tools as Microsoft Paint or the
more extensive and free GIMP. Every tool requires practice. Work your way
through some tutorials and make sure you get some insight into the many dif-
ferent features. Often, the things that you want can be achieved in an easy
way.
Preferably create very large images of your game objects and then scale
them down to the required size. The advantages are that you can change the
required size in your game later on and that you get rid of the aliasing effects
because colors are blended. Keep the outside transparent and when scaling,
the border pixels will automatically become partially transparent. Only if you
want to create the classic pixel style should you create the sprites in the actual
size required.
Finally, look around on the web. There are lots of sprites that you can use
for free. You can then use these as a basis for your own sprites. But in the end,
realize that the quality of your game probably increases a lot when you work
together with an experienced artist.
11.3 Adding Sounds and Music
Another way to make the game more enjoyable is by adding some sound. In this
game, we will use both background music and sound effects. For the background
music, we simply added the following lines to the main Game subclass:
MediaPlayer.IsRepeating = true ;
MediaPlayer.Play(Content.Load<Song>("snd_music"));
We also want to play sound effects. For example, when the player shoots a ball, we
want to hear it! So, we load a SoundEffect object, just like we would load a sprite,
and we store this object in a member variable in the Ball class:
ballShot = Content.Load<SoundEffect>("snd_shoot_paint");
Then, we can play this sound effect when we start shooting the ball. This is dealt
with in the HandleInput method of the Ball class:
Search WWH ::




Custom Search