Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Learning AndEngine
Learning AndEngine

Learning AndEngine: Design and create Android games with the simple but powerful tool AndEngine

eBook
$9.99 $25.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Learning AndEngine

Chapter 2. Game Concept and Assets

This chapter will introduce the game that we are going to make throughout the course of this book. Even though this is not strictly an AndEngine topic, every game must begin with a concept. We will outline the basic entities and gameplay rules. We will also prepare all the assets needed for the game: graphics, sounds, and music. This chapter will give you an idea of where to get pre-made assets. In the second part of the chapter, we are going to include the assets to our game.

The game concept will be a Doodle Jump type of game that illustrates many of the AndEngine features. We are going to create something that is called a game clone. We will use similar rules but our own assets and code. Game clones are often the first witnesses of a new game genre being born.

The game concept

We need to know how our game is going to look before we start coding. It is important to have a basic idea and try to imagine whether this idea will work. For your first game, it's highly recommended to start with something small and possibly something that already exists.

Tip

Do not start with a complex idea. If it is your first game, you will most likely get stuck and have a hard time finishing it. Pick something you can finish in a matter of days.

Start with a pen and paper or some simple graphics software and try to draw the basic screen from the game. The following figure is an example:

The game concept

The basic idea is very simple. However, let's try to state even the obvious details. This helps us to make sure we don't forget anything. The main goal of the character is to get as high as possible. The score will be calculated from the height reached. The obvious facts are that the game will be played in portrait mode and that there is gravity that pulls our character...

Getting the assets

Assets are all resources used in a game including graphics, sound, and music. Maps, levels, 3D models, skeleton animations, or any other kind of content in an external file is an asset too.

When making a game, the best approach is, of course, to create a set of original assets made exclusively for your game. However, this might not be possible for different reasons, such as budget. Fortunately, there are plenty of free assets available online for game developers to use.

Tip

Use free assets to create a proof of concept of your game idea before you start investing money in custom-made assets!

You can find a sample list of completely free assets at http://android.kul.is/p/list-of-free-resources.html.

Note

Always check the license of free assets. The license can restrict their commercial use.

We are going to search for all assets in this list. There is one asset pack that is very useful for making a proof of concept game. It is called Open Game Art Bundle, and you will find it...

Scene diagram

A scene diagram is useful when designing the skeleton of the application. For now, the scene is just a screen that is part of our game. We want to have a few different screens in our game, that is, different scenes. A typical game contains at least a splash scene, a menu scene, and a game scene. A splash scene is usually used to load resources in the background while showing a badge or logo of the game author.

We can add a loading scene between the menu and the game or between different levels or stages of the game. Some games will also have a special scene for game settings, final score, hall of fame, and so on.

We will keep our scenes to a minimum. The following is a simple diagram that shows transitions from one scene to another. Notice the Back label. That means the user taps the back button on the device.

Scene diagram

The splash and loading scenes are very simple and we do not need to spend time designing them right now. We could design our menu scene, but it won't benefit us much...

Summary

Concept is an important part in making a game. Not only do you get an idea of how your game is going to look, but it will also show you most of the resources that you are going to need. It's also important to think your idea through before coding and identify any possible caveats. Later, when you start coding and get stuck, get back to your concept.

In this chapter, we have drafted our game and its rules. We have also designed our game screen using the real assets that we are going to use in our game. The concept will serve as the blueprint to our game.

In the next chapter, we will load the assets to memory in order to use them. We will list the different ways of loading the graphics and types of textures. We are going to see the most common unwanted artifacts that can appear in AndEngine games, and we will discuss how to prevent them. Finally, we are going to use the assets to create our main character and add it to the game.

Left arrow icon Right arrow icon

Description

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.

Who is this book for?

If you are a beginner to AndEngine, or mobile game development in general, and you are looking for a simple way to start making games for Android, this book is for you. You should already know the basics of Java programming, but no previous game development experience is required.

What you will learn

  • Understand the basics of a game engine
  • Install all the required software and download and set up AndEngine along with its physics extension
  • Design basic game rules and gather game assets
  • Create a basic runnable application using AndEngine
  • Display text and graphics in the game
  • Implement basic interactions between the player and the game, making use of the mobile device sensors
  • Simulate realworld physics ingame
  • Finish a polished 2D physicsbased

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 11, 2014
Length: 286 pages
Edition : 1st
Language : English
ISBN-13 : 9781783985968
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Sep 11, 2014
Length: 286 pages
Edition : 1st
Language : English
ISBN-13 : 9781783985968
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 147.97
Learning AndEngine
$43.99
Libgdx Cross-platform Game Development Cookbook
$54.99
AndEngine for Android Game Development Cookbook
$48.99
Total $ 147.97 Stars icon
Banner background image

Table of Contents

12 Chapters
1. Setting Up an AndEngine Project Chevron down icon Chevron up icon
2. Game Concept and Assets Chevron down icon Chevron up icon
3. From Assets to Entities Chevron down icon Chevron up icon
4. HUD and Text Display Chevron down icon Chevron up icon
5. Basic Interactions Chevron down icon Chevron up icon
6. Physics Chevron down icon Chevron up icon
7. Detecting Collisions and Reacting to Events Chevron down icon Chevron up icon
8. Advanced Physics Chevron down icon Chevron up icon
9. Adding a Menu and Splash Scene Chevron down icon Chevron up icon
10. Polishing the Game Chevron down icon Chevron up icon
11. Testing, Publishing, and What's Next Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.8
(6 Ratings)
5 star 83.3%
4 star 16.7%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Marc-Anthony Taylor Nov 05, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Recently I won a copy of Learning AndEngine by Martin Varga and despite having next to no knowledge of Java I decided to give it a go.The book starts with the usual "Setting Up" chapter which is actually quite involved; you really shouldn't skip it. Each step is not only well explained as to how but also to why the steps should be followed. This isn't something I have often come across in beginners guides which are usually only interested in getting you up and running.Throughout the book you work on a single game, this allows you to get to know the individual pieces of the process and, in my opinion, get a better understanding of them. Varga takes care to make sure the steps are manageable and easy to digest.The book takes you from concept to game and doesn't skimp on the details. Each chapter leads nicely into the next letting you build upon what you have learned without taking you out of the process. Assets, physics, testing and publishing are all covered. The book offers everything you need to get you started.Unfortunately, the AndEngine site doesn't seem to be very active (although the forum shows some activity) and the last update to the code was almost a year ago. Nevertheless, although the book focuses on the AndEngine framework I think it would be a good edition to any budding game dev's library.
Amazon Verified review Amazon
Zholaman Kubaliyev Oct 11, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I recommend this books for all who want to develop an Android games using AndEngine. Before to buy I have read some books, articles about AndEngine and it should be noted that this book is the best I found. Thanks to author for good job.
Amazon Verified review Amazon
Mike Jan 05, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Love the way the book has been written. The book is very useful. The Author has explained it very well.The book guides you thoroughly through the early stages of getting everything set up which is one of the most difficult stages to go through, especially with AndEngine.It covers all the major sections of game development, and by the end of the book you have a fully functioning game that you can publish.I would say anyone who wants to learn AndEngine is best off with this book. And once you're comfortable with it, you can go ahead and switch engines if you want because you'll be well grounded in game development theory and practices.
Amazon Verified review Amazon
Bongo Feb 22, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Wenn man anhand eines einfachen Spieles die Android Programmierung mit der AndEngine lernen möchte ist das Buch sehr zu empfehlen.Es ist übersichtlich und gut verständlich erklärt wie ein Art Doodle Jump Spiel programmiert wird.Man lernt nicht nur das Spiel als solches zu programmieren, sondern auch wie ein Startbildschirm und ein einfaches Menü, Highscore speichern, Sound(und wie er mit einem Button an oder abgestellt wird), Animationen u.a.funktioniert. Ich habe mir das Buch deshalb in englischer Sprache gekauft, weil es leider kein Buch über die AndEngine als deutsche Ausgabe gibt.
Amazon Verified review Amazon
L. Scott May 25, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is really good. Well written and fun to develop the game in deed. I developed my own version and managed to publish it.. http://www.amazon.com/AppDevCoders-Jumping-Goat/dp/B00Y5YTSLEThe author takes object orientation seriously and I love to have a very clean and efficient code.. I can recommend it easily.The engine is good (has everything you may need for sure) but a little slow when you create too many sprites (with physics). It doesn't matter because every year phones (devices) get faster so it won't be a problem.. The only problem is that this game engine is not longer under development (no updates since years).. The Forums are actives and you can find many extensions.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.