Game Development Reference
In-Depth Information
Converting Bouncy Beast
With the simple test project confirmed working, you can take part in the tour de force:
converting the Bouncy Beast project. This shall serve as an example of what you may en-
counter and how to fix or work around issues. Obviously, I cannot present the solution to
every conceivable issue.
The Bouncy Beast project was designed with an Android port in mind, though really the
only thing I did was avoid relying on Apple and specifically third-party frameworks. Spe-
cifically, third-party frameworks can be a problem. You should ask in the SpriteBuilder
forum first whether a given framework is compatible with the Android plugins. If no one
knows, you should incorporate it into a simple test app like the one you just created. Get
the framework's fundamental features to work, such as logging in successfully. Then try
to build it for Android and note any errors.
Apple frameworks are generally widely supported, but some may not be available for
Android at all—others may be missing a feature or two. The more hardware-specific a
framework is, the less likely it is to be portable.
The starting point for the conversion can be found in the 15 - Prior to making Android-
specific fixes folder. It contains a project that was updated to the SpriteBuilder v1.3 format
required to publish projects to Android.
Fixing Compiler Errors
Assuming you've originally created the LearnSpriteBuilder project with SpriteBuilder
v1.3 or later, you can open the LearnSpriteBuilder.spritebuilder project now. If you're not
sure which SpriteBuilder version you used to create the project, you can also use the 14 -
Prior to making Android-specific fixes project, which is the same project as 13 - Anima-
tions and Effects before, except that the project has been upgraded to the v1.3 format.
Now go to File Project Settings and verify that the Android platform is included as the
publishing target. Otherwise, the Android target would be missing all resource files. Then,
just to be sure, use File
Clean Cache and then File
Publish to republish all files.
This may take a minute or two.
When publishing is complete, open the LearnSpriteBuilder.xcodeproj project. Select the
LearnSpriteBuilder iOS scheme (shown in Figure 13-11 ) and any iOS device. Build and
run. This is just to verify the project is indeed working on iOS. There's no point in trying
the Android build if the iOS build is already failing.
Search WWH ::




Custom Search