Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Java by Building Android Games

You're reading from   Learning Java by Building Android Games Extend your game development skills while learning Java – follow this book and learn Java for Android to enter the world of Android games development with greater confidence

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher
ISBN-13 9781784398859
Length 392 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
John Horton John Horton
Author Profile Icon John Horton
John Horton
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Why Java, Android, and Games? FREE CHAPTER 2. Getting Started with Android 3. Speaking Java – Your First Game 4. Discovering Loops and Methods 5. Gaming and Java Essentials 6. OOP – Using Other People's Hard Work 7. Retro Squash Game 8. The Snake Game 9. Making Your Game the Next Big Thing A. Self-test Questions and Answers Index

The four implementation phases in detail


Let's take an even closer look at the implementation before we actually get to it. Here is how we will divide the implementation into the four phases, this time with a bit more detail as to what to expect in each:

  • Phase 1 – MainActivity and onCreate: In this phase, we will create the project itself as well as implement the following steps:

    • We will add our imports and create the body of our MainActivity class

    • Within this, we will declare the member variables that the game needs

    • We will implement our onCreate method, which does loads of setup work but nothing that is hard to understand

  • Phase 2 – SquashCourtView part 1: In this phase, we will start work on our key class, SquashCourtView. Specifically, we will:

    • Implement the declaration of the SquashCourtView class and its member variables.

    • Write a simple constructor.

    • Implement the run method to control the flow of the game.

    • Implement the lengthy but fairly easy-to-understand updateCourt method. This is the method...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image