PDA

View Full Version : Overview of the iPhone Game Development Process




shusseina
Feb 23, 2009, 08:28 PM
I am new to iPhone app/game development and while I know how to programme in C and Objective-C I don't have a clear understanding of the process of developing a computer game for the iPhone, or any other platform for that matter! My background is business software development.

I am looking for an overview of the development process for developing a typical 2D game for the iPhone. I would like to learn more about the following:

1. The different technologies required to create an iPhone game (e.g. OpenGL ES and the other graphics APIs. I already know about Objective-C, Cocoa, Xcode).

2. The graphics required and how they are normally created.

3. (In terms of the actual source code) The different functional parts which make up an iPhone game and the typical flow of control in a game.

I know I'm asking a lot, but any info would be really appreciated.

I only require very high level info - no code! :)

Thanks
Steve



xsmasher
Feb 24, 2009, 04:49 PM
I am new to iPhone app/game development and while I know how to programme in C and Objective-C I don't have a clear understanding of the process of developing a computer game for the iPhone, or any other platform for that matter! My background is business software development.

I am looking for an overview of the development process for developing a typical 2D game for the iPhone. I would like to learn more about the following:


Technologies - OpenGL is for 3d work, if you're creating a 2d game then Cocos2d seems very popular. OpenGL (and 3d in general) is difficult to understand, so I wouldn't go that route for your first game.

Individual graphics are usually imported as .png files; the program defines how they are shrunk/stretched and rotated into position. For beginners, you'll usually have a spaceship.png, alien.png, laser.png, etc. They are created by artists, usually in Photoshop or rendered with 3D programs.

Flow control - a game usually has an NSTimer that triggers for every frame of the game - 15, 30, or 60 times per second. That timer calls a "tick" method that moves any sprites that need to be moved, calls the AI routines for all of the sprites, does collision checking, and draws the screen.

It sounds like you need a lot of generic game-deveopment information before you need iPhone-specific information - so check out these forums:

http://forums.indiegamer.com/search.php?do=getdaily
http://www.gamedev.net/community/forums/forum.asp?forum_id=11
http://idevgames.com/forum/search.php?do=getdaily

Wikipedia has some good background, too.
http://en.wikipedia.org/wiki/Game_programming

shusseina
Feb 25, 2009, 10:23 AM
Technologies - OpenGL is for 3d work, if you're creating a 2d game then Cocos2d seems very popular. OpenGL (and 3d in general) is difficult to understand, so I wouldn't go that route for your first game.

Excellent! That's just info I was looking for.

So for a 2D game would I create a View-Based Application in Xcode?

Sorry, what is Cocos2d? Is that Quartz 2D?

Should I also expect to use the UIKit API? I sort of assume I won't be needing the Core Animation API.

I will check the other links you provided, and yes, I do need a crash course game development!

Thanks again

shusseina
Feb 25, 2009, 10:28 AM
Can anyone recommend good books on game development?

jnic
Feb 25, 2009, 11:24 AM
In terms of iPhone game dev I'm not aware of any specifically. Since you're familiar with Objective-C already, a quick primer on iPhone dev should get you up to speed on app development. Lots of people here have recomended Erica Sadun's book (http://www.amazon.co.uk/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2F0321555457?ie=UTF8&t%61g=books087f-20&link%43ode=as2&camp=1789&creative=9325&creativeASIN=0321555457) (myself included) since it dives straight into code.

As for 2D game programming, your best bet's probably to read through Apple's docs on Quartz (http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/GraphicsandDrawing/chapter_6_section_4.html), Core Animation (http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/GraphicsandDrawing/chapter_6_section_6.html) and NSTimer (http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/Reference/NSTimer.html), along with xsmasher's game dev links (in particular iDevGames). Some colleges and universities put their CS courses online, so a bit of googling might turn up some Games Development 101 too :)