Slick Forums

Discuss the Slick 2D Library
It is currently Mon Jun 18, 2018 7:51 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue May 21, 2013 10:28 pm 
Offline

Joined: Wed Nov 02, 2011 4:28 pm
Posts: 2
I found myself in the situation that I had an image which was exactly like the map I wanted to create. I didn't want to go through all the trouble of picking out tiles out of the image to create a tileset, then create the map off of the tileset (it kind of seemed like re-creating what I already had). Maybe there is an easy way to do this, but I don't know about it.

In any case, I created a python script that will take an image and a tilesize, parse up the image to create a tileset, then create the tmx file. I wrote it fairly quickly, so its not very robust, but I thought I would post it if anyone else could use it.

It only creates one layer, and only can do square tiles. Also, it will probably break if the image size isn't a multiple of the tilesize. I guess if you need any of those features you can modify it. It also outputs in plain text, but its easy enough to open the map in Tiled then save it in a compressed format.

Hope someone finds it useful.


Attachments:
mapCreator.py.zip [1.43 KiB]
Downloaded 174 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group