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

Why build games to learn to program?

Fun, of course! But there are other reasons too. Successfully running any program we have written is immensely satisfying, even more so when it involves using some code that we previously didn't understand.

But making our own games, as you will soon realize, creates a feeling of pleasure that is not easy to describe—it has to be experienced. Then there are added bonuses of sharing our creations with friends on a phone or tablet or even sharing them publicly on the Google Play Store, and you might realize that once you start making games, you can't stop.

As we create more complex games steadily, you'll realize that all techniques and pieces of code can be rehashed to create other games, and you can then start planning your very own unique masterpieces. This is exhilarating to say the least.

And as with many subjects, the more we practice the better we get. So games are a perfect way to start learning to program Java. However, most beginners' books for Android games require a fairly high level of Java knowledge. But as we will see, it is perfectly possible to keep the practical examples as fun game projects and still start with the very basics of Java.

There is a slight trade-off in doing things this way. We will not always approach the working game examples in a "by-the-book" manner. This is to avoid the problem of doing cartwheels before mastering the forward roll.

The learning outcome priority will always be the Java programming concept, followed by understanding the Android environment and game design principles. Having said that, we will closely examine and practice plenty of Android and game programming fundamentals.

Of course, from what we have just discussed, you can probably surmise that it would have been possible to teach a bit more Java in the same number of pages if we hadn't been making games.

This is true, but then we lose all the benefits that come with using games as the subject matter. Making games really can be a joy, and when our brains are open and eager for information, we will learn much faster. The minimal overhead of learning this way is negated a hundred times over. If games don't interest you in the slightest, then there are plenty of Java beginners' guides out there that take the traditional approach. Just don't expect quite the same thrill as when you publish your first game with online leaderboards and achievements.

You have been reading a chapter from
Learning Java by Building Android Games
Published in: Jan 2015
Publisher:
ISBN-13: 9781784398859
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