Frameworks and Engines

If you bought this book with a little prior game development knowledge, you may have wondered why I didn't choose to use one of the many frameworks available for Android game development. Reinventing the wheel is bad, right? I want you to firmly understand the principles. Although this may be tedious at times, it will pay off in the end. With the knowledge you gained here, it will be so much easier to pick up any precanned solution out there, and it is my hope that you'll recognize the advantage that gives you.

For Android, a couple of commercial and noncommercial, open source frameworks and engines exist. What's the difference between a framework and an engine?

A framework will give you control over every aspect of your game development environment. This comes at the price of having to figure out your own way of doing things (for example, how you organize your game world, how you handle screens and transitions, and so on). In this book, we developed a (very simple) framework upon which we build our games.

transitions, and so on). In this book, we developed a (very simple) framework upon which we build our games.

An engine, on the other hand, is more streamlined for specific tasks. It dictates how you should do things, giving you easy-to-use modules for common tasks and a general architecture for your game. The downside is that your game might not fit the precanned solutions the engine offers you. Often times, you'll have to modify the engine itself to achieve your goals, which might or might not be possible, depending on whether the source is available. Engines can greatly speed up initial development time but might slow it to a grinding halt if you encounter a problem that the engine was not made for.

In the end, it's a matter of personal taste, budget, and goals. As an independent developer, I prefer frameworks because those are usually easier for me to understand and because they let me do things in the exact way I want them to be done.

With that being said, choose your poison. Here's a list of frameworks and engines that can speed up your development process:

■ Unreal Development Kit ( A commercial game engine running on a multitude of platforms and developed by Epic Games. Those guys made games such as Unreal Tournament, so this engine is quality stuff. Uses its own scripting language.

■ Unity ( Another commercial game engine with great tools and functionality. It too works on a multitude of platforms, including iOS and Android, or in the browser and is easy to learn. Allows a couple of languages for coding the game logic; Java is not among them.

■ jPCT-AE ( A port of the Java-based jPCT engine for Android, this has some great features with regard to 3D programming. Works on the desktop and on Android. Closed source.

■ Ardor3D ( A very powerful Java-based 3D engine. Works on Android and on the desktop, and is open source with great documentation.

■ libgdx ( An open source Java-based game development framework by yours truly, for 2D and 3D games. Works on Windows, Linux, Mac OS X, and of course Android without any code modifications. You can develop and test on the desktop without the need for an attached device or the slow emulator (or waiting a minute until your APK file is uploaded to the device). You'll probably feel right at home after having read this book—my evil plan. Did you notice that this bullet-point is only slightly bigger than the rest?

■ Slick-AE ( A port of the Java-based Slick framework to Android, built on top of libgdx. Tons of functionality and easy-to-use API for 2D game development. Cross-platform and open source, of course.

■ AndEngine ( A nice, Java-based Android-only 2D engine, partially based on libgdx code (open source for the win). Similar in concept to the famous cocos2d game development engine for iOS.

I suggest giving those options a try at some point. They can help you speed up your game development quite a bit.

0 0

Post a comment