Online Book Reader

Home Category

iPhone Game Development - Chris Craft [44]

By Root 1584 0
virtual wind on the screen by blowing on the microphone. And you could use the accelerometer to have the snow always float back down.

Sleep Sound. Have the iPhone play a white noise audio file in a loop. Maybe allow the user to set an alarm after a certain amount of time or for a certain length of time.

Bubbles. Create an image of a bubble and then randomly display bubbles on the screen for the user to pop. The user's goal is to never let there be more than 10 bubbles on the screen at a time.

Hypno. Hypnotic spinning spirals in different sizes and colors appear all over the screen. The user's goal is to tap all the red ones before it is too late. You might have a time limit to encourage users to hurry.

iMood. Any time the user touches the screen, the entire screen—or just the area of the screen the user touched—changes colors, similar to either a mood ring or a heat-sensitive object.

Fractalious. A living fractal that constantly changes size, shape, and color is displayed on the screen. Maybe the user can pinch the screen to zoom in and out using the iPhone's Multi-Touch capabilities.

Fire Wall. A wall of animated fire is shown on the screen. No matter which way the iPhone is held, the fire always burns in an upward direction.

Sound Board. This app could have lots of buttons with matching sound effects for the user to play as needed. Maybe there would be a nice round of applause or the sound of a jeering crowd, ready on cue.

Star Field. Think of this as a screensaver for your iPhone. Almost any good idea for a screensaver is a good idea for an iPhone novelty application.

Cross-Reference

Check out Appendix B for details on the 31 iPhone apps we created in one month, including Snow Fall, Sleep Sound, and more.

Programming: iFlame

The application you are going to create is called iFlame, which is a virtual lighter for the iPhone. The idea is to create an application that people can safely use anytime and anywhere instead of having to carry around a separate physical lighter with them. This could be very useful for concerts or karaoke events. See Figure 4.1 for the iTunes listing for iFlame.

When we originally released our iFlame application in August 2008, it was one of the first, if not the first, virtual lighter applications for the iPhone. Today there are probably over a dozen. When you are coming up with your next great iPhone application, it helps if you are one of the first to the market. A good idea can go far; a good original idea can go farther. Even today, almost a year later, we still receive many requests for downloads of our iFlame application on a daily basis.

Another thing you can do to help your application stand out in a crowd is to have unique features. For iFlame we decided to create four unique variations that users can select from. We were also sure to include these details on the App Store. We even renamed the application to “iFlame—Multi Effect Concert Buddy” to make sure we got this key selling point across to potential app purchasers.

Here are the available iFlame effect modes:

Normal. In normal mode, iFlame displays a standard traditional flame that waves and flickers over time.

Tiles. In tiles mode, the flame is much smaller and the video is repeated in a 6 x 6 grid.

Cube. The cube mode shows the flame in a video cube effect. Each face of the cube displays the flame video while the cube rotates.

Strobe. In strobe mode, while the flame video plays the screen fades from the dark video to pure white, creating a strobe effect.

FIGURE 4.1

iFlame—Multi Effect Concert Buddy


Sometimes magic tricks lose their magic once you understand how a trick works. Take a look at the iFlame application, shown in Figure 4.2. See if you can figure out what the trick is that makes the iFlame application work. Here's a clue: The iFlame application does not generate its images programmatically. Keep reading to learn the secret.

To begin creating a new iPhone application, open Xcode and choose File⇒New Project. In the New Project dialog box, under iPhone OS Application, choose

Return Main Page Previous Page Next Page

®Online Book Reader