Java Reference
In-Depth Information
The astute reader may ask why the game loop checks the 'game over'
condition as the first step, rather than the last as is normal with a while
loop. You don't have to do this - this is simply in the nature of a tip
which gives you some added flexibility later on. Many games keep their
rendering loops, music and world integrations running even when the
game is over. This gives you the chance to show some game stats, upload
results to a remote server, run some specific local tasks, and so on. This
is very hard to add in after everything else is written, so decide early on
TIP : Keep the 'game over' condition and the 'game loop' termination
condition separate.
8.1.2 Terminology
Before we go much further there are some terms that need to be defined
(see Table 8.1). If you want more information on any of these terms, it
can easily be found on Wikipedia 4 but this should be enough to get by
for now. Don't worry if they don't make sense just yet - they will by the
end of the chapter.
8.1.3 Mobile Games
Designing games for mobile phones requires consideration of a number
of factors not found in other areas of the games industry. By virtue of its
design, a mobile phone is a communications device and therefore must
give priority to this function. When writing mobile games, we need to
realize that at any point game play can be interrupted by an incoming
call or SMS, a scheduled alarm, sudden loss of battery power, removal of
the battery altogether or the game being moved into the background by
the user or the operating system. You should always be asking yourself,
'what happens if the device fails now?'
Moreover the capabilities of mobile phones are limited by a wide
range of factors. Power budgets, heat dissipation, net handset weight and
case dimensions put limitations on available screen real estate, RAM (and
therefore available process heap) and processing power. These are not
major considerations when building games for mainstream console game
decks. Many games, and 3D games in particular, require extensive use
of floating-point arithmetic and it is only recently that we are starting
to see mobile devices with dedicated FPUs or GPUs emerging onto the
market. To date, it has been far more common to emulate floating-point
operations in software, which requires a lot more processing power and
adversely impacts performance.
Search WWH ::

Custom Search