Game Development Reference
In-Depth Information
Luckily, as we'll see later in this chapter, Marmalade has a very easy-to-use solution
for this problem that allows us to provide alternate sets of resources that can be used
when targeting different sets of screen resolutions.
Checking device capabilities
Another thing to be vigilant of when targeting a large number of different devices is
that some devices may not include support for certain Marmalade SDK features.
Some devices may feature a multi-touch display while others only have single
touch or indeed no touch screen at all. Some may not feature accelerometer inputs
or keypads. It is therefore a good idea to ensure that we call the various Marmalade
functions that enquire whether these and other features are available for use and
what capabilities are provided, so that we can then provide the user with options
tailored to their device.
Configuring your game using ICF file
settings
If you cast your mind back to the "Hello World" project in the very first chapter of
this topic, you will recall that we used the ICF ile to display a different welcome
message depending on which platform the code was being executed on. Don't worry
if you've forgotten how all this works, as we'll be covering it again shortly.
This functionality proves extremely useful when we are trying to target as many
different devices as possible, as there are built-in parameters that allow us to apply
different settings for a range of things including memory usage, OpenGL ES graphics
performance, splash screens, and much more.
Built-in ICF settings
ICF file settings are assigned to a section identifier which is defined by placing the
name of the section in square brackets. When specifying a value for an ICF setting
you must ensure that it appears after the correct section identifier, otherwise it will
not be found at runtime and an assert will be raised. Here's an example:
[S3E]
MemSize=10000000
SysAppVersion="1.0.0"
 
Search WWH ::




Custom Search