Righty, I have done a little tool that does basically all of this, so here is a bit of documentation to wet your appetite. The download is at the bottom.
File Format
The data files are stored in the
data/ directory, and then each tileset is stored it its own directory. A tileset consists of three different images for each tile, one for each zoom level, and a data file.
So you end up with something like this:
Code: Select all
data/
|-- blank
| |-- blank0.bmp
| |-- blank1.bmp
| |-- blank2.bmp
| `-- info
`-- shoreline
|-- info
|-- shore0.bmp
|-- shore1.bmp
`-- shore2.bmp
The images have to be in bitmap format, and have a colour set as the transparency colour - this is just for simplicity, and could quite easily be changed if needed.
The data file itself needs to be called
info, and holds the image file name, transparency colour, what zoom level it is for, and offsets. An example of this is below:
Code: Select all
shore0.bmp R255 G0 B0 Z0 X0 Y-32
shore1.bmp R255 G0 B0 Z1 X0 Y-16
shore2.bmp R255 G0 B0 Z2 X0 Y-8
The first part is the image name, the numbers after R G and B refer to the transparency colour for each colour, t he number after Z refers to the zoom level, and the numbers after X and Y refer to the tile offset. This could quite easily be in any sort of format you want, but again for simplicity I chose this format.
The
blank and
big_tile_select tilesets are used for displaying the grid, and as such you cannot place them as tiles, but if you want you could make the images a bit nicer.
Default view
When you first load up the program you will be presented with the following. It may not look very colourfull, but it is fully 32bpp and does the job.
The isometric view will show you the tiles when loaded, and the bit on the right lets you select tiles. If you are lucky enough to have a web browser that can display images you will be able to see that the spacebar, arrow keys, and page up / page down keys do special tasks.
Adding a tile
To put a new tile down press the space bar, and then click on a tile name that sounds tasty. These refer to the folder names that we were talking about earlier. Once you have clicked a name the bit on the right hand side will change, like this:
These refer to the positions of the tiles on the grid. Unfortunately there is one problem, it is 12:30 in the morning, and I can't be bothered to fix it: The tiles in the top left of the small grid refer to the tiles in the bottom right of the big grid (and vice versa), this isn't that much of a problem though and you get used to it after a while. So select an position, and voila - you should have something like this:
Now place a few more tiles so it looks nice, and then move on to the next bit.
Selecting tiles
If you click on one of the tiles in the small grid, the coresponding one (note the bug) in the big grid will now have a funny little indicator over it. This will stay there for around 15 seconds and then dissapear.
All you can actually do to a tile at the moment if change the height of it, so before the indicator disapears press Q or A - after you have pressed these it will stay there for another 15 seconds.
As you can see the tile has magically gone up one height level (the offsets are slightly screwed, but as I said earlier I can't be arsed to fix it).
I think that is about it, but I probably forgot something so here are some more screenshots.
Credits
It is all done by me, except:
- Font stuff (font.cpp and font.h) by
Cone3D
- Sample tiles, by Alltaken
Download is below, released under the GPL so do basically whatever you like with it. Binaries will probably be posted tommorow unless anyone beats me.