You create a tilemap with CSV data and an image strip, then use the camera to scroll.
NSString *mapPath = [[NSBundle mainBundle] pathForResource:@"small_map" ofType:@"csv"]; NSString *csvData = [[NSString alloc] initWithContentsOfFile:mapPath encoding:NSUTF8StringEncoding error:nil]; SXCompiledTileMap *tm = [[SXCompiledTileMap alloc] initWithViewportSize:CGSizeMake(320, 480) CSVData:csvData tileSize:CGSizeMake(16, 16) andTileImage:[UIImage imageNamed:@"sample_tiles.png"]]; [self addChild:tm];
No comments so far. Feel free to edit this part of the page.