I have been working with sparrow for 2 days now; Great framework!
I now come along my first little problem. I have player who walks around on a map created out of 80x80 tiles (SPImages). when the player moves on the map; the map is also moved to keep the player centered.
All works fine except for one thing. when the map moves, black lines appear in between the tiles.
This is the tiling code:
-(void)reloadTiles{
float firstXTile = -self.x / MapTileSize;
float firstYTile = -self.y / MapTileSize;
float lastXTile = (-self.x + ScreenWidth) / MapTileSize;
float lastYTile = (-self.y + ScreenHeight) / MapTileSize;
MapTile *mapTile;
for (int x = firstXTile; x < lastXTile; x++) {
for (int y = firstYTile; y < lastYTile; y++) {
//load tile xy
mapTile = [dequedTiles lastObject];
mapTile.x = (x * MapTileSize);
mapTile.y = (y * MapTileSize);
//[self addChild:mapTile];
[dequedTiles removeLastObject];
[queuedTiles addObject:mapTile];
mapTile = nil;
}
}
}
Does anyone have any experience with this or even better; a solution?