August 2016 development updates

Hey @kheftel, your feedback is really appreciated! It’s good to hear it is not as bad as I thought it was.

Week 34

Tiled Monday

I started this day writing the last development update, since it was long due. It’s always hard to get around to doing this at home, where there is so much to do and so little time.

A few fixes were needed, since I forgot to ship the experimental Defold export plugin in the Windows installer (#1343). I also did some updates to the documentation of the commands.

Since a while there are also 7-zip archives available for the snapshot builds, but I noticed they were almost twice the size they needed to be due to accidentally including debug DLLs of Qt plugins.

Finally, I reviewed and accepted a pull request by @IMMZ adding a new “Snap to Pixels” option. Like the name says, this will make sure your objects align to pixels while moving and resizing them, which can be especially useful when using the tile collision editor. It obsoletes the current workaround of setting the number of fine grid divisions to match the number of pixels on your tiles.

Tiled Friday

I did two small fixes, to saving of the object group color alpha value and more importantly, the initialization of the alpha value in the color picker dialog when changing an existing color property. The latter actually happened due to a bug in Qt, which I’ve fixed as well.

I spent the rest of the day working to allow higher precision values for floating point properties. This was more complicated than I had imagined and I tried several approaches, but I think I’ve found one that works well. It was an important issue to me because I think the previous limit of 2 decimals was unacceptable. The patch works by internally allowing up to 9 decimals but then stripping redundant 0’s when displaying the value.

Week 35

Tiled Monday

This day I got back to the wip/tilesetdocument branch, since it represents an important step forward for Tiled. Apart from fixing a cosmetic issue and adding a resize grip, the most important changes were to re-enable functionality that got broken by previous refactoring. The tile animation and collision editors are now accessible again and the menu to control which views and tool bars are visible was fixed. The latter was tricky because previously I could rely on a menu created by Qt, and I could no longer do that because now the map editor and tileset editor get their own embedded QMainWindow.

I also started a big change to avoid referencing tile instances by direct pointers. Using direct pointers made it impossible to handle “invalid” tile references, and to work around that dummy tiles used to get instantiated to avoid losing map data. Invalid tile references can happen easily, for example when removing tiles from an image collection tileset. The goal with this change would be that Tiled can render such invalid references in a good way and without instantiating dummy tile instances.

Tiled Friday

I accepted a pull request by Jack Roper adding %mappath to the variables available when running commands.

Then, I worked the rest of the day finishing the transition away from using direct Tile instance pointers. Instead, tile layers now internally refer to tiles using a Tileset pointer and a tile ID. And when rendering the map, invalid references will be clearly noticable:

There are still some places in the code using direct tile pointers, which I’ll need to check to make sure that they are guaranteed to stay valid to avoid crashes.

Other News

This month is actually the last month that I’m using a rented office for Tiled development, which I moved into back in May. The reason is mostly that my daughter is now going to Kindergarten, so it should be quiet enough at home to resume working from the bedroom. And of course it saves quite a bit of money, which is important since I’m already spending two days/week on Tiled without having reached that goal financially.

Also, I’ll be going on holiday with my family for one week, and my wife would really appreciate if I didn’t take my laptop. So there is likely an incredibly quiet period coming up soon, but then I will come back full of new energy!