iPhone Game Development - Chris Craft [31]
Defining your goals
Before beginning any project, you need to define its goals. In AmuckSlider we want to create a simple but entertaining puzzle game reminiscent of the classic puzzle slider games that were played before we had video games. Here are our goals for AmuckSlider:
The game should feel similar to classic slider games so that it's easy to learn to play.
The game should try to introduce elements that you can only experience in an electronic device.
The game should increase in difficulty as you play.
The game should include some features to facilitate viral sales.
Note
Viral sales are a good thing—we are not talking about creating a virus! Viral marketing and viral advertising are buzzterms that refer to marketing through word of mouth or social networking. Any time you have a player's attention, you should be thinking about how to make it easy for him to tell a friend about your game.
Examining your options
Our options will be constrained by the goals we have chosen. We must also filter our options based on the capabilities of the iPhone SDK.
Let's examine our first goal: “The game should feel similar to classic slider games so that the game play is easy to learn.” This goal has Multi-Touch written all over it. When playing a classic slider game, you generally hold the game in one hand and use a finger to slide the tiles with the other. This is exactly the experience we want to try and achieve with the Multi-Touch interface.
Our second goal is “The game should try to introduce elements that you can only experience in an electronic device.” This takes a little creativity. Instead of just having a plain old slider app, we wanted to add some spice. After considering this awhile, we decided that instead of having a scrambled picture, we would put arrows on the tiles. The arrows should point in the direction of their home or the correct location they need to be in in order for the puzzle to be solved. This provides a slightly different challenge than a classic slider puzzle and hopefully enough difference to set AmuckSlider apart from the other slider puzzles already available on the App Store.
Our third goal is “The game should increase in difficulty as you play.” We can accomplish this by increasing the number of tiles as you progress in the game. Another option is to increase the number of tiles you have to get in the correct position in order to solve the puzzle. Since we are not using a picture, we can limit the number of tiles that the player has to get in the right location in order to solve the puzzle. The best option is to combine the two and increase the difficulty a little on each level.
Our final goal is “The game should include some viral aspect to help increase sales.” Two options immediately come to mind:
Have a high-score system that allows players to view and upload their high score to a high-score server, and then to send an e-mail to their friends bragging about their score.
Allow players to e-mail their high score to a friend, and in the e-mail include a link that encourages them to get the game and beat their friend's score.
For AmuckSlider, we chose the second option. This option does not require a high-score server and we do not have to invest in an online service to accomplish this goal. If the game does extremely well, we may want to consider the first option in an update.
Coding the application
Now it's time to get started reviewing the code in the application. We know how we want to build the code, and we have reviewed some of skills necessary to make it happen. Each of the game projects in this book can be very detailed, so in order to prevent the important details from getting lost, we will focus on explaining the important areas.
We recommend that you download the code for this example from http://appsamuckcom/amuckslider and peruse the source as you read the book. Download the “Before Polish” version of the source code.
Creating the project
For this project we