I am doing a standard kobold2d tilemap game, which I am trying to start with loading a tile map from the tiledmap editor, a .tmx file
the standard code is very simple:
-(id) init
{
self = [super init];
if (self)
{
// add init code here (note: self.parent is still nil here!)
CCTMXTiledMap *tiledMap = [CCTMXTiledMap tiledMapWithTMXFile:@"background.tmx"];
[self addChild:tiledMap z:-1];
tiledMap.position = CGPointMake(-500, -300);
for( CCTMXLayer* child in [tiledMap children] ) {
[[child texture] setAntiAliasTexParameters];
}
// uncomment if you want the update method to be executed every frame
//[self scheduleUpdate];
}
return self;
}
with my tilemap is a 40x35 tile with each tile is :64x64 pixel.
However, I got the following result which looks like there is a black line between each line of the layer:
which my tilemap looks like: