Game Development Reference
In-Depth Information
The binary versions of resources are generated automatically for us whenever we
load a GROUP file, assuming we have the ICF setting
ResBuild
set to
1
and we're
running a Windows debug build of our game. These files are written out with the file
extension
.group.bin
into a directory called
data-ram
, which lives alongside the
regular
data
directory where our source assets reside.
If we look inside the
data-ram
directory for any project, we'll discover another set
of subdirectories and these are what contain the binary versions of our resources.
These subdirectories correspond to the extra prefix directories that we specify in
our build styles.
When the
.group.bin
files are written out, they will always be written to the prefix
directory specified by the currently active build style, regardless of whether the source
file was read from the standard
data
directory or from the extra prefix directory.
The relative directory path from the
data
directory will also be created in the output
directory when writing out the binary versions of the files.
This makes it very easy for us to deploy different sets of resources to different
platforms as we just need to include all the
.group.bin
files from one of the
subdirectories of
data-ram
.
Let's illustrate this with a quick example. Suppose we have a file
data/images/
images.group
that loads in a number of textures. If no build style is specified, the
default is the Marmalade-defined
GLES1
style, which specifies a prefix directory
called
data-gles1
. The binary version of the file will be written to the file path
data-ram/data-gles1/images/images.group.bin
.
If we now run our program again, with the
pvrtc
build style selected (as defined
in the section on build styles earlier in this chapter), the images will be converted to
PVRTC format and instead written to the file path
data-ram/data-pvrtc/images/
images.group.bin
.
As it happens, Marmalade does not just write out the binary versions of the GROUP
files, it also creates a number of other files that can be useful for debugging purposes.
We won't look at these in detail in this topic, but you might ind them useful to
take a look at if you're having problems with some resource not being processed as
expected. In particular, there is a file with the extension
.group.bin.txt
that details
all the classes encountered while processing a particular GROUP file.
Search WWH ::
Custom Search