In this chapter, you will learn what defines a game as an arcade-style game. You will also form an operational definition of arcade-style gaming.
As the chapter comes to a close, you discover more about Prison Break, the game that you will create in the remaining chapters of the book.
Where Did Arcade-Style Games Originate?
There are many styles of games in the gaming world today. From first-person shooters to puzzle games to multigame hybrids, there are arguably as many styles as there are games to play. Games such as N.O.V.A. 2 and Words with Friends are great examples of these mobile games.
One of the most popular game styles right now is arcade. Arcade games, as a style, are really hybrids that encompass many different game styles. To understand what an arcade-style game is, let’s take a quick look at the history of arcade gaming.
No doubt, you have seen—either in person or online—an old arcade game cabinet like Pac-Man or Centipede. In the early days, gaming hardware was expensive and was typically customized for every game. Developers worked hand in hand with hardware creators, which resulted in very large, furniture-like, game cabinets.
These large, all-in-one cabinets typically contained a monitor, a controller, and all of the internal electronics needed to run the game. Because these units were prohibitively expensive, however, the average person could not afford to buy one; so they were usually found only in video-game arcades. The cabinets were fitted with coin accepters and people eagerly fed quarters into them to play the latest titles. Therefore, the root of the name for the “arcade” game style comes from the place where the games were originally played.
Arcade owners quickly learned one thing: in order to recoup the high costs of buying the game machines, they needed as many players as possible to play each game. Today, people can play a single game for hours at a time. I have been known to log 10, 20, or even 30 hours into a Final Fantasy game. This type of hardcore gaming would have spelled doom for arcade owners at $.25 per play.
Arcade owners and game developers quickly realized that three minutes was the magic number. At an average game-time of three minutes, gamers felt they got their quarter’s worth, and arcade owners could move a lot of players through the game.
Game developers now had to create games that a player could walk up to, understand the gameplay and objectives without any instruction, and stop playing after three minutes. Thus began the development of games that were addictive, had a clearly defined objective, and could be played in a relatively short amount of time. These are the origins of the arcade-style game.
In the next section of this chapter, we discuss the game that you will develop in this book.
Your Game: Prison Break
In the book’s remaining chapters, you learn how to create an arcade-style game called Prison Break. Prison Break is a paddle game that involves deflecting the trajectory of a ball into a wall of bricks in order to break them. The game is loosely based on the game Breakout by Atari. Breakout was a very influential game in the early days of arcade gaming, and its addictive gameplay and easy-to-understand concept makes it a perfect example for this book.
Prison Break contains all of the elements needed to build a good, game development knowledge base. You will learn about polygon and texture rendering, basic game physics, and collision detection. These are all concepts that you will undoubtedly use in other games.
This book will walk you through the development of Prison Break in a natural order, from beginning to end. You will be provided with code samples and explanations for creating the game and playing it on your Android device. By the end of the book, you will have gained the knowledge you need to easily create other games based on the same concepts. Figure 2-1 illustrates a scene from the completed Prison Break.
Figure 2-1. A screenshot from the completed Prison Break
To give you a clear idea of what lies ahead, the next section lays out the content and goals of the remaining chapters.
In This Book…
There are eight chapters in this book. And while the overall book may seem short in length, it is going to be packed with a lot of useful information. Each chapter aims to equip you with one key skill needed to complete the Prison Break game. What follows is a brief overview of the goals of our six remaining chapters.
In this chapter, you learn how to create the menu system for Prison Break. The menu of the game is the main entry point, which guides the player into and out of Prison Break. You will create options for starting and exiting the game using the Android SDK.
Chapter 4: Drawing the Background
Chapter 4 teaches you how to create a background for the game and draw that background to the screen. In the process, you are introduced to many aspects of OpenGL ES, including rendering, texture mapping, and vertices. The background, while static for the Prison Break game, sets the theme for each game you create, and is, therefore, very important.
Chapter 5: Creating the Player Paddle and Bricks
In Chapter 5, you learn how to create a paddle that is moved across the screen based on where the player directs the character. You also add the ball that is used to break the bricks. This involves the use of touch listeners and custom classes in Android.
To finish this chapter, you create the bricks that the player character needs to bust through to advance through the game. You will learn how to use Android code loops to place multiple blocks on the screen without having to draw them manually.
Chapter 6: Collision Detection and In-Game Physics
Chapter 6 walks you through the critical concept of collision detection. The physics of collision detection is used to tell if the brick-breaking ball has hit a brick (or the paddle). You then use physics and mathematics to either bounce the ball in a new direction or destroy a brick. It is this in-game physics that adds realism to your game and makes it enjoyable to play.
Chapter 7: Keeping Score
While it can be overlooked and considered simplistic, the ability to keep score is very important to many arcade-style games. Chapter 7 teaches you how to keep track of the current game score and how to save the score to one of Android’s built-in MySQL databases.
In Chapter 8, you learn how to add levels to the game. An exciting aspect of designing arcade-style games is that you can add many levels—sometimes hundreds of them—quickly and easily. You will apply the knowledge you gained from previous chapters to create multiple levels for your game.
Summary
In this chapter, you learned what defines an arcade game; you discovered more about Prison Break, the game that you will create; and you got a brief overview of the remaining chapters of this book.
In Chapter 3, you begin coding your game’s main menu screen.
98.82.120.188