FlxTilemap has a built-in autotile system, which allows you to easily create tilemaps with repeating tiles.
There are 3 ‘flavors’ of autotiling available:
FlxTilemapAutoTiling.AUTO is best for ‘thin’ walls and maps with lots of open space.
FlxTilemapAutoTiling.ALT is best for ‘thick’ walls and maps with lots of walls with smaller, internal spaces.
FlxTilemapAutoTiling.FULL is best for is the ‘best of both worlds’ and should handle both types of maps.
Why not just always use
FlxTilemapAutoTiling.FULL? Your individual project may not need to do all 48 tile configurations, so sticking with just
FlxTilemapAutoTiling.ALT may cut down on the number of tiles you need to draw.
customTileRemapto build your own auto-tiling map logic. This is especially useful if you want to use something like
FileTilemapExtto do slopes, as an example.
map.loadMapFromCSV(mapData, tilesImage, tileWidth, tileHeight, FlxTilemapAutoTiling.AUTO);