Book Image

Mastering AndEngine Game Development

By : Maya Posch
Book Image

Mastering AndEngine Game Development

By: Maya Posch

Overview of this book

AndEngine is a popular and easy-to-use game framework, best suited for Android game development. After learning the basics of creating an Android game using AndEngine it's time you move beyond the basics to explore further. For this you need to understand the theory behind many of the technologies AndEngine uses. This book aims to provide all the skills and tools you need to learn more about Android game development using AndEngine. With this book you will get a quick overview of the basics of AndEngine and Android application development. From there, you will learn how to use 3D models in a 2D scene, render a visual representation of a scene's objects, and create interaction between these objects. You will explore frame-based animations and learn to use skeletal animations. As the book progresses, you will be guided through exploring all the relevant aspects of rendering graphics with OpenGL ES, generating audio using OpenSL ES and OpenAL, making the best use of Android's network API, implementing anti-aliasing algorithms, shaders, dynamic lighting and much more. With all this, you will be ready to enhance the look and feel of your game with its user interface, sound effects and background music. After an in-depth study of 2D and 3D worlds and multi-player implementations, you will be a master in AndEngine and Android game development.
Table of Contents (21 chapters)
Mastering AndEngine Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Running Android applications


When it comes to running Android applications, we get to choose between using a real device (phone or tablet) and an emulator Android Virtual Device (AVD) as the target. Both have their advantages and drawbacks. While Android devices offer the complete experience at full speed, their disadvantages include the following:

  • Slower to start. Loading an application onto an AVD is generally faster, decreasing debugging times.

  • Limited access, with the root account unavailable on Android devices unless you enable it in the firmware. Full access to the device's filesystem is disabled, including application data.

AVDs do not have these disadvantages, but they have the following limitations:

  • They are slow: Even when using the Intel Atom images and having Intel's HAXM virtualization add-on installed, any device handily beats an AVD

  • Lack of OpenGL ES support: While OpenGL ES support is experimentally being added, it's still unstable and, of course, so slow that it is unsuitable for any serious application

  • Lack of microphone support: At the time of writing this book, it's not possible to use a system microphone with an AVD

  • No motion sensors: We can only test portrait and landscape modes

  • No light sensor or LED:

  • No compass, GPS, and so on: These can be faked, however, by setting GPS coordinates in the AVD

Beyond these differences, devices and AVDs are quite similar. Which one to use depends largely on your needs. However, any verification and non-simple debugging should, as a rule of thumb, always be done on a device. While an AVD approaches the functionality of a real device, it is still so different and limited that its results should not be relied upon as real device behavior.

That said, both can be used in an identical fashion with ADB, or the Android Debug Bridge. ADB is a client-server program that consists of a server running on the Android device or AVD, and a client running on the system accessing it. The ADB client can either be run as a command-line tool or be used from within an IDE such as Eclipse for purposes such as uploading applications to the Android device or AVD, uploading and downloading files, and viewing system and application logs in real time.

Especially the ability to view logs in real time for any running application is very helpful to us when we try to debug an application, as we can output any debug messages to the log.