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.AUTO.FlxTilemapAutoTiling.ALT is best for ‘thick’ walls and maps with lots of walls with smaller, internal spaces.
FlxTilemapAutoTiling.ALT.FlxTilemapAutoTiling.FULL is best for is the ‘best of both worlds’ and should handle both types of maps.
FlxTilemapAutoTiling.FULL.Why not just always use FlxTilemapAutoTiling.FULL? Your individual project may not need to do all 48 tile configurations, so sticking with just FlxTilemapAutoTiling.AUTO or FlxTilemapAutoTiling.ALT may cut down on the number of tiles you need to draw.
Note: You can use
customTileRemap to build your own auto-tiling map logic. This is especially useful if you want to use something like FileTilemapExt to do slopes, as an example.map.loadMapFromCSV(mapData, tilesImage, tileWidth, tileHeight, FlxTilemapAutoTiling.AUTO);