TileMapCreator – A GUI Tool

Whenever you’re thinking about creating a tile based game you end up with some hackish format for loading tiles. There’s no good way to edit the format and if you forget which number represents which image you’re lost.

Although I’ve never really come close to a functioning tile based game, I often failed at the map load and create functionalities. So I looked a bit around for existing editors and loading functions and there are quite a few like Tiled or Mappy, but they mostly don’t fit my needs or use some proprietary libraries I’m not willing to use, either because of the overhead (e.g. boost) or license (e.g. Qt). With that in mind I decided to create my own editor. I will work it out for quite specific properties and then try to open it up for further settings.

But since this is a blog about my development experience you can guess the editor is still in a very basic state. Once I’ve hardened the code a bit more, I’ll open new project on GitHub, until then you’ll just have to keep reading the updates on this blog.

The GUI concept is quite simple; on the left side there’s a grid which represents the tile map and on the right holds various GUI elements and a list of the existing tiles you can work with. As I was thinking about the GUI I’ve searched a software for fast prototyping with GUIs and ended up with Pencil, which can run as extension in the Firefox browser but you can also use it as native application. It’s a bit of overkill to create a concept image for this simple GUI but I did it anyways:

concept

For the implementation part I first though about using Qt since it provides a very nice interface but since I’d then had to figure out how to use it with SFML I decided to take a better look at SFGUI. It works pretty good but it misses many features you’d expect from a GUI system but since it’s in constant development there’s more to come in near future. I’ll probably post about SFGUI separately since there are a few words more one could talk about it.

Additionally I use the Thor library for handling my resources. Thor acts as an extension to SFML and adds many higher level feature like resource manager and particle systems. For TileMapCreator it seems to be a quite big and the since I don’t really have to share my resources the manager is actually just a easy way to load resources.

So with SFML, SFGUI and Thor I get my base onto which I can build the TileMapCreator. So far I’ve setup the GUI system and created a grid class on which I’ll have to do some tweaking.

Icons

I’ve chosen the icon package Grunge-Icons from icons.mysitemyway.com. I don’t really like them but I couldn’t find anything that does have a big enough resolution and not just 16×16, looks a bit non-standard and can be used freely. So if you have any suggestions please leave a comment!

That’s it for now but I’m sure there will be a few updates before this gets useable.

2 thoughts on “TileMapCreator – A GUI Tool

  1. Yay, I’ll keep following this :)
    I myself use Tiled for my games, and I find it very simple to integrate.
    What do you not like about it?

    Also, are you going to use XML?

  2. Yes Tiled is pretty good, but it depends heavily on Qt and the generated maps could still be optimized.
    The other option would be to write my own loader but it would require me to dive deep into Tiled’s specification and in the end it’s an overkill.
    So with TileMapCreator I’ll try to create a lightweight format, that can be loaded with no dependencies. Although I’ll be looking into libzip or other ways for compression.
    XML generates in general big files, thus I’ll probably not use it and rather define a specification for my own format.

Leave a Comment

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.