A background in game development is comprised of imagery or terrain upon which the sprites and the game world is drawn. For those unfamiliar with game development, a sprite isn’t a lime-flavored soft drink, but a small animated graphic drawn on screen (for example, any of the characters in the original Super Mario are sprites). Game backgrounds come in all different shapes and sizes- they can be simply a nice picture or they might take an active role in the game. Backgrounds should be designed around the goals of the game, and knowing the different types of game backgrounds and their respective advantages and disadvantages is very important to building a successful game. We are going to take a look at scrolling, parallax, and tile-based backgrounds along with the technologies that are needed to implement them, and popular games that use these types of backgrounds.

Static Backgrounds

A static background in a video game is exactly what it sounds like; a background image that is static. Perhaps simply a nice background image or even just a simple background color such as in Pac Man would be considered static backgrounds.

Pros

With simple backgrounds, come simple pros. Static backgrounds require very little memory, effort, and maintenance. Static backgrounds are easy to change and easy to implement. This means games that use static backgrounds will be easier to program and typically use less memory- as long as the programmer knows what they’re doing.

Cons

The biggest disadvantage to using a static background is that it needs to fit the entire length of the game (or level). This requires a very high-resolution image unless you recycle the backgrounds (which defeats the point of the positives of using a static background). Not only this, but static backgrounds are very bare bones and can make a game seem boring. In today’s competitive gaming industry, most games use scrolling backgrounds, tile-based backgrounds, parallax, or a combination of multiple techniques. Perhaps amateur game developers will use static backgrounds, but professional games require much more complex backgrounds. Let’s take a look at how professional games create dynamic backgrounds.

Scrolling Backgrounds

The console industry puts great value into scrolling backgrounds, especially on handheld systems. In game development, scrolling is the process of displaying a small window of a larger virtual game world.

Pros

Scrolling Backgrounds can help keep the performance high and the code efficient in 2D games. Scrolling backgrounds be an efficient way to create the appearance of movement and make the game more immersive. Scrolling backgrounds are also easy to manage in terms of assets and code because the image only needs to be rendered once and then shifted around.

Cons

The biggest drawback to the scrolling functionality is that it is very platform dependent. Back in the old days, using video memory for scrolling was a necessity because system memory was limited. However, nowadays modern games don’t use video memory for scrolling any longer, and scrolling still remains very platform dependent. The simplest form of scrolling involves displaying one large bitmap image in the virtual game world which represents the current game world and copying a portion of the world onto the screen. Let’s look at the other types of scrolling backgrounds.

Tile-Based Scrolling

Tile-Based scrolling is a similar concept to scrolling backgrounds discussed above, but the program uses tiles to fill the background bitmap. This type of background functions very similarly to the scrolling background.

Pros

Tile Scrolling Backgrounds help prevent too much obvious repetition as the same asset scrolls indefinitely. Tile scrolling backgrounds also have the advantages of scrolling backgrounds such as keeping the performance high and the code efficient in 2D games. Tile scrolling backgrounds are easy to manage in terms of assets and code, and there are many types of software that can aid with generating tile maps and interesting worlds. Tile backgrounds are versatile because they can also be randomly generated, and therefore provide more randomness in the game world.

Cons

The biggest disadvantage of implementing tile based backgrounds is that there would be more repetition in the background, making it less unique and less appealing. In comparison with static or scrolling backgrounds, it also involved more effort and resources from a programming perspective. In comparison with parallax backgrounds, it is less immersive.

Games that use Tile based scrolling

Blockade

Blockade is one of the first widely recognized games to use a tile-based background. Tile-based backgrounds are what gave Blockade its iconic look and feel. Blockade is an arcade maze game developed by Gremlin Industries and released in October 1976. This was their very first arcade game, running on an Intel 8080 microprocessor (running at 2.079 MHz). Each player moves their character around leaving a solid line behind them. The goal is to trap the other player and make them unable to move. The player who can last the longest without hitting something wins. Blockade can be played as a multiplayer game with two players or one player against the CPU. Gremlin later went on to release a four-player simultaneous version of this game named Comotion, and the game concept has been readapted and applied to hundreds of online arcade games (Blockade, 2018).

The Legend of Zelda: A Link to the Past

The tile model became widely used in platformers and role-playing games, reaching its peak during the 8-bit and 16-bit eras of consoles (Wolfe, 2012). The Legend of Zelda : A Link to the Past is a prime example of a game that popularized tile-based games. Legend of Zelda: A Link to the Past is an action-adventure video game developed and published by Nintendo for the Super Nintendo Entertainment System console. A Link to the Past uses a ¾ top-down perspective, using side scrolling elements similar to those of Super Mario.The Legend of Zelda was a landmark title for Nintendo and many gamers consider it to be one of the best video games of all time.

Technologies Needed

Tile based scrolling can be done simply by coding the map into an array, such as in the example from Chapter 12 in the textbook. Tile based scrolling can also be achieved by randomly generating the tiles as per the example on the Allegro 5 wiki page (Allegro tile maps. (n.d.)) Mappy is a very useful software for generating tile based backgrounds that is open source and easy to use. Mappy uses a fairly flexible file format called FMP. All the versions of Mappy and playback libraries use the same FMP files and are backwards compatible. Other tools such as Tiled work similarly to Mappy and help programmers quickly and easily create tile-based backgrounds.

Parallax Scrolling Backgrounds

At its most basic, Parallax scrolling is the appearance of two or more object moving at different speeds on the screen. In games that use parallax scrolling, the background and foreground are often separated and the layers move at different speeds. The first layer would move at speed x, and the second layer would move at speed y to create the illusion of depth. There are three types of Parallax scrolling, horizontal, vertical, or both. Vertical and horizontal are intuitive to understand- horizontal scrolls the background from left to right while vertical scrolls the background from top to bottom. Additionally, they can both be used at once to create an even more immersive experience.

Pros

Parallax scrolling is a simple but very effective way to add the illusion of depth to a 2D game. It is typically very lightweight and simple to implement. Of course, it is more complex and harder to alter than a static background, but it creates a much more immersive video game experience. (Parallax Scrolling, (n.d.))

Cons

A drawback to parallax scrolling is that it can be comlex to program and implement, which means it requires more work and consumes more resources. Parallax is a combination of the other methods discussed above, making it more complex and time consuming to implement into a fully functioning game. However, it makes the game more immersive and is well worth the extra ressources and programming effort.

Games using Parallax Scrolling

Super Mario

Perhaps the most popular and early example of a parallax game is the side-scrolling platformer Super Mario. As in most platform video games, Mario runs and jumps across platforms and atop enemies in different levels. Each of these levels have a moving background which moves at a different speed than Mario. In every level, the background images move past the camera more slowly than foreground images (i.e. Mario), creating an illusion of depth and adding to the sense of immersion in the virtual experience.

Obsid.io

Obsid.io is a good example of a game that uses two background layers to achieve parallax scrolling. Obsid.io is an action packed MMO brawler created by IO Games inc. Obsid.io uses OpenGl and CSS to create a moving background which moves at a different speed than the characters in the game. The characters include the main player, as well as CPU generated sprites which move past the camera more quickly than the background image, creating an illusion of depth and adding to the sense of immersion in the virtual experience. 2.4 Technology Requirements Parallax scrolling can be achieved by using the same technologies as in scrolling backgrounds. The main difference is that parallax backgrounds simply require adding additional code to move the backgrounds separately. For example, this can be done in CSS or Opengl for browser games. Parallax can even be combined with tile based scrolling by using software such as Mappy, discussed above.

Discussion

The purpose of this document was to summarize the different types of game backgrounds and their respective advantages and disadvantages. By analyzing different game backgrounds we can begin to understand how they work and what type of game background might be ideal for different types of games. Understanding some of the technologies required to implement these backgrounds by taking a look at games like Blockade, Super Mario, Obsid.io, and The Legend of Zelda: A Link to the Past also helps programmers understand the applications of different game backgrounds. The type of background can make or break a game, and plays a very large role in both the look and feel and the success of a game.

Conclusion

Games developed in recent years use even more advanced and complex backgrounds and it is important to understand the types of backgrounds available before starting to develop a game. Being knowledgeable about the types and technologies required to implement game backgrounds is a crucial skill to developing successful games.

References

Allegro tile maps. (n.d.). Retrieved from https://wiki.allegro.cc/index.php?title=Allegro_tile_maps#Tile_maps:_Storing.2C_Drawing.2C_Saving_and_Loading

Mark J. P. Wolf (15 June 2012). Before the Crash: Early Video Game History. Wayne State University Press. p. 173. Retrieved 8 July 2016.

Parallax Scrolling: A Simple, Effective Way to Add Depth to a 2D Game. (n.d.). Retrieved from https://gamedevelopment.tutsplus.com/tutorials/parallax-scrolling-a-simple-effective-way-to-add-depth-to-a-2d-game–cms-21510

Obsidio. (n.d.). Retrieved from http://obsid.io/

Leave a Reply