Creating iPhone Game: Fedicopter

by:    Jim Beauregard
        September 6, 2009

Fedicopter IconAvailable on the iPhone App Store

Background

Early in 2009, I decided to write iPhone applications. I am an experienced software engineer, but I have no prior experience developing in Apple environments. Obviously, I needed to experience a learning curve in these new environments. I spent 3 months studying the following books:

Beginning iPhone 3 Development: Exploring the iPhone SDK

Programming in Objective-C 2.0 (2nd Edition)

Cocoa(R) Programming for Mac(R) OS X (3rd Edition)

Xcode 3 Unleashed

Mac OS X Snow Leopard: The Missing Manual

Creating a Web Site: The Missing Manual

Also, since I decided to use OpenGL ES for graphics, I added the following OpenGL book to my study list:

OpenGL(R) Programming Guide: The Official Guide to Learning OpenGL(R), Version 2.1 (6th Edition)

Mobile 3D Graphics: with OpenGL ES and M3G (The Morgan Kaufmann Series in Computer Graphics)

Later, I added these books to my library:

iPhone Games Projects

iPhone Cool Projects

iPhone Advanced Projects

iPhone User Interface Design Projects

There doesn't seem to be one really good book on OpenGL ES for the iPhone and the developer is destined to learn OpenGL ES for the iPhone from many references, tutorials, and blogs.

Speaking of tutorials and blogs, here are some links that I found very helpful:

iPhone Development

iPhone OpenGL ES Tutorial Series

iPhone Development | iPhone Programming | Blog by Sourcebits

iPhone Programming Tutorials

iPhone Development Blog

25 OpenGL ES tutorials using GLUT

Upon deciding to use OpenGL ES for displaying graphics, I realized that I needed help creating graphics to show. With some searching, I found GIMPwww.gimp.org ) and BLENDER ( www.blender.org ).

GIMP is the GNU Image Manipulation Program. GIMP is excellent for image creation and photo modification. It contains: full suite painting tools, anti-aliasing capabilities, layers and channels, gradient editor, blend tool, transformation tools, file format conversion, very strong selection tools, and supports custom brushes and patterns. At first, GIMP was hard to use and learn. I studied many GIMP tutorials and am becoming a more talented GIMP user. After using GIMP for 5 months with excellent results, my skill level has elevated all the way up to amateur. GIMP has more capabilities then I can imagine.

I used several of the brushes and patterns that came with GIMP. They were really helpful. Also, I really like the way GIMP can support custom brushes and patterns. I did a search for 3rd party custom brushes and patterns and found a web site that I really like: “Obsidian Dawn” ( www.obsidiandawn.com ). The brushes and patterns from “Obsidian Dawn” are extremely high quality. I used a water brush from “Obsidian Dawn” and I am very pleased with the result.

BLENDER is the "free open source 3D content creation suite". I used BLENDER a little in Fedicopter. I made a 3D snowman graphic based on a tutorial. Also, I used BLENDER to help me with layout and planning. BLENDER has extremely powerful 3D modeling and rendering capabilities. Although, Fedicopter didn't utilize BLENDER too much, I can visualize other potential applications that will.

Fedicopter: Game Concept

The Fedicopter game concept comes from the news. Decades ago, economist Milton Friedman commented about dropping money from a helicopter to fight deflation. In 2002, Ben Bernanke talked about this in a speech and became known as "Helicopter Ben". Then in October 2008 with world economies in trouble, the Federal Reserve gave tons of money to ailing banks. Effectively, this was the helicopter drop.

In February 2009, I tried searching for any evidence of a game on this concept. I did not find anything and decided to create one.

"Helicopter Ben" books list:

In Fed We Trust: Ben Bernanke's War on the Great Panic

Ben Bernanke's Fed: The Federal Reserve After Greenspan

Bernanke's Test: Ben Bernanke, Alan Greenspan, and the Drama of the Central Banker

Helicopters

I had to read helicopter articles to learn about helicopters. I searched the internet for technical data, drawings, and technical specifications about helicopters so that I could inject some realism into the game (with in reason). I also looked at helicopter instrument panels and cockpit layouts. I designed an instrument panel that would have instruments which could support playing the game. Also, placement of my instrument panel on the screen was based on typical helicopter cockpit layout. For helicopter books, see the Affiliate Helicopter Store.

Graphics

The advantage of OpenGL ES is that I could specify coordinates in 3 dimension space of every rectangle or triangle of texture graphic in addition to viewing location and viewing direction and then OpenGL ES could make the scene have a realistic 3D look.

But, there is a catch. I still have to create all the graphics. Also, I have to figure out where every thing is located. This can be challenging since the player is viewing the game from inside of a moving helicopter. Not only is the helicopter moving, but things attached to the helicopter are also moving. For example: rotors, the POS-ALT-VEL indicator slides up to reveal the money drop button, the status screen can slide up and down, and marquee characters scroll left on the status screen even while the status screen is sliding. Now consider the location implications of those scrolling marquee characters. They scroll left while the status screen is rising or declining while the helicopter is flying in any direction: forward, backward, up, down, turning left, right, plus angular movement of pitch and roll. Now, after considering all that, where in 3D space are those characters located? What are their x, y, z coordinates? Phew! Where is the nearest Math book? Suggested List:

Mathematics for 3D Game Programming and Computer Graphics, Second Edition (Game Development Series)

3D Math Primer for Graphics and Game Development (Wordware Game Math Library)

Mathematics and Physics for Programmers (Game Development Series)

Physics for Game Programmers

Real-Time Collision Detection (The Morgan Kaufmann Series in Interactive 3-D Technology)

Of all the graphics that shows up in Fedicopter, my favorite graphics are the instruments. Early in design phase, I contemplated using decorative non-functioning instruments, but I realized that realistic and working instruments could help the game player and add to the realism of the experience. So, every instrument is a miniature and working version of a real instrument.

Sound Effects

I created most of the sound effects used in Fedicopter. Beeps are from an electric keyboard. A money release door sound is actually the sound of a knife being sharpened. Money lands on a roof with a thud. The Thud is actually the sound of heavy telephone books. An explosion sound is needed for when Fedicopter rotors touch anything. The explosion sound comes from smashing a heavy toolbox with a sledge hammer and then playing the crashing sound at very slow speed.

The helicopter sound effect came from a sound effects website called: "Soundsnap" (http://www.soundsnap.com/). Soundsnap offers "Pro Quality Sound Effects" for " Sound designers/recordists and music producers, filmmakers, web designer's and video game developers."  Even hobbyists might have a need for a sound effect. Soundsnap is more than just a library and they are a great resource.

Apple's iPhone Developer Program

I found the entire process of development provisioning and distribution provisioning to be very tedious. I followed all of the instructions, but I did make small mistakes. Then nothing worked until I figured out what was wrong. It was difficult because I did not really understand the process.

Fortunately, many other developers have gone through the process before me. Whenever I got stuck, I would do a Google search and find several articles and Blogs written by people who struggled with my issue previously. Thanks to everyone for discussions on those issues. Those discussions solved all of my problems.

The submission process with iTunes Connect seemed a little simpler. My only area of concern was selecting keywords. You get only one shot at submitting keywords so you have to get the list right. The list can not be edited without doing a new submission. The list is limited to 100 characters.

For the Fedicopter program, my keywords follow:
helicopter,flight,simulator,3D,copter,chopper,heli,fly,pilot,bank,money,rotor,first,person,plane

Apple requires a comma separated list. I did not use spaces assuming that they might count against my limit. I hope I did not miss any really important keywords.

Advice to school students

To any children reading this article looking for 3D programming advice, stay awake during your math classes. In developing this game, I did use a little Calculus, but that could have been faked. However it would have been difficult to fake Trigonometry requirements. Trigonometry was used in many places including, but not limited to: Rotor position, pitch and roll instrument, helicopter position change based on 3D velocities, collision detection, and warning indicator.

Math skills are not always required by programmers, but when you do have those skills, you can attempt a tougher and more challenging project.

Helpful Books:

Trigonometry the Easy Way

Calculus the Easy Way


Snapshot: Fedicopter aproaches bank centerSnapshot: Fedicopter aproaches bank center from above




        Home       Products      News      Support      About Us