Sunday, February 23, 2014

FMod - Pencil Tool

After speaking at some length with a new private beta tester last night, I got all kinds of new stuff to implement. Most importantly, I discovered that people really do like having the free-drawing pencil tool and seeing a dynamic selection rectangle.

Today, I fixed quite a few bugs, notably the one that causes linkable infoplane values to not stop rendering when they're replaced. There was also an unmanaged memory leak in the links rendering plane, which caused a crash after changing a lot of tiles. I managed to get a detach tileset option, which spawns a window kind of similar to a Keen Next thing. Implementing that required breaking and fixing a whole bunch of tileset management stuff and the extension API. Actually, I might end up changing it to be inside the main window, which would probably be more useful.

The most interesting thing I added today was a pencil tool, which is kind of fun to use. It also took some doing to implement, this time a tool-aware undo action. That was necessary to have the undo stack not get corrupted if the user presses Cntl+Z while drawing with the pencil. In debugging that tool, I found and fixed the first bug mentioned in this post. Actually, the pencil was one of the most challenging tools so far: I had to add an entire hook to the extension API, which was the mouse drag thing.


No comments:

Post a Comment