Preface

Android has become the number one platform for mobile phones and tablets, and its popularity is still rising. Mobile game markets have become a great place for both professionals and indie game developers to present their games.

AndEngine was created by Nicolas Gramlich to ease the development of 2D games for Android devices. Since the beginning, AndEngine helped to create many successful games such as Traktor Digger, Construction City, and Bad Roads.

AndEngine is a full-featured open source engine. Its advantage is its simplicity. It is complete and makes creating any 2D game possible, and yet it is still easy to use. Moreover, AndEngine lets programmers use any part of the underlying Android SDK with no limitations.

Learning AndEngine is meant to teach the basics of AndEngine. It's a step-by-step guide to creating a simple game. Through the tutorial, all the basic features of AndEngine are presented in a concise way, making it easy to follow. The book starts with the installation of the required software, making a blueprint of the game, and follows with gradually adding features to the game as the readers learn them. Finally, a game is polished and released for a beta test in the most popular Android application store, the Google Play store.

The AndEngine source code exists in three versions. This book deals with the latest and most commonly used branch called the GLES2—AnchorCenter branch. It uses a newer graphics library, and it is stable and complete.

What this book covers

Chapter 1, Setting Up an AndEngine Project, introduces AndEngine and guides you through the installation of all the necessary software. At the end of the chapter, an empty AndEngine skeleton application is created.

Chapter 2, Game Concept and Assets, introduces the idea of the game that will be created. It begins with outlining the game rules, followed by gathering the game assets and scene diagram, and ends with a completed blueprint for the game.

Chapter 3, From Assets to Entities, explains loading the assets into memory and how to use them in a game. It shows a basic way to display an image on the screen by creating a game entity. It also explains the basic terms and different ways of storing images in memory, considering memory and quality requirements.

Chapter 4, HUD and Text Display, deals with loading fonts, national alphabets, and outputting text. It also explains heads-up display (HUD) and its usage in a game. The way to store characters and most common problems associated with it are explained as well.

Chapter 5, Basic Interactions, teaches you about basic animation and controls in AndEngine. Accelerometer and touchscreen are introduced along with collision detection. In this chapter, the game becomes interactive.

Chapter 6, Physics, introduces the AndEngine Box2D extension that takes care of physics simulation. Accelerometer readings are combined with procedural animation governed by the physics engine to create a better way of controlling the main character.

Chapter 7, Detecting Collisions and Reacting to Events, adds more interactivity and uses the physics engine's optimized collision detection. Game events are created and handled and playing sounds is explained too.

Chapter 8, Advanced Physics, introduces concepts that are not necessary for the game, but nevertheless important. Multiple fixture bodies that can make simulation more precise and realistic are introduced. Collision filtering and its use as an optimization technique is described. Finally, all physics engine joints are listed and explained.

Chapter 9, Adding a Menu and Splash Scene, describes exactly what the title suggests. In this chapter, a splash scene that is shown at the start of the game is added and a way to load resources in the background is described. Also, a simple menu scene is added as an entry point to the game.

Chapter 10, Polishing the Game, explores a few ways to polish the game and make it more interesting by adding music, more animations, and some special effects. A standalone fire and smoke particle engine example is created.

Chapter 11, Testing, Publishing, and What's Next, shares insights about joining a community of developers, user testing, debugging, and publishing the game.

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

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