Nearly two month have passed since the last update on the TileMapCreator and I kind of feel bad about it. For my excuse I’m studying for my upcoming big exam.
Last time I was talking about the grid and how I want it to improve; I’ve spend quite some time thinking and trying out things, but haven’t gotten the best solution implemented yet. In addition I’ve looked more into how to use Git and opened a new project over at GitHub, check it out:
If you clone the repository you’ll need SFML, SFGUI and Thor and you’ll have to create a make or project file on your own. Once I get the time I’ll dig deeper into the whole CMake thingy, you’ll be able to just use CMake to build TMC. So if you’d indeed get it to compile and run you will only see the GUI, that’s because I’m in the process of refactoring everything and getting more into TDD (Test Driven Development), which means I’ve removed the grid temporarily, added a separated GUI class and implemented different tests. Since the last push this evening I’ve already decided to split the GUI class again into two classes and put them into their own namespace.
So how does the future look like? I decided to first concentrate more on the GUI and loading tiles into the GUI, rather than playing around with a grid that is just somehow plugged into the project but doesn’t connect with the other parts and probably needs to get rewritten later to fit with them…
That sums it up for now! If you want to keep a close look at the project make sure to watch the GitHub project!
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:
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.
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.