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 Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to Egypt

Standard delivery 10 - 13 business days

$12.95

Premium delivery 3 - 6 business days

$34.95
(Includes tracking information)

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 Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Egypt

Standard delivery 10 - 13 business days

$12.95

Premium delivery 3 - 6 business days

$34.95
(Includes tracking information)

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 the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela