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 06-04-2011, 10:28 PM   #1 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 4
phantomsri is on a distinguished road
Default how to load different level of tilemap

Hi, I have a game, with 2 layer.
the first layer there is 2 icons or more, when i touch the first icon it will load the second layer(game layer) with tilemap one.
when i touch the second icon it will load the second layer with tilemap two.

i have created

-(void) tileMapOne
{
//tile map first level code
}

-(void) tileMapTwo
{
//tile map second level code
}

I have used this code to load the scene

GameScene *gameOverScene = [GameScene node];
[[CCDirector sharedDirector] replaceScene:gameOverScene];

My questions is, is there a way to write a code where when i load the new scene it can load the -(void) tileMapOne method when click icon 1. and when i click icon 2 it loads
the new scene with -(void) tileMapTwo.

if you guys cant give me the code maybe give me advice how to do it?

i hope some one can advice me coz im a little new to cocos2d
phantomsri is offline   Reply With Quote
Old 06-07-2011, 02:05 AM   #2 (permalink)
Registered Member
 
Join Date: Jun 2011
Posts: 4
phantomsri is on a distinguished road
Default

anyone can help?
phantomsri is offline   Reply With Quote
Old 06-07-2011, 03:45 PM   #3 (permalink)
Registered Member
 
Join Date: May 2011
Location: Warsaw
Posts: 21
ios dev is on a distinguished road
Default

Quote:
Originally Posted by phantomsri View Post
anyone can help?
we usually use layers :
CCScene *scene = [CCScene node];
[scene addChild: storyLayer];
[[CCDirector sharedDirector] replaceScene: scene];
__________________
------------------
JellyBugs game iPhone
------------------
Android outsourcing |iPhone outsourcing |
ios dev is offline   Reply With Quote
Old 06-15-2011, 11:23 AM   #4 (permalink)
Registered Member
 
Join Date: Mar 2011
Posts: 152
mrtubby is on a distinguished road
Default

i followed ray wrend. tutorial on tiled maps and i created a new "meta/special tile" in tiled and made collsion (just like making him stop walking into things or collecting items (if you read the tutorial (its 3 parts)). Then i created the new "meta tile" and made the collision when he walks into that tile he switches levels, if you need me to walk you through it just say, im happy to help

by the way if you want those tutorials here they are (part1, part2, part3)

How To Make a Tile Based Game with Cocos2D | Ray Wenderlich

Collisions and Collectables: How To Make a Tile Based Game with Cocos2D Part 2 | Ray Wenderlich

Enemies and Combat: How to Create a Tile Based Game with Cocos2D Part*3 Geek And Dad's Blog
mrtubby is offline   Reply With Quote
Reply

Bookmarks

Tags
cocos2d, level, tilemap

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: 413
10 members and 403 guests
AppleDev, chemistry, Emy, hussain1982, ipodphone, mistergreen2011, pipposanta, Retouchable, skrew88, SLIC
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,923
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:18 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0