This day was all about making progress on the
wip/tilesetdocument branch. One problem, now that the map and tileset editors are only shown when opening a respective file, was that Tiled started up completely empty the first time. So I implemented a simple start page for when no files are open:
While doing this I also introduced a simple action registry. Apart from making it easier to reuse actions from various places in the code, I intend to use it in the future for configurable keyboard shortcuts. For now, it also allowed to easily make the "New Tileset" button in the Tilesets view work again (92fca32).
Then I fixed refresh of draw margins when tileset tile offset is changed (6be00dc). Previously this always happened for just the map using the embedded tileset, now all maps using the tileset need to be updated. Because this could potentially be quite a few, I'm delaying the recalculation until it is actually needed.
I noticed the tileset view for the first opened tileset would remain empty. Once I found out why it was easily fixed.
Thinking back about the workflow, it occurred to me that there is a problem when a user creates a new (external) tileset, then uses it on a map and then saves that map without having saved the tileset. Because at the point where the map is saved, it does not know how to refer to the tileset. I decided to solve this by immediately asking to save new maps and tilesets when creating them.
In the meantime, I've also removed the 5 pixel margin for dock widgets, simply because I think it looks better without and it makes it clearer where the views can be resized.
Finally, I merged a big update to the TMX Schema Definition by assofohdz.
I continued to work towards making the
wip/tilesetdocument branch more functional. First I added back the 'New' button on the main tool bar, now as a menu to choose between a map or a tileset. Then I added a Tileset menu providing access the tileset properties, making sure it is only visible when editing a tileset.
Then I made the zoom actions also functional in the tileset editor (4a936bb), fixed issues with the Remove Tileset action (24c0712), fixed crash when changing tile probability (5f27116), fixed double loading of tilesets (3abe086) and restored ability to edit tileset parameters (9c062ab).
All in all, I was amazed how many things were still to be done, and more problems still remain. In the evening, I fixed up the tool bar appearance to look beter with the tabs sitting on top:
Making progress on the
wip/tilesetdocument branch was great, but I also wanted to finally get a Tiled 0.17.1 bugfix release out. In addition, I wanted to add Linux binaries for this release as well. Even though I had already gotten some build working earlier this year and recently Simon Peter had been helping to get an AppImage building on Travis CI, it still took me the better part of the day to get a decent package out.
Problems that remained to be solved included getting plugins and translations to work and resolving a crash as soon as the file dialog was opened. I also first tried to get it to work with the Qbs build system, but eventually fell back on qmake. And I set it up to automatically deploy the AppImage to GitHub.
With that all done, I've pushed the
v0.17.1 tag and did all the releasing work, which is still way more manual work than I'd like it to be. I'll look for ways to automate it further, especially for OS X.
In the morning I've been mostly replying to e-mail, forum posts and GitHub activity.
I spent a bit of time trying out a pull request adding an export to GameMaker: Studio. The plugin mostly worked fine, though I was quite surprised how inefficient the storage format was, and how bad the tile map editor in GameMaker: Studio really was. With a few modifications this plugin can be accepted. I noticed that in the meantime, YoYo Games has announced GameMaker Studio 2, and of course I took a bit of time to try that out as well. They have vastly improved their tile map editor in this version and their storage format is now more efficient as well. Still, I think it would be interesting to see if Tiled can also support the new version.
In the afternoon I continued on the
wip/tilesetdocument branch, working on restoring the reloading functionality that is also used when files change on disk. Unfortunately it turned out to be quite tricky so I didn't manage to finish it.
In the evening I still spent some time to set up snapshot builds for Linux. They are built on Travis CI as AppImage, the same as for releases, but are then pushed to itch.io using their
butler tool. This way, it is easy to keep the snapshot up-to-date by installing it using the itch.io app.
This Friday I spent practically the whole day restoring the reload functionality and adding reloading of tilesets. The latter was tricky because it needs to keep any references to those tilesets valid, and any direct pointers to the tiles or terrains in the tileset need to be cleared. While working on this I ran into numerous issues and crashes that I've fixed as well.
One piece of functionality that is lost here, is that it is no longer possible to affect the tileset in any way while having a map selected. Allowing this would be confusing, since trying to undo any such change would fail because it is part of a different undo stack. This makes editing tile properties, collision and animation a little less accessible. On the other hand, it makes it clear that those things are stored with the tileset and overal it becomes easier to share tilesets between multiple maps. I'm still positive that Tiled will come out better than before in the end.
Tomorrow I'll try to make more progress on the
wip/tilesetdocument branch. The last bit of functionality that needs restoring is the "broken links" widget that tells you which external files could not be located. It'll need to work for both maps and tilesets now. Then there are still other issues, like floating dock widgets not hiding when switching tabs. But hopefully the branch will be in a state where I can get some initial feedback on the change soon.