Learning Java by Building Android Games
上QQ阅读APP看书,第一时间看更新

Chapter 1. Why Java, Android, and Games?

Welcome to Learning Java by Building Android Games, which I hope is just the beginning of your exciting journey into designing and writing games. By the end of this book, we will have made four complete games: a math quiz with dynamically increasing difficulty, a memory game in the style of the classic Simon toy, a pong-style squash game, and a clone of the classic Snake game.

Besides these games, we will build more than a dozen working apps to practice and demonstrate individual concepts to aid our learning of Java, Android, and games. Our games and apps will feature sound FX, graphics, and animations. We will learn everything from using the standard Android User Interface (UI) designer to creating smooth animations by plotting individual pixels.

Although I will encourage you to work with me and implement the specific projects that are detailed step by step throughout the book, I fully expect that once you grasp the different concepts, you will want to use them in your own unique creations without delay. This is exactly what I hope you will be inspired to do.

The game projects themselves are not the objective of the book but the means to a much loftier goal. By the end of the book, you will be able to design and implement your own 2D Android games, to sell or just to give away, on Google Play.

Tip

There is a bit of ground work to cover first, but I promise it won't take long and it won't be complicated either. Anyone can learn to program.

However, there are so many differing opinions among experts, which breeds confusion among beginners concerning the best ways of learning to program. So it is a good idea to look at why learning Java, Android, and games is an ideal pathway for beginners. This will be the first thing we will discuss in this book.

Here is what we will learn in this chapter:

  • Is this book for me?
  • Why should I use games to learn to program?
  • Why should I learn Java and Android?
  • Setting up our development environment