Game Development Reference
In-Depth Information
Limiting ICF settings by platform and device
When targeting a large number of different devices, it is not uncommon to have a
situation where we want to be able to do different things depending on the device
the application is running on.
The ICF filesystem makes handling this incredibly easy by allowing us to provide
different values for parameters based on both the operating system of the device
and even by individual device type.
To begin with, we can provide different settings on a platform-wide basis. The
"Hello World" project from Chapter 1 , Getting Started with Marmalade , has already
demonstrated this, but to recap, we limit the settings to a particular operating
system using the OS conditional. This is best illustrated by an example:
[GAME]
FrameRate=20
{OS=BADA}
FrameRate=15
{OS=IPHONE}
FrameRate=30
{}
This example sets a default value for the FrameRate setting of 20 . It then overrides
this value for Bada devices with a value of 15 and for iOS devices with a value of 30 .
Note that for legacy reasons the value IPHONE refers to all iOS devices (all versions of
iPad and iPod touch as well as all iPhones).
The earlier example ends with open and close braces. This returns all
settings made after this point to being global settings that apply to all
devices and platforms.
It is also possible to make settings that will only apply to a particular subset of
devices on a particular platform. This is done using the ID conditional that first
specifies the platform type and then has a comma-separated list of device identifiers
that the setting should apply to. Here's another example:
[GAME]
FrameRate=30
{ID=ANDROID "HTC Hero", "T-Mobile G1"}
FrameRate=20
{}
 
Search WWH ::




Custom Search