0

Writing a successful iPhone game

Posted by lorenb on Jul 15, 2009 in business, iphone

Read a couple of articles on the iPhone game market.

The first one was from the Globe and Mail, called Game publishers muscle in on iPhone upstarts. It talks about EA and other big publishers getting into the App Store and making it harder for Indie developers to get ahead.

The second one was from Venture Beat, Pocket God offers case study of how to build a hit iPhone game. It’s about two guys who wrote a game and had a lot success with it.

 
1

iPhone 3GS Availability

Posted by lorenb on Jul 13, 2009 in iphone

I was looking to the availability of the iPhone 3GS here in Canada. The phones still seem to be sold out with various places saying to keep checking back with them as they don’t know exactly when new stock is coming.

One of my friends will be in Hong Kong next month. Maybe I’ll have him pick up an unlocked one over there for me.

Or maybe I’ll just stick with the 3G. Don’t really need the 3GS urgently and Apple manufactured shortages are getting lame.

 
1

Game Structure

Posted by lorenb on Jul 10, 2009 in game development, iphone

We’ve been working on developing games for iPhones/iPods for the last few months. It’s been going slower than we’d like as there was a steep learning curve, but things are moving forward.

We will be writing more about our experiences writing our games so you can see what’s going on and maybe learn something. Let’s start with the structure of a game.

If you load up XCode and create a new OpenGL ES project, you’ll end up a program that has a window with an OpenGL view (EAGLView). Now you could write your game with this but you’d quickly find things get messy. It would greatly help to have some resource management.

The popular pattern for this is to have a singleton object which will manage things like graphics canvas, current game state (is it running? paused?) and what is being displayed. This is usually called a Director.

You then have different Scene objects such as a menu or different levels of the game. The scene will know to draw/render itself and handle events such as user touches. The Director then controls what scene is being displayed at any given time. So say you have a menu scene and the user taps to start a new game. The menu gets the touch event, sees what the users wants to do and tells the Director to swich the scene.

For the game logic, you would put typically put it in the scene object(s). By game logic, I’m talking about object locations in the scenes (e.g. players/enemies), collision detection, scoring, and other items along those lines.

When the game is running, you start a game loop up. This will update the scenes/game state. It can be a infinite loop or timer based. If you run full speed with a tight loop obviously that will draw more power/resources from the device. If you are just displaying a menu, that can be a waste of battery life. From what I can see, most people seem to favor the timer approach.

Also regarding performance, when you are drawing/rendering an OpenGL scene, it’s important to batch the drawing instructions up and pass it all to the hardware. By doing that, the graphics chip will take over and optimize as much as it can. If you make a lot of OpenGL calls in small chunks, you’ll get lower performance and find yourself CPU bound.

If you’d like to see some code examples, see the cocos2d library or this tutorial from 71Squared.

 
0

MMATracker 2.2.3 Approved

Posted by lorenb on Jul 8, 2009 in business, iphone

MMATracker v2.2.3 is now ready for sale in the iTunes store. This fixes some minor things for OS 3.0 and you should see some minor performance improvements.

 
0

Google Chrome OS

Posted by lorenb on Jul 8, 2009 in linux

Looks like Google is getting into the OS market. According to this post introducing Google Chrome OS it will be an open source, lightweight operating system that will initially be targeted at netbooks.

It says it will run on x86 and ARM chips. It will be based on Linux with a new windowing system. This is independent from Android although there could be overlap between them.

Not sure if I’d ever use it instead of Linux/GNOME but it’s worth checking out.

 
1

Drizzle

Posted by lorenb on Jul 7, 2009 in linux

I saw a presentation from Brian Aker on Drizzle, Rethinking MySQL for the Web. Looks like Drizzle coming along nicely and I like how they are focusing on the needs of web developers.

 
1

App Store Rejection

Posted by lorenb on Jul 3, 2009 in business, iphone

Apple informed me that they had rejected MMATracker v2.2.3 because:

When the device is connected to a WiFi network and the user taps on any of the upcoming events, the contents on the next screen are blank. This review was conducted on iPhone 3G and iPod touch 2nd generation running iPhone OS 3.0.

Interestingly I can’t reproduce this at all. It works in the iPhone simulator using OS 2.x and 3.0. The build I submitted, I have installed on my iPhone 3G and it works. It works over WIFI. Works over 3G/EDGE.

The only thing I can think of is it happened due to us moving the server where the web service/DB for MMATracker lives.

If they reject it again, not sure what next steps are.

As time goes on, I find that Apple’s process gets more and more frustrating. I don’t like the delay between submission and approval/rejection. I hate the faceless bureaucracy as Apple employees hide behind generic email addresses.

Do musicians on iTunes need to have their album covers adhere to Apple’s Human Interface Guidelines? Do studios have to tailor their movies/TV shows for Apple? Why do only application developers have to put up with this crap?

Copyright © 2010 LB Technology Services Blog All rights reserved.