Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-17-2011, 04:19 PM   #1 (permalink)
Registered Member
 
Mattonaise's Avatar
 
Join Date: Apr 2011
Posts: 12
Mattonaise is on a distinguished road
Post Game State Management

Hello forum. I am planning to have some sort of game state management for my iphone game but I have some questions. I would have a certain class be my "state-manager" and some other class be my "state" class. The only problem is what classes to use. For my "state-manager" class I could use either the appdelegate or a viewcontroller. I think the appdelegate class may suite me better because I can access it anywhere, including inside the "state" class to notify the appdelegate to change states. However, I'm wondering if a viewcontroller would be better to use as a "state-manager" if it has any features that would be useful but not avaliable in the appdelegate. Also, the "state" class has a similar decision. I could use a viewcontroller or a single UIView. A viewcontroller may add more flexibility with the states, for example I was thinking that the "game state" class could be a subclassed viewcontroller, and that a "game view" UIView subclass would be contained inside of the viewcontroller. I could also have a "game data" class contained inside of the viewcontroller, so that the "game view" class could access the "game data" class to find locations to move certain CALayers to (which are used as the sprites in the game). The original viewcontroller could control the timer (or display link), control a soundmanager, and maybe handle networking. However, a viewcontroller as the "state" class may be unnecessary, and a UIView class as the "state" class may be easier when using transitions from one state to the next. It would be great if anyone has some input or suggestions on this decision, and if anyone else has used something like this before.
__________________
A 14 year old app developer...god help me...
Mattonaise is offline   Reply With Quote
Reply

Bookmarks

Tags
appdelegate, game development, game state, view, viewcontoller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 426
7 members and 419 guests
AppleDev, chemistry, Emy, hussain1982, mistergreen2011, Retouchable, skrew88
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,922
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:16 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0