Game Development Reference
In-Depth Information
Background
Backgroundsaretheessentialpartofeverygamewithoutreferencetotheirgenres.In
order to express game elements in the best possible way, they should have a graphic
background. There are two types of backgrounds: static and dynamic. The first ones
have a fixed position at the screen, being changeless. The second ones consist of
several separate image layers, being mobile to each other. This helps to create vari-
ous effects; foremost is the illusion of parallax. In this case, each image layer has its
own horizontal speed depending upon its imaginary z axis position. Such a type of
background is usually used in games with dynamic gameplay: platform games, ar-
cades, actions, racing, and so on. The following is a chart showing screen resolutions
of the iPhone/iPad family:
The main difficulty with the backgrounds is their dependence on the screen resolution.
There is a wide range of screen dimensions in iOS devices, starting with the legacy of
the first generations of the iPhone and finishing with the iPad featuring Retina display.
Your game should try to take into consideration all of them (this will be much more
problematic if you would want to make an Android port of your game because there
are many types of resolutions).
Note
There is a very useful website, http://screensiz.es/ , that displays a table with all
popular screen sizes (including both iOS devices and Android ones).
As an option, you can try to prepare all the backgrounds you need in advance, letting
the game check the current device and choose the proper image file. This is very
simple from the programming point of view because the portion of code working with
the background is not complicated; it is only needed to display one static image at
Search WWH ::




Custom Search