Frameworks and Engines

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

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

  • A framework gives 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.
  • 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. Oftentimes, you'll have to modify the engine itself to achieve your goals, which may or may not be possible depending on whether the source is available. Engines can greatly speed up initial development time, but they might slow it to a grinding halt if you encounter a problem for which the engine was not made.

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

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

  • Unreal Development Kit (www.udk.com): A commercial game engine running on a multitude of platforms, developed by Epic Games. Epic made games such as Unreal Tournament, so this engine is quality stuff. Uses its own scripting language.
  • Unity (http://unity3d.com): 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 it is easy to learn. Allows a couple of languages for coding the game logic; Java is not among them.
  • jPCT-AE (www.jpct.net/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 (www.ardor3d.com): A very powerful Java-based 3D engine. Works on Android and on the desktop, and is open source with great documentation.
  • libgdx (http://code.google.com/p/libgdx/): An open-source Java-based game development framework by Mario Zechner 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 needing to attach a device and upload you're APK file (or having to use the slow emulator). You'll probably feel right at home after having read this book—it's all part of our evil plan. Did you notice that this bulletpoint is just slightly bigger than the rest?
  • Slick-AE (http://slick.cokeandcode.com): A port of the Java-based Slick framework to Android, built on top of libgdx. Tons of functionality and an easy-to-use API for 2D game development. Crossplatform and open source, of course.
  • AndEngine (www.andengine.org): 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.
  • BatteryTech(www.batterypoweredgames.com/batterytech): An open-source commercial library in C++ that supports cross-platform game code and officially supports Android, iOS, Windows, and OSX as build targets.
  • Moai(http://getmoai.com): Another open-source commercial library in C++ that targets Android and iOS with cross-platform game code.
  • Papaya (http://papayamobile.com/developer/engine): A free Android-exclusive 2D game engine that includes a physics API, OpenGL support, particle effects, and more.

More and more middleware, frameworks, and engines are showing up all the time, so this list is by no means exhaustive. We suggest giving these options a try at some point. They can help you speed up your game development quite a bit.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset