In this chapter, we are going to develop an empty AndEngine application that will serve as a base for a game. First, we will discuss prerequisites and download and install the required software. You will also learn where to get the latest and stable AndEngine libraries from. Lastly, we are going to create and implement a simple Android application that uses AndEngine libraries and then run it.
It doesn't matter on which platform you develop the project as long as you can install the Java Software Development Kit (SDK) and Android SDK there. However, AndEngine is not a multiplatform framework because applications created with AndEngine can run only on an Android device or inside an Android emulator.
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:
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.
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.
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.
3.144.244.250