March 2016 development updates

Week 9

With my wife and children visiting my mother in law for a few days, I’ve had a lot of time for Tiled development this week. As I’ve hinted in last weeks’ update, I’ve used this as an opportunity to dive into the problem of editing external tileset files.

But first I wanted to fix a crash in the Terrain Brush that was probably introduced while adding the terrain erasing mode. At the same time I fixed two small oddities.

Tileset Editor

Then I started rearranging the Tiled main window. The idea here is that to enable editing of external tilesets, you should be able to open and save these tilesets just like maps. So they will be open documents alongside maps. Since much of the Tiled UI only makes sense to show when editing maps, I’m rearranging it so that which views are available depends on what kind of file you have selected. Here’s a picture to illustrate this:

This is the biggest code change to Tiled since a long time, and actually the amount of required changes as well as open questions was far bigger than I had imagined. On Friday I spent the whole day moving over dock widgets and changing a lot of code to work with a “TilesetDocument” rather than a “MapDocument”.

First Pair Programming Session

On Saturday I did the first pair-programming session with Will Luongo, as part of his Patreon reward. Will had me pick a topic and I suggested we work on making Tiled reuse an existing instance of the program when available. This allows Tiled to open maps from the file manager in tabs rather than separate Tiled instances.

We used Zoom for desktop sharing and video conferencing. Will did all the typing and I’ve guided him while integrating the QtSingleApplication solution, using it to send a message to the existing Tiled instance and having it open the requested files and activate its window. Two hours later we had it working, and Will opened a pull request that I’ve merged to master the next morning, when also the Qbs build was fixed and the Windows installer adjusted to the new dependency on QtNetwork.

It was a very nice experience for both of us and I’m looking forward to doing this again, also with whoever else is interested to get into Tiled development this way! Don’t hesitate to contact me if this sounds interesting for you as well.

Tiled Sunday

I’ve continued making things work on the external tileset editing branch, by making Open File action work also for tileset files, which required more strict detection code since some extensions (like .xml and .json) could be used by both tileset and map files. Then I fixed restoring of previously open documents. Restoring the state of a previously open map works even better now since it no longer only happens when opening Tiled itself. Also the main tool bar had to be moved below the tab bar. Finally in the evening I made saving work for tileset files as well.

All in all, it was a very productive week in which I spent the equivalent of three full days on Tiled. However, also a lot of work remains before the external tilesets branch can be merged back. And there are a lot of questions to answer as well. For example:

  • When you start a new tileset, it now opens in its own tab. How do you start using it on any open map? Should Tiled show all open tilesets in the Tilesets view and automatically determine the list of tilesets used by a map? Is it a problem that you would then no longer be able to choose a specific tileset order? And is then a separate action needed to remove any usage of a certain tileset from a map?

  • I don’t personally like that you can’t make any changes anymore to the tileset while you’re editing a map. You need to switch to the tileset file to do that. This means for example, that I can’t see the affect of changing the “tile offset” property of a tileset anymore, since you can’t see the map while editing the tileset. So probably now Tiled needs some way to have multiple windows in the same session? That will need even more big changes in the code.

Any feedback is welcome, either just based on the above screenshots and my concerns raised, or by trying out the wip/tilesetdocument branch (a Windows installer is available on AppVeyor).

I also had some time to release Tiled 0.15.2, fixing some small issues in the current stable release and including a new Turkish translation and updated Brazilian Portuguese translation.

Looking Ahead

Since the editing of external tilesets is turning into a huge change, I’ve decided to release the current master as Tiled 0.16. The string freeze has already started so that translations can be updated, and I hope to make the release around the 20th of this month.

Apart from making the best of that release, work will continue towards Tiled 1.0, where the above mentioned changes that bring tileset files alongside map files will have the biggest impact.

Don’t forget to let me know your thoughts!

1 Like

w8 a sec by editing external tilemaps you mean moving around the tiles on the sheet and such? That’s pretty awesome.

Unfortunately I have to disappoint you because that’s not what I meant.

External tilesets are .tsx files that can be used in multiple maps. In this case, all the meta-information like tile properties, collision shapes and animations are stored in this external file rather than being embedded into each of your maps.

This feature should be really convenient, but unfortunately in the current version of Tiled, you can’t make changes to any of this meta-information when it is stored as an external tileset, because there is no proper handling of undo and saving of this extra file. That is exactly the problem I’m trying to fix, and it is the biggest remaining task I want to do before releasing Tiled 1.0.

First off, I’m sorry that I didn’t get around to writing a development update earlier. After returning home from visiting my mother in law with my family, it was hard to catch up and in addition work was very busy as well. And when I did have time, I was rather spending it trying to get closer to releasing Tiled 0.16.

Week 10

Having decided to work towards releasing Tiled 0.16, I updated the NEWS file with the improvements since Tiled 0.15 and announced the string freeze to the translators and the general public. The next day, I resolved some merge conflicts on Weblate and configured it to use rebasing instead of merging.

On Wednesday evening, I merged a small fix for libtiled-java and I made some more progress with external tileset files. I was streaming on livecoding.tv but eventually had to explain why I was getting a little stuck and needed to spend some time thinking about how to continue first.

The next morning I wrote the previous development update. Then I continued to make several small changes in preparation of the Tiled 0.16 release and updating WinSparkle to fix an issue with running the installer without UI (which I hope will work when I get to do the next release).

On Friday I was in the train to my mother in law, to join my family who had already been there for over a week. On an old laptop I spent some time to make a significant performance improvement in case you have many map objects selected, especially when you are then switching between maps.

Week 11

As much time as I had for Tiled in the past two weeks, so little time did I have this week. I needed to catch up on e-mail after spending some days with family. Also it was a busy time at work, so much that I had to work an extra day. That is why on Sunday, I was quite tired and could only manage to make further preparations for the Tiled 0.16 release. Like updating the Dutch translation and fixing things with the AppCast used by Tiled releases (as opposed to the daily builds).

Week 12

I had hoped to make the Tiled 0.16 release on Monday, but there were still some known issues that I wanted to fix first. So this week I tried to get around to those in the evenings.

On Tuesday I made the Preferences dialog non-modal, to improve the feedback when manually checking for updates. Without this, the update check would only initiate after closing the Preferences dialog, which was confusing. Unfortunately, now the Preferences dialog likes to hide behind the Tiled main window when checking for updates, which seems to be a bug in Qt on OS X.

Then on Wednesday, I had to fix an assertion failure caused by the previous change.

On Thursday and Friday evening, I worked on documenting the new custom properties features, since I wanted to finally make a small start on the long-awaited Tiled manual, and these new features seemed like a good place to start.

That weekend was Easter weekend so I didn’t spend Sunday working on Tiled as usual. But, I spent most of the Monday afterwards working on Tiled.

Week 13

Tiled Monday

It was time to finally get the release out, and eventually I managed! I first had to fix some Terrain Brush related regressions that had sneaked in along with recent improvements to this tool. I also did some small documentation updates and enabled mouse wheel for flipping through tilesets on OS X (already worked on Windows and Linux). At the end of the day, I could finally tweet about the new Tiled 0.16, best version of Tiled ever!

Looking Ahead

Of course, week 13 is not over yet and I expect to have a regular Tiled Sunday this weekend where I also plan to stream development on Livecoding.tv again. My plan is to continue working on the wip/tilesetdocument branch with the aim to eventually merge it into master. Until then I could use all the feedback I can get, and will be considering myself also what is the best way forward.

I also very much look forward to finalizing that work and move on to the many other nice features waiting to be added! Overall it has been a very productive month. What I will definitely try to do better again, is to write the weekly updates actually weekly!