Import a map as a bitmap?

I want to generate some terrain bitmaps on my own, then bring them into Tiled for further editing. Can that be done? Like I would have a bitmap where each pixel in the bitmap would represent a tile in Tiled. Surely that is something people have done with this program before? I looked at the types of files that Tiled can open, but it doesn’t look like any bitmap formats. Alternatively is there any simple code example that would generate a .tmx file from a given bitmap?

Note I am not talking about the much harder thing that apparently is available, where it automatically generates a tile set from a game image. I’m just talking about converting a grid of numbers into the appropriate Tiled map format – and it would just use whichever tile set you load to go with it…


A thing which might help you would be to load the initial bitmap as an image layer (you might need to resize it before to match your tilesize and then stamp tiles over the preset…

Alternatively you could write a plugin which allows loading the bitmap you are imagining (see this thread for more info) or simply generate a tmx file with xml encoding (see for details (or just generate an example file and look at it in your text editor of choice)).

I hope this helped,

OK thanks – I wrote some code to just generate the TMX file. It was pretty easy with OSX’s NSXML class.