1
Other Projects / [Completed] Tileset Collector/Optimizer
« on: May 06, 2009, 08:00:35 am »
http://sites.google.com/site/neotechni/Home/Collector.zip?attredirects=0
I made a program that takes images like say:
http://www.zfgc.com/uploads/resources/2459171e269d1845525a8a60.png
And collects/optimizes the tileset (even checks for flipped horizontal/vertical tiles)
End result being the top right pane
And since it doesn't spit them out in a particular order (like say, all tiles for a tree will now be split up) it lets you organize the tiles before saving. Showing you which ones you've used/haven't used.
I'm sorry the program is downright ugly, but I'm not on my home computer where I have tons of my old code to go back to, I actually made this on a keyboard-less UMPC running at 1024*600 on a 900 MHz processor with 512 MB of RAM. Via VNC to use a keyboard/mouse.
I hope this can be of some use to some people here.
Directions: I made it pretty self explanatory with menus disabling/enabling based on your progress...
Open an image
set the tilesize and optional whitespace
(if you have an existing tileset you want to add to, load it here)
click Collect Tiles (a little square will move to the currently scanned tile)
At this point you can save the unorganized tileset (top pane)
To organize the tileset:
Click and drag one of the 3 images with the left button to move them around
Right clicking will select a tile on the left pane, and place them if you clicked the bottom pane
Used tiles will show up in the left and top pane with a green square
If you attempt to save and still have unused tiles, it will tell you so (but give you the option of saving)
It currently spits out tilesets as a BMP and a TSET file
The TSET file is largely useless to everyone here as it's for my WIP engine so I won't explain it. Though it's self explanatory if you open it up. The Grid data is blank, but the numbers 00 represent 0 frames of animation, and not walkable
It's X axis, space delimited, Y axis carriage return delimited
It spits out the map as a MAP file, also tailored for my engine
Again, open it in notepad and it's mostly self explanatory, except for the grid data.
It's X axis, comma delimited, Y axis carriage return delimited
Each grid coordinate is in the form of:
Altitude Background Foreground
Altitude being set to 0 by default
If background or foreground = -1 then they are empty (foreground is always empty in this program) otherwise they will be:
Tileset X Y FlipXFlipY
Tileset being 0, as there is only one tileset being used in the program
FlipX and Y are combined into a 2 digit number. 00 = no flip, 10 = flipx, 01 = flipy, 11 = both
I made a program that takes images like say:
http://www.zfgc.com/uploads/resources/2459171e269d1845525a8a60.png
And collects/optimizes the tileset (even checks for flipped horizontal/vertical tiles)
End result being the top right pane
And since it doesn't spit them out in a particular order (like say, all tiles for a tree will now be split up) it lets you organize the tiles before saving. Showing you which ones you've used/haven't used.
I'm sorry the program is downright ugly, but I'm not on my home computer where I have tons of my old code to go back to, I actually made this on a keyboard-less UMPC running at 1024*600 on a 900 MHz processor with 512 MB of RAM. Via VNC to use a keyboard/mouse.
I hope this can be of some use to some people here.
Directions: I made it pretty self explanatory with menus disabling/enabling based on your progress...
Open an image
set the tilesize and optional whitespace
(if you have an existing tileset you want to add to, load it here)
click Collect Tiles (a little square will move to the currently scanned tile)
At this point you can save the unorganized tileset (top pane)
To organize the tileset:
Click and drag one of the 3 images with the left button to move them around
Right clicking will select a tile on the left pane, and place them if you clicked the bottom pane
Used tiles will show up in the left and top pane with a green square
If you attempt to save and still have unused tiles, it will tell you so (but give you the option of saving)
It currently spits out tilesets as a BMP and a TSET file
The TSET file is largely useless to everyone here as it's for my WIP engine so I won't explain it. Though it's self explanatory if you open it up. The Grid data is blank, but the numbers 00 represent 0 frames of animation, and not walkable
It's X axis, space delimited, Y axis carriage return delimited
It spits out the map as a MAP file, also tailored for my engine
Again, open it in notepad and it's mostly self explanatory, except for the grid data.
It's X axis, comma delimited, Y axis carriage return delimited
Each grid coordinate is in the form of:
Altitude Background Foreground
Altitude being set to 0 by default
If background or foreground = -1 then they are empty (foreground is always empty in this program) otherwise they will be:
Tileset X Y FlipXFlipY
Tileset being 0, as there is only one tileset being used in the program
FlipX and Y are combined into a 2 digit number. 00 = no flip, 10 = flipx, 01 = flipy, 11 = both