Book Image

Learning AndEngine

By : Martin Varga
Book Image

Learning AndEngine

By: Martin Varga

Overview of this book

AndEngine is a very popular open source OpenGL (open graphics library) Android game engine, used to create mobile games quickly while maintaining the ability to fully customize them. This book will guide you through the whole development process of creating a mobile game for the Android platform using one of the most popular and easy-to-use game engines available today. Beginning with the very basics, you will learn how to install AndEngine, gather graphics, add sound and music assets, and design game rules. You will first design an example game and enhance it by adding various features over the course of the book. Each chapter adds more colors, enhances the game, and takes it to the next level. You will also learn how to work with Box2D, a popular 2D physics engine that forms an integral part of some of the most successful mobile games. By the end of the book, you will be able to create a complete, interactive, and fully featured mobile game for Android and publish it to Google Play.
Table of Contents (19 chapters)
Learning AndEngine
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Prerequisites


Android applications are simply Java applications running inside an Android virtual machine called Dalvik. You will encounter this name when compiling and running the application. The final compiled code is not fully compatible with the Oracle Java Virtual Machine, but for the purpose of this book, you are only expected to know basic Java programming.

You will need the following software and hardware:

  • Windows XP, Vista, 7, or 8; Linux (Ubuntu is recommended); or Mac OS 10.5.8 or a later operating system

  • Java SDK

  • Android SDK with the ADT bundle

  • An Android device

You should already know how to install the Java SDK (JDK) and keep it up to date. The Android SDK requires at least JDK 6. You can use higher versions if available. Always use the latest update for security and compatibility reasons.

Note

It is important to use JDK and not just the Java Runtime Environment (JRE) for development. It is also a requirement of Android SDK. Make sure the JAVA_HOME environment variable is set to the correct folder.

Android SDK contains the Eclipse Integrated Development Environment (IDE) with preinstalled plugins and Android platform tools. Using the latest version of Android SDK is recommended.

Tip

If you have used Eclipse before, you can use your own existing Eclipse installation as well, but then you are required to install the plugins manually on your own.

We are going to download and install Android SDK with the Android Development Tools (ADT) bundle in the next section. ADT allows you to install the application to your device and also connect to it in order to get important information such as the LogCat console output (text output from installed applications that is not visible to users) and other interesting statistics about running apps.

Your device should be running at least Android 2.2, but using a more recent version is recommended. If you don't own an Android device, you can use an Android emulator for development. However, consider getting a physical device because the behavior of the emulator is different from that of a real phone or tablet. The game might run slower or have problems. Emulators are known to have issues especially with hardware-accelerated graphics. Nothing can replace testing on a real device, and in fact for serious game development, it's a necessity to test on multiple devices.