February 2016 development updates


(Thorbjørn Lindeijer) #1

Week 4 (continued)

Tiled Sunday

As I wrote in last months’ update, I’m now taking Friday off from work and spending Sunday working on Tiled. This fits better in our family schedule and it should also allow more people to follow Tiled development live. Finally, it gave me another Tiled development day in week 4! (if your weeks start on Monday, like they do in the EU)

I was busy the whole day getting WinSparkle to work for the Tiled daily builds for Windows. Overall it went pretty well, but I needed to compile the latest version of WinSparkle myself because the latest release had encoding issues. I also had Tiled crashing mysteriously until I realized it was because the WinSparkle.dll was missing (if only it had just told me…). A lot of time was spent getting Qbs (the Qt Build Suite) to reliably produce an appcast file along with each new installer build, as well as dynamically create the tiled.rc resource file in order to embed the version into the Tiled executable. Finally I had to set it up to work on AppVeyor.

Unfortunately, I didn’t manage to get it fully working, mainly because there were still some problems with the MSI-based installer that I had set up in the previous week. So for now it lived on a wip/winsparkle branch.

Week 5

Each evening I got a little bit closer to having the updating feature work nicely. First to have AppVeyor upload the appcast file. Then to split up the appcast into 32-bit and 64-bit versions, because they were conflicting. Finally to make a host of improvements to the installer, fixing upgrade behavior with arbitrary switching of versions (also between 32-bit and 64-bit versions as well as different install locations). Then I felt confident enough to merge this into master, and I tweeted about the first auto-update enabled Windows daily build (it’s not too late to retweet ;)).

Tiled Sunday

With the auto-updating feature and the new installer struggles behind us, it was time to get back to editor feature development! I picked this pull request that adds support for adding predefined properties with default values per object type. It’s actually already one year ago that it was submitted. Unfortunately as is often the case, the changes in the pull request were only the tip of the iceberg and as such a long way from being in a state where it could be merged.

This work is done on the wip/objecttypes branch and you can of course still watch me struggle on livecoding.tv (unfortunately the live-chat isn’t available… in the future I want to try using a microphone to make things a little more interesting). Don’t forget to follow me if you want to get notified when I start streaming!

In any case, here’s the in-progress new Object Types Editor that will allow you to not only set a color per object type, but also define its properties and their default values:

This new window became necessary because the functionality outgrew the space in the Preferences dialog. Apart from editing the object types, the dialog also allows you to change the file Tiled is using or to import/export object types from/to some other file. These actions are hidden in the “File” menu.

While working on this feature, a few bugs were noticed with the object name labels. They were not removed as appropriate when deleting an object layer and their color wasn’t updating when changing object type or the color of its type. I fixed both bugs on the 0.15 branch and merged it to master. This caused the first time a new Windows installer snapshot was built since they got auto-update enabled, so that evening I was eager to see if it worked, and at least on my system the update went quite well!

Closed issues

  • #1089 Notify about new releases (update check)

Looking Ahead

Of course I want to finish the object property definitions feature as soon as possible. It’s actually a preparation for another feature that should go very well together with this change: to support typed custom properties. There’s a pull request for that as well, but it will similarly still require some work before it can be merged. In any case, that’s what I want to work on next.

Finally, I want to thank all my sponsors and patrons for their monthly support as well as the people (about 2 per day) who decide to pay for Tiled on itch.io! This support is making it possible for me to continue Tiled development at the current pace. I’d love to spend even more time on Tiled, so please don’t hesitate to join in!


(Thorbjørn Lindeijer) #2

Week 6

During the week I did not get around to Tiled much, apart from answering some questions on the forum and reponding to some e-mails. I did consider how to deal with multi-selection in the object types editor and made some preparations by inroducing a new AggregatedProperties class. Fortunately, Tiled Sunday went rather well.

Tiled Sunday

First of all I had promised to enable audio in my live streams to explain what I’m doing and what I’m thinking about while I’m coding. So this time I had a microphone set up. I was a little nervous about this when I started, but it was a nice experience and it allowed better interaction with those who were watching, so I’ll definitely do this every time. The videos may even be interesting to watch later now (starting from 14.02.16).

My first priority was to finish the work on the object type definitions that I had started the week before. One after another, I fixed and implemented all the issues I had commented on the pull request. By afternoon I was done and pushed the new object types editor to master. After lunch I still made a small visual improvement to the tool bar buttons, by putting them on a tool bar.

Then I continued with the pull request adding types to custom properties. Since its original author was too busy to work on my feedback, I merged it locally and then I worked through my own feedback instead. I also had to make the type selection work in the Object Types Editor. I finished those changes just before it was time for dinner preparations.

Later that evening, I fixed an issue where Tiled would fail to save objecttypes.xml when its directory did not exist yet and I made some tweaks to the layout to make it look better on OS X. However, I was still not comfortable pushing this to the snapshot builds because of two known issues. On OS X, the Object Types Editor has the tendency to swap behind the Tiled main window for some reason. And more importantly, I still need to make sure this change goes well with the JSON output.

Snapshots

I just mentioned snapshots, so let me explain that a bit. Previously, there were “daily builds” of Tiled that actually updated with every little change to master. People could try such a build anytime, but of course not every upgrade made sense and sometimes they would have known issues. Since this month both the OS X and Windows daily builds are auto-update enabled, so they will notify the user about any new build and offer an easy upgrade procedure. This is why I think from now it is important that such builds are done only when there is something meaningful to upgrade for, and there are no known issues that could cause loss of data.

So I’ve introduced a new branch called snapshot, which I synchronize to the master branch every time I think an update would be safe and meaningful. The OS X and Windows “daily build” installers are only updated for builds based on the snapshot branch. Soon I will rename things to “snapshot” everywhere to make this more obvious.

Now, of course I just finished two nice new features and I want to have it in the snapshots as soon as possible, but I still want to check the JSON format first. In general, I try to make sure that the snapshot branch can be made up to date with master for any meaningful change.

Closed issues

  • #365 Dynamic placeable objects with default properties for custom engine - Implemented
  • #367 Simple object type property library - Implemented
  • #877 Loading Objecttypes.xml with default properties - Merged
  • #1131 Added Types for Custom Properties - Merged
  • #1192 Ability to change the transparent color of individual objects - Closed
  • #1198 Update OSX install instructions for QT - Merged
  • #1199 Add XML-item to new map dialog - Closed

Looking Ahead

My first goal for tomorrow will be to check the JSON format and push these changes to the snapshot branch. Then it’s time to consider what to do next. I’ll probably have a look at adding the Properties view to the Collision Editor, which is all the more useful now that you can predefine properties. The overal goal remains to get closer to the Tiled 1.0 milestone.

Also, I’ll raise the DPI of my screen a little during my next livecoding.tv appearance, since for some people the code has been hard to read when the video was not maximed.


(Thorbjørn Lindeijer) #3

Week 7

I wanted to push the improvements I had made on the last Tiled Sunday to the new snapshot branch as soon as possible, but in the short evenings I was busy responding to e-mails and forum posts. By Saturday I finally found some time to write last weeks’ update.

Tiled Sunday

For whatever reason I initially forgot about looking at the JSON format and went straight for a pull request that I had scheduled for Tiled 1.0 (as you can see in the first screencast of that day). Fortunately, it only took one hour to merge and clean up the pull request, which was about adding the Properties view to the Tile Collision Editor.

The next thing I did was indeed to make the JSON format support property types. I also improved the Lua export format, avoiding quoting of numbers and booleans. Soon, the snapshot branch could be synchronized to master.

Then I decided to tackle that you couldn’t reset color values after setting them, which affected the map background color, object layer color and the transparent color for image layers. This required digging into the Qt Property Browser solution and looking how Qt Designer was adding a reset button to all properties. Eventually, I added a reset button to color properties and also made some fixes to color properties in the Qt Property Browser solution when dealing with the “invalid” color.

I still had time for another feature, so I worked on adding erasing functionality to the Terrain Brush, which is important for transparency-based tilesets. This was a tricky addition to work on since it touched somewhat hard to read code and I ran into several smaller issues as well. I ended up finishing it only late in the evening, but it was well worth it!

Closed Issues

  • #446 Delete background color property - Implemented
  • #778 Missing Object Properties in Tile Collision Editor mode - Implemented
  • #1062 Image Layer transparent color property cannot be reset once edited - Implemented
  • #1111 Terrain feature doesn’t work well with transparency-based tilesets - Implemented
  • #1207 Fixed compilation on Windows with MinGW and qmake - Merged
  • #1210 Prevent segfault when adding new property to many tiles - Merged

Looking Ahead

At the start of next month, my wife and kids will be away for a few days, and I want to use the additional free time at home to make progress with the editing of external tilesets. It’s the most difficult issue remaining for Tiled 1.0 and this seems like the right time to work on it.

I’ll definitely keep streaming. Even though it’s sometimes a bit of a distraction, I think it keeps me more focused and it’s also nice to have some people around who may be able to help. I’m looking for ways to make it more interesting, so feedback regarding this is welcome! See you soon again at livecoding.tv/bjorn if you’re interested!

As always, many thanks to everybody who is enabling me to continue working on Tiled at this pace, either by paying for it on itch.io, donating or being a patron on Patreon. I really appreciate it!


Tiled 0.16.0 released
(kawika) #4

ooh, love the terrain tool improvements! Good job!


(Thorbjørn Lindeijer) #5

Week 8

This week was again very busy, especially the end of the week when my parents visited for some days.

Tiled Sunday

I did not get to spend much time on Tiled development this day. Instead, I had a large amount of e-mail to catch up with and I spent some time thinking and writing about the problem of editing external tilesets, which is really the biggest issue to be resolved for Tiled 1.0.

A related discussion was about exporting tilesets to Lua, or in general to write-only formats. It’s really nice that Antoine is thinking about both of these problems as well and making suggestions.

GitHub Issues

  • #1212 Added MonoGame.Extended as one of the C# loaders - Merged
  • #1215 It is now possible to set probability of multiple tiles - Merged

Patreon

My Patreon campaign is making only slow progress ever since I’ve hit my first goal. If you’re enjoying Tiled, please consider becoming a patron! It would help tremendously if I could spend double the amount of time on Tiled than I can afford to do currently. Thanks!

Also, there is a new $100/month tier! Patrons pledging this amount can spend one hour pair-programming with me on Tiled, working on whatever we agree to pick up. You can learn your way around Tiled’s code, possibly improving your own skills, and contribute to a better Tiled at the same time.

Finally, I’ve adjusted my goal downwards from $1500 to $1250, taking into account income received through selling Tiled on itch.io.

Looking Ahead

Using the time I have as a result of my family being out for some days, I’m now knee-deep into trying to rearrange Tiled to support editing of tilesets alongside of maps, and I wrote an update about that specific topic on GitHub. I greatly appreciate any thoughts or feedback others have on this issue, so please don’t hesitate to comment.