AndEngine for Android Game Development Cookbook
上QQ阅读APP看书,第一时间看更新

What this book covers

Chapter 1, AndEngine Game Structure, covers the important aspects of game development with AndEngine regarding the core components that most games need to survive. Everything from audio, textures, the AndEngine life cycle, saving/loading game data, and more, are covered in this chapter.

Chapter 2, Working with Entities, begins to familiarize us with AndEngine's Entity class as well as its subtypes, such as sprites, text, primitives, and more. The Entity class is the core component of AndEngine that allows objects in code to be displayed onscreen. More specifically, this chapter includes a list of the most important methods included in the Entity class in order to allow us to take full control over how our entities act, react, or simply what they will look like.

Chapter 3, Designing Your Menu, introduces some of the more common aspects of menu design in mobile games. The topics covered in this chapter include creating buttons, adding theme music to the menu, creating parallax backgrounds, and menu screen navigation. The topics found within this chapter can easily be used in other areas of a game as well.

Chapter 4, Working with Cameras, discusses the various options included in AndEngine when it comes to how the game camera and engine view the game's scene. We begin by going over the different types of camera objects available to us in order to give us a proper understanding of the benefits of each for an informative decision. From there, we continue on to cover camera movement and zooming, creating extra large backgrounds, creating a heads-up-display, and even go as far as introducing the split screen game engine for more complex game design.

Chapter 5, Scene and Layer Management, shows how to create a robust scene manager framework that incorporates scene-specific loading screens and animated layers. The managed scenes in this chapter utilize a resource manager and are extremely customizable.

Chapter 6, Applications of Physics, explores the various techniques used to create an AndEngine physics simulation with the Box2D physics extension. The recipes in this chapter cover the basic setup for a Box2D physics world: body types, category filtering, bodies with multiple fixtures, polygon-based bodies, forces, joints, rag dolls, rope, collision events, destructible objects, and raycasting.

Chapter 7, Working with Update Handlers, demonstrates the use of update handlers that are called once per engine update. The recipes in this chapter show how to register entity-based update handlers, conditional updating, and the creation of a game timer.

Chapter 8, Maximizing Performance, introduces some of the most beneficial, high-level practices to follow when it comes to improving the performance of any Android game. This chapter covers optimization techniques involving audio, graphical/rendering, and general memory management to help alleviate performance issues where necessary.

Chapter 9, AndEngine Extensions Overview, is where we discuss some of the more popular AndEngine extensions which can be beneficial to a project, depending on the game. These extensions may not be for everyone, but for those interested, this chapter includes insight on how we can go about creating live wallpapers, multiplayer components via networking servers and clients, creating high resolution SVG textures, and color mapping textures.

Chapter 10, Getting More From AndEngine, provides several useful recipes that expand upon the concepts presented in the previous chapters. The recipes in this chapter include batch texture-loading, textured meshes, autonomous shadows, moving platforms, and rope bridges.

Appendix A, Source Code for MagneTank, outlines the game, MagneTank, with class-by-class descriptions to show how a full game made with AndEngine can be set up. The game includes many of the recipes found throughout the chapters, and the source code is available with the bundled code.

Appendix B, Additional Recipes, is not present in the book but is available as a free download from the following link: http://downloads.packtpub.com/sites/default/files/downloads/8987OS_AppB_Final.pdf.