Table of ContentsMulti-Device BuildsChapter 15.            The Optimizing

Conclusion

Now that wasn't so hard, was it? A preprocessor really does allow you to take advantage of all those cool features made available by manufacturers.

Even though there are plenty of other methods, such as using implementation classes and interfaces, there's nothing quite as simple as just whacking in the customization exactly where you need it. No new classes or restructuring, and most importantly, no wasted precious JAR spaceyou must protect the precious.

Managing the resources for your builds is important as well. Using the simple process you set up in the build, you can split out different versions of your files based on each device type. I've also included a default resource directory for all those files that don't need customization. You certainly don't need to stop here. If you want, you can add different logical layers to this process, such as a split between default and default-transparent or a resource tree for one class of devices. You can easily adapt the copy process to take this into account.

With device ports out of the way, next you'll look at how to speed up your games using various optimization techniques.

    Table of ContentsMulti-Device BuildsChapter 15.            The Optimizing