Game Development Reference
In-Depth Information
Major implementation considerations
Perhaps the most distinguishing feature that sets a mobile device apart from a
desktop computer is the fact that the mobile device is always accessible. Once the
user has left his or her house, the desktop machine is parked until possibly many
hours later. The mobile device, on the other hand, can be as far away from the user
as his or her pocket. So at any moment, the user can pull out the mobile device and
start playing your game or using your application.
Very importantly, a continuation of this always accessible use case is that a user will
play your game for a very small amount of time—while waiting for the elevator, while
standing in line at the store, or while trying to drown out an awkward moment during
a first date. Thus, your game must accommodate these brief, very brief, playing ses-
sions and it must do so in a way that the player can still make progress in the game
while playing it in sessions of 30 to 120 seconds at a time.
Some important considerations for your mobile game that are more related to the
physical nature of mobile devices include its limited screen size, the possibility to
change screen orientation effortlessly, limited computing power (relative to a desktop
computer, of course), limited battery power, and browser differences (no, those
haven't gone away yet on mobile devices, either).
Screen size and orientation
The most obvious difference between a desktop computer and a mobile device is its
size. Even though most modern devices can simulate large screen resolutions, the
physical screen size is still rather limited. Not only that, but also at any moment the
user can rotate the device sideways, expecting a responsive feedback of some sort
from the application.
In web design in general, the standard solution to the problem of smaller and varying
screen sizes is a technique called responsive design. The main tool used today to
implement responsive design is the new CSS media query API (which we discuss
later in the chapter). Simply put, this API allows us to load different stylesheets or
sets of CSS rules based on, among other things, screen size, proportions, and ori-
entation.
Search WWH ::




Custom Search