Game Development Reference
In-Depth Information
You should check out the aforementioned page of the Marmalade documentation for
further details on this, as you will be unable to produce final deployment packages
for submission purposes without this information.
Specifying asset lists
We need some way of listing all the resource files that have to be included in the
deployment package so our game can run. Marmalade allows us to do this by way
of the
assets
section of the MKB file. Here's an example from this chapter's version
of the Skiing project:
assets
{
[common]
(data)
sound/music.mp3
[normal]
<include common>
(data-ram/data-gles1)
skiing.dz
[highres]
<include common>
(data-ram/data-highres)
skiing.dz
}
This small example demonstrates most of the functionality available in the
assets
section. First, you will notice the use of square brackets to create named groups of
assets. In the example we have asset groups called
common
,
normal
, and
highres
.
Normal brackets are used to specify a directory, relative to the directory containing
the MKB file, where files that need to be included in the deployment package can be
located. This is then followed by the files themselves. You can have any number of
these blocks of files in an asset group.
The important thing to remember about how directories and files are specified in an
asset group is that the directory in brackets becomes the root path of the application's
installation directory on the device. Let's illustrate this by looking at an example.
First we have the
common
asset group, which specifies that the file called
sound/
music.mp3
can be found in the
data
directory. When installed on the device, the
music.mp3
file will be written into a subdirectory called
sound
in the application's
installation directory.
Search WWH ::
Custom Search