Assessing the Significance of Game Backgrounds


It's hard to argue the significance of backgrounds in games, especially when you consider the example games that you've seen thus far. For example, picture the Henway game without the highway background, or the Battle Office game without the office background. Both of these backgrounds are critical in supporting the sprites in both games, and giving them context. Without the backgrounds, neither of the games would be as entertaining, and they certainly wouldn't make as much sense from a game play perspective.

In the two examples I mentioned, both backgrounds were created directly from bitmap images. The background image was drawn just before drawing the sprites, which gave the effect that the sprites appeared on top of the background. Although a stationary image was perfectly acceptable for these games, there are situations in which an animated background makes more sense. For example, consider a driving game where a sense of movement needs to be associated with objects passing by as you're driving. These objects could certainly be represented by sprites, which might even make more sense than using an animated background, but there are still aspects of the background that would need to be animated. For example, the lines painted on the road would need to move to some degree to give the illusion of movement.

Another good example of an animated background is the background of a space game, which might consist of a solid black region with stars drawn on it. The animation comes into play when you make the stars twinkle, which is a subtle but compelling enhancement to the background. A space background with twinkling stars adds considerably to the realism of a space game, and helps to immerse the player in the setting.

I could go through countless examples of how important backgrounds are in improving the visual feel of a game, but hopefully you're starting to get the idea. Most of the more interesting background effects involve animation of some sort . However, this animation typically isn't as simple as frame-based sprite animation; you typically must write custom animation code to handle each specific background. For example, a frame-based animation approach is overkill in the twinkling star background. For that background, it makes more sense to write custom code that varies the color of the stars over time. This is not only efficient, but also yields a more realistic effect than cycling through the same series of frame images over and over.



Sams Teach Yourself Game Programming in 24 Hours
Sams Teach Yourself Game Programming in 24 Hours
ISBN: 067232461X
EAN: 2147483647
Year: 2002
Pages: 271

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net