November 2015 development updates

(Thorbjørn Lindeijer) #1

This is a bit of a catch-up as I write about what happened in the past two weeks. Apart from Tiled Monday I’ve been exceptionally busy with my daughter getting her own room, which has meant days of packing, painting, moving furniture and relocating my PC twice. I’m still waiting on the delivery of some curtains to separate my desk from the rest of the bedroom, so that I can be more active in the evenings again. Indeed, I had to give up my office room.

Anyway, October was spent on adding long-missing features, most importantly the ability to load maps with broken links and the ability to change any file references from within Tiled. Also, it is now possible to change tileset parameters after the tileset has been added. All this closed most of the cases remaining in Tiled that would otherwise have required the user to edit the map file in a text editor, which is important for the 1.0 milestone.

Week 45

I started November finishing this work and making it ready for a merge into the master branch. There were a few missing pieces that I had listed in my last update.

So in the morning, I made it so that maps referencing external tilesets which can’t be found will open with a placeholder tileset, after which the reference can be updated in the Properties view (a97d42).

I spent the rest of the day to finish the interface that I had been working on earlier, which will pop up when opening a map with any broken links (dfa044). In this case, Tiled will now show the list of broken links at the top along with the option to ignore the problems or to locate any of the files somewhere else.

Week 46

Since the above interface will be visible alongside all the usual widgets, I had to make it update as links are being fixed by any means (91f1af).

Next, I worked on the issue of adjusting maps to an increase of decrease in the tileset image width. Previously, when Tiled opened a map that referenced a tileset image of which the width had changed, it would silently update the tile references, assuming that the additional width was added to make room for more tiles. This logic was sometimes unwanted and it was broken for external tilesets. And it had to be disabled now that the loading of images is delayed until later.

Now, Tiled will ask the user whether he wants to update the tile references, and this operation can be undone if needed (2ce340). Also, Tiled will ask the user for this type of adjustment when it notices the tileset width has changed when reloading a tileset image (d9f083). Previously this case was not handled at all.

With only the display issue remaining for image collection tilesets, I decided it was time to merge wip/broken-links to master. I’ll be working on improving the display of image collection tilesets upcoming Monday. In the meantime, please try a daily build, edit some of your references, break some links, and please report if you notice any strange behavior!

Looking Ahead

I think the next most important issue to work on is to allow editing of external tilesets, but this is at the same time the most tricky issue remaining on the Tiled 1.0 milestone.

At the start of December, I’ll decide whether to go for a 1.0 release this year or to release a Tiled 0.15 first.

Finally, many thanks to all my patrons and those who’ve donated! Without your support I would not have the time to do this work!

(Thorbjørn Lindeijer) #2

Week 47

This was an eventful week for Tiled, with the release of an RPG Maker MV plugin that allows using Tiled maps in RPG Maker games (with increased flexibility in tile size and layer usage) as well as the announcement of the Endless Legend - Forges of Creation DLC that added support for creating custom Endless Legend maps in Tiled (leveraging its support for hexagonal maps). I think this is very exciting and I’m curious to hear the feedback from these communities.

Tiled Monday

I started the morning by fixing up the tileset view to not display empty entries where tiles have been removed from image collection tilesets (63bf72). This was a problem caused by not shifting tiles around anymore, which was done to avoid breaking tile references in other maps possibly referencing the same (external) tileset.

Then I tackled a somewhat related issue, which was to allow changing the column count of image collection tilesets. So far, the column count had been hardcoded to 5, which was obviously not the perfect match for every collection. Now, it can be configured in the tileset properties (2e953f). In the future, I may also add a dynamic wrapping mode, but for now a configurable but fixed column count is meant to help group together related tiles and finding tiles by location.

A crash had been reported with very long layer names, and I wanted to fix this next. It turned out that it was due to the layer name in the status bar, and at first I just tried to make it elide. Since a QLabel apparently can’t elide, I decided to do what I wanted to do for a while already anyway, and turn it into a combo box (66ba56). So you can now see all layers and switch between them directly from the status bar! Neat, isn’t it?

Lastly I searched for a small Tiled 1.0-relevant task that I could still complete before it was time to make dinner, and I decided to fix issue #446, so now when you pick a transparent background color for your map, the transparency is preserved as expected.

Closed Issues

  • #466 Minor: backgroundColor.alpha in Map Properties is not saved - Done
  • #1081 “Collection of Image” ext. Tileset with TSX and images in different subfolders only shows empty map - Done
  • #1090 Flexible column count for image collection tilesets - Done
  • #1118 Bug with using “Remove Tiles” from a Collection of Images Tileset - Done
  • #1136 Long name of layer leads to crash - Fixed
  • #1138 Need properties for placed tiles - Duplicate

Looking Ahead

I’ll continue to make an effort to close as many Tiled 1.0-relevant issues as possible. I don’t have a particular order in mind, but the editing of external tilesets is still the most scary one. It probably means I should try to deal with that one first.

(Sdrib) #3

Great update again.
Love Endless Legend, excellent game!

(Thorbjørn Lindeijer) #4

I’m sorry to be catching up again, but it has been a busy month overall. I don’t think December will be different, but I’ll try to prioritize these weekly updates to let you know what I’ve been up to.

Week 48

Tiled Monday

While making the screenshot for the previous development update, I had noticed that the layer combo box had checkboxes on Windows and I set out to remove those first. I also noticed a crash when deleting the bottom-most layer, so I fixed that as well. While working on and testing this, I saw the current layer was not always matching with the selection in the Layers view after removing a layer. That bug must have been there since a while, but in any case I fixed it now.

After lunch, I made a small fix to the broken links widget introduced earlier in November to make it hide automatically again when all broken links are fixed.

Then, I could finally set out to work on the editing of external tilesets. This is going to be a very tricky feature to add because external tilesets basically need their own undo history, yet their state is closely related to the open maps, which refer to tile instances that need to stay valid. It is also problematic in terms of user interface, which probably needs another set of undo/redo buttons.

In any case, I tried to prepare as much as possible by introducing a TilesetDocument class that would wrap a Tileset instance and store its undo history and I did some cleanups just because looking at old code is sometimes painful. I’ve also moved the TilesetManager and related classes into libtiled, which is necessary for sharing external tileset instances among maps loaded by plugins. Since the bigger changes here were at this point mostly experimental, I pushed it to the wip/tilesetdocument branch.

Week 49

Tiled Monday

While I hoped to make good progress with the editing of external tilesets, I ran into one open question after another as to how this should be coded. The main problem being that internally Tiled is entirely built around a MapDocument class that not only keeps track of a map’s editing history but also provides all the notification signals necessary to make the UI update to changes.

So when moving some editing operations up to the new Document class shared with TilesetDocument, those signals come from another source and parts of the UI (like the Tilesets view and Properties view) now have to keep track of both types of document. So this was getting messy. Even more so, when a tileset can be either on its own or embedded, which means that sometimes edits to a tileset need to go to its own undo stack, while in case it’s embedded it would need to use the undo stack of the map. In the end I still have a large unfinished change stashed but I think it will be better to let this wait for now.

Other things I did were to hook up the Mac Mini to bring back OS X daily builds and I had to fix the updating of the Patreon progress bar on the website due to the new Patreon page design.

Closed Issues

  • #85 Isometric map issue with odd numbers - Fixed by PR #1126
  • #1145 tmxrasterizer does not report write errors - Fixed

The tmxrasterizer bug also caused me to find a crash when trying to rasterize maps with external tilesets, which I’ve fixed as well.

Looking Ahead

I’ll drop the external tilesets feature for now given how tricky that’ll be and instead will focus on bringing you a Tiled 0.15 late December or very early January. My plan is to do a string freeze (usually also feature freeze) starting 21st of December, giving me still three days to work on it before then.

Overall I think Tiled 0.15 is looking to be a welcome new release, already fixing some important issues and bringing several nice new features!

(Thorbjørn Lindeijer) #5

A post was split to a new topic: December 2015 development updates