October 2015 development updates

(Thorbjørn Lindeijer) #1

September raced by with lots of nice things happening, most noteworthy the release of Tiled 0.14 and the start on Tiled 1.0. Now we have October and the goal of the month is to get as far as possible on Tiled 1.0.

Week 41

The first thing I want to note is that while I intended for 1.0 to not grow too many tasks, the milestone on GitHub has been growing like mad the past two weeks. And it’s mostly things that Tiled is really lacking before it could be seen as complete and some of them are known bugs that should really be fixed. I had not anticipated all of these things before and if it turns out that there is too much work to make it to 1.0 this year then I plan to do an intermediate Tiled 0.15 release.

Tiled Monday

I spent the whole day working on a way to deal with broken links to images in maps. It’s not finished yet, but I think I’m on a good way now.

I started with delaying the loading of images until after the entire map data was loaded. That way when an image fails to load, I should be able to offer the user a way to tell Tiled where to load the image from and then it can try again.

But that change made me worry about no longer being able to tell a valid tile ID from an invalid one. The solution for this that I implemented was to delay the resolving of the tile IDs as well. Unfortunately I think I spent rather too much time worrying about these invalid tile IDs, which in practice should never happen, and in the end I don’t think my solution is a very good one since it’s probably needlessly complicated. Also, the alternative solution of changing the way tiles are stored in the tileset from a list to a map structure is probably one I should do anyway to solve an issue with Collection of Images tilesets. Finally, it only solved the problem of dealing with invalid tile IDs at the tile layer and tile object level, but not for tile elements in a tileset.

I also wanted to make some progress on this issue from the user’s perspective, and I think this is turning out quite nicely. Here’s a screenshot of what to expect when you load a map with broken image references:

Of course, it still lacks icons and the right buttons, but the important part for me is that it is non-modal and will provide a way to quickly resolve a large number of broken links. So there is sorting and there will be multi-selection. I think we can even split the view and still render the map with the tiles that could be loaded.

So, it’s taking a bit longer than I expected but I think it’s an important feature since many people run into this issue after moving around their maps or tilesets.

Closed issues on GitHub

  • #1086 Polish translation - Merged
  • #1114 Building on debian requires libqt5opengl5-dev - Merged

Looking Ahead

Two important issues were reported that I will try to resolve in a Tiled 0.14.2 release. The fact that Tiled does not allow picking a JSON-formatted external tileset when adding one (#1108) and an issue with copy/pasting tiles and/or tile objects when using image collection tilesets (#1113). There’s also a big Brazilian Portuguese translation update almost ready to be merged (#1112).

And of course, I will aim to finish the broken links handling soon so that I can move on to other Tiled 1.0 tasks.

Thanks for listening and thanks to all my patrons for their support, without which all of this would not be possible!

(Thorbjørn Lindeijer) #2

Week 42

Tiled Monday

As I wrote in my previous update there were reasons to make a Tiled 0.14.2 release, and this is the first thing I worked on in the morning. The layer offsets were still missing from the Lua export, you couldn’t actually add external tilesets in JSON-format and there was a bug when copy/pasting between maps using collections of images as tilesets. I had all these issues fixed before lunchtime and tagged the release.

In the afternoon I resumed work on dealing with broken links. Since due to issue #1118 it had become clear that switching from an array to an ID map for storing the tiles made a lot of sense, I abandoned the earlier effort of delaying the resolving of global tile IDs. And I’m very glad about that, since it was messy and didn’t even solve the full problem.

But while switching a list to a map may sound easy, there were unfortunately a lot of places in the code subtly effected by this change. The switch ended up taking the whole afternoon and until it was ready to be pushed to GitHub. Affected code was not just loops but also the map reader/writer (global tile IDs) and the add/remove tile actions. The tileset view will still need to be adapted to handle gaps in the tile IDs, which should then also resolve issue #1090.

In the evening I noticed a tweet about a nice visual terrain generator, which made me remember that I once wrote a tool for exactly this problem and it was still sitting on the wip/terraingenerator branch. Back in April, atheros had already changed the tool to be controllable from the command-line instead of being hardcoded to process certain tilesets. So now I spent some time to merge this to master. The main thing this tool is lacking now is some documentation.

Closed issues on GitHub

  • #1101 Lua: Layer offsets not being exported - Fixed
  • #1108 JSON tilesets working great, but can’t import existing ones - Fixed
  • #1112 UPDATE - Brazilian Portuguese language - Merged
  • #1113 Copy/Cut/Paste between .tmx files - Fixed
  • #1119 Error in the language selection screen - Fixed

Looking Ahead

Next Monday I’ll continue working on the wip/broken-links branch, with the aim of getting it ready to merge to master. It’s one important step to Tiled 1.0, and many more will follow.

(kawika) #3

thanks for the great work! Excited for the 1.0 release, and also for the terraingenerator stuff :slight_smile:

(Laete Meireles) #4

Any predictions of when it will be released the ‘Tiled 1.0’?
I am very eager to begin the process of translation into Brazilian Portuguese language. :sweat_smile: :grinning:

If the source code of the branch 1.0 is now available, indicate where to download. I take care of the rest. : D

(Thorbjørn Lindeijer) #5

My initial plan was to finish Tiled 1.0 later this year. By now so many issues have been added to the milestone and the work I’ve already done took longer than expected, so it may be that some 0.15 release will come out first. In any case, I’ll let you know at least two weeks before doing the actual release to allow for translation updates.

(Laete Meireles) #6

I’m anxious!


(Thorbjørn Lindeijer) #7

Week 43

Tiled Monday

I was busy the whole day moving forward with the “wip/broken-links” branch. Actually this time I decided to deal with the logic required when the tileset image and/or its parameters are changed after a tileset has been added.

The first thing I did was to get rid of the tracking of maximum tile sizes and tile image offsets in the TileLayer class (be2c0a94). Tiled did this to determine the area of tiles it needed to draw when a certain part of a tile layer needed to become visible. But the approach it took is no longer manageable when the tiles themselves can actually change size. Now instead, the TileLayer will keep track of the tilesets used on it, which are then used to determine the area of tiles to render.

The rest of the day, I worked on allowing to edit the tileset parameters, which I consider the most important feature for Tiled 1.0. One bit which took me way more time than I had expected was just to get an “Edit…” button to show up in the Properties view. Such a button was needed because I wanted to reuse the “New Tileset” dialog for editing the parameters. The good part is that by the end of the day this feature seems to be working quite reliably. Here’s a screenshot:

It is now a relatively small step to allow loading maps with broken tileset image references, which you can then simply fix by going to the tileset properties and clicking on the small “Edit…” button.

What should still be improved is to provide feedback in this case. Tiles that could not be loaded should not simply be empty, but there should be some clear placeholder for them, both on the map and in the tileset view. And the Properties editor should probably show an icon clearly marking the problem as well. Finally, this work only covered the case of broken tileset image references. Still to be handled are broken references to external tileset files (like .tsx files) and broken references to individual images in an image collection tileset.

Looking Ahead

I’ll be trying to address all of the issues mentioned in the last paragraph upcoming Monday!

(Thorbjørn Lindeijer) #8

Week 44

Last update for October!

Tiled Monday

In the past weeks I had made good progress on allowing the user to edit the tileset image referred to by a tileset (as well as its parameters) after adding it. But, this is only one of several kinds of reference that you may wish to change.

I started by dealing with another kind: the image links for individual tiles in a Collection of Images tileset. After about 4 hours of work, I pushed the change making it possible to change such references. In addition, loading a map with broken references to such images no longer fails, but will cause Tiled to show an “image missing” icon in the tileset view as well as the Properties view for those tiles. This should make it clear that there is a problem to fix and where to fix it.

Next, I allowed opening maps with broken references to images for Image Layers. It was already possible to edit these images so that was a small change. The image layers also benefit from the “image missing” icon in the Properties view.

Then I worked on actually allowing to open maps with broken tileset image references, for both TMX files and JSON maps. In this case, the “missing image” icon will currently show for any tile that was actually used by the map.

Now, there was only one type of external reference that could still be broken and that could still not be changed inside Tiled: references to external tilesets. So I used the remainder of the day and some part of the evening to work on this, and it’s almost done. The done part is where you can now actually swap one external tileset for another. What is still to do is that when you load a map with a broken reference to an external tileset, Tiled should probably set up some temporary dummy tileset to take its place until you have replaced it with the right thing.

Later that evening I spent some time to put up a general introduction about Tiled in the documentation. It’s something I had been working on previously and decided to finish it along with linking to the nice tutorials by @serapth.

Looking Ahead

Unfortunately, despite making good progress, I did not manage to get the wip/broken-links branch to a point where I could merge it into master. Getting to that point is my first priority, so here’s a list of what’s missing:

  • Maps referencing external tilesets that can’t load should still open.
  • The user should get notified about any broken references when opening a map, ideally also providing a fast way to fix the references with a UI like I’ve shown in the first update of this month.
  • The automatic tile index adjustment when increasing a tileset image width is currently disabled, and I’d like to look into re-enabling this in a more robust / controllable way.
  • The tileset view still needs to properly deal with non-consecutive tile IDs, as can happen now that the tile IDs are stable when removing images from an Collection of Images tileset.

These are the things I’ll set out to resolve upcoming Monday.

Finally I want to thank again my patrons and sponsors for their continuous support, without which I would not be able to do this work! If anybody else is reading this, please consider becoming a patron so that eventually I could improve Tiled even faster by working on it for two full days per week!

(Seanba) #9

I know it takes time but I’ve noticed your blog hasn’t been updated since May. I wonder if updates like this can go there so that the public gets a sense of Tiled’s active development?

I’d be interested to see if each blog post adds an extra patron or two. Just an idea.

(Thorbjørn Lindeijer) #10

Yeah, I should work on fixing this situation. The blog barely got any visitors except the few that go there when I explicitly linked to it, which is part of the reason why I decided to do release announcements and development updates on the forum instead. However, this means I should either remove the blog link from the main website or change the blog to aggregate such posts from the forum.

Actually the main thing I want to do regarding website development is to introduce a unified header to better integrate the forum and documentation pages with the rest of the website. It’s just that web development is so annoying and time-consuming…