Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
Give a map editor for cocos2d
Give a map editor for cocos2d
0 •
Replies
- Spam
- Abuse
- Troll
1 • Off Topic Insightful Disagree Dislike 1Like AwesomeI've tried LevelHelper and it seems like it would be ok for a physics game, but it's pretty tied to SpriteHelper and doesn't quite have the flexibility Tiled did. But I didn't get very deep into it, either.
CocosBuilder is making nice progress, at this point I am using it for user interfaces but the guy making it is adding lots of neat features and its one to look out for for potential future usage.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomewww.charreddirt.com
Twitter: @CharredDirt https://twitter.com/CharredDi
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI'm doing a few things with TMX maps right now myself. Layers seem to be the key here. I'm generating the map in chunks, the plan is to dynamically load and unload the map pieces as needed. Here's my map generation code, it's pretty basic but might help if you choose to go the chunking route.
#define kNumRows 3
#define kNumCols 3
// TileMap setup
for (int y = 0; y < kNumRows; y++)
{
for (int x = 0; x < kNumCols; x++)
{
CCTMXTiledMap* top = nil;
CCTMXTiledMap* left = nil;
CCTMXTiledMap* bottom = nil;
CCTMXTiledMap* right = nil;
if (y > 0)
bottom = mapSections[x][y-1];
if (x > 0)
left = mapSections[x-1][y];
NSString* fileName = FileNameFromCoord(ccp(x,y));
NSString* path = [[NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:fileName];
// create a map segment if it doesn't exist.
// for now always create a segment.
// if (![[NSFileManager defaultManager] fileExistsAtPath:path])
{
[OutdoorTMXGenerator newMapChunkWithName:path borderingChunkTop:top left:left bottom:bottom right:right];
}
CCTMXTiledMap* tileMap = [[CCTMXTiledMap alloc] initWithTMXFile:path];
mapSections[x][y] = tileMap;
int tMapWidth = [tileMap mapSize].width * [tileMap tileSize].width;
int tMapHeight = [tileMap mapSize].height * [tileMap tileSize].height;
[tileMap setPositionInPixels:ccp(tMapWidth * x, tMapHeight * y)];
[self addChild:tileMap];
}
}
Thanks
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome