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 09-03-2011, 03:59 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 176
Rifts is on a distinguished road
Default Overwhelmed by first game

Hey Everyone!

I have made a few little fun apps but I really want to make a game using cocos2d.

I have started it but I feel a little overwhelmed. I think my biggest question/problem is i'm not entirely sure on coding the levels.

for discussion sake, lets say I have 20 different levels. Do I have different files for each level and then call that file to build the level at the correct time? Or do people create a different xib file for each level?

I feel like im confusing myself and making it harder then it needs to be.

any information would be much appreciated.

thanks!
Rifts is offline   Reply With Quote
Old 09-04-2011, 02:35 AM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

the general idea is to create programmatically the level with informations stored in a file.....
__________________
dany_dev is offline   Reply With Quote
Old 09-04-2011, 06:45 PM   #3 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 176
Rifts is on a distinguished road
Default

could you please go into a little more depth?
Rifts is offline   Reply With Quote
Old 09-05-2011, 07:46 AM   #4 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

all depend on what your level contain....

However the file can be a xml or json file, that represent the x,y of where special objects are (like star, wall, etc...)


a short example to represent a level in xml with a "wallB" in 125,225 can be
Code:
<level>
   <object>
       <name>wallB</name>
       <x>125</x>
       <y>225</y>
   </object>
</level>
You can create a level editor to make the file easily.....
To parse it you can use NSXMLParser....
__________________
dany_dev is offline   Reply With Quote
Reply

Bookmarks

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: 386
13 members and 373 guests
7twenty7, apatsufas, comicool, Creativ, Dalia, dansparrow, Duncan C, HemiMG, heshiming, LunarMoon, Murphy, pbart, Tomsky
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,127
Posts: 402,915
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

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