Saturday, January 7, 2017

FMod - Moving away from Dropbox

Dropbox recently announced that it's removing the Public folder feature; all sharing will now be done through individually managed links. That's a serious problem for Abiathar updates, since Abiathar requires files to have predictable names and those links include a big random component. Therefore, I'll be stopping my use of Dropbox for Abiathar hosting.

Since I recently purchased some hosting for the PCKF and Keen Modding, I can use that. Today I copied the Abiathar files from my Dropbox to that server and changed the Abiathar code to look for updates in the new place. I currently have the files accessible at a subdomain, but I'll probably move them to a subdirectory instead so that if I get an SSL certificate for the forum, the updates will also be secured.

Friday, January 6, 2017

FMod - Unmanaged patches

One concern I and some Abiathar users have is that it's easy to forget that Abiathar is managing the patch file and then go on to modify the generated file; those modifications then get overwritten next time Generate Patches is used. There has always been a big warning at the top of the file about that, but even so, it's inconvenient to have to open up Abiathar and click a couple menu items just to tweak the patches.

Today, I added some logic to detect external modification of the patch file. If any new lines are added in the clearly marked spot, Abiathar offers to add them to the dependency file (ADEPS). If the user accepts, the unmanaged patches are added to the normal user-created patch section in the Patches window. The user can decline, in which case Abiathar will continue preserving them when writing out the automatic and in-Abiathar user-specified patches.

I also changed the patch emitter to not write out the CKPatch executable every time. If a file already exists with the right name and size, Abiathar assumes the patcher program is already ready to go.

Thursday, January 5, 2017

2016: Rise of the Super User posts

Looking back through the archives while compiling the Best of 2016, I noticed that this year, I wrote a lot of posts based on my Super User answers. That is, I first answered a question on Super User, then thought it would make an interesting blog post, so I trimmed it down a bit and posted it here. Browsing Super User - and Stack Exchange sites in general - is a great way to run into interesting problems that actually need real-world solutions. Evidently, my answers have helped some people (my "impact" counter on the activity page is over one million people now), and I hope republishing them here helps a few more.

I present the collection of SU-based answers.

Wednesday, January 4, 2017

Markeen - Threaded generation

Markeen can take quite a long time to generate a full level set now that the generator takes multiple passes and has more complex logic. The level generation itself takes place on a single thread, so the problem of generating several levels for one batch is clearly amenable to multithreading. So today, I rearranged the outermost loop to instead queue one thread pool work item for each level. As the levels come in, they are added to the level set object.

Sure enough, building a level set now goes a lot faster. The progress indicators in the console are now intertwined with each other, which looks pretty crazy and conveys no information; I'll need to figure out a system to show the progress. At least Markeen can now take full advantage of the system's processing power.

Monday, January 2, 2017

Abiathar Online - Remember the scroll position

The real Abiathar remembers the viewport positioning of each level when switching between them. That's especially important when going to the tileset to fetch a tile; resetting the level view back to the upper left upon return is jarring. So today I made Abiathar Online keep track of the scrollbar positions for each level and tileset. It required a little refactoring to make sure that all "change the current level" calls go through the part that stores the current X and Y in the level, but overall it was an easy and worthwhile change, and is now live on GitHub.

Sunday, January 1, 2017

Abiathar Online - Dropbox Saver now supports data URLs

Over a year ago, when I last tinkered with Abiathar Online (the web-based Keen Galaxy editor), I was greatly inconvenienced by the Dropbox Saver's inability to deal with data URLs. Without those, I had to put up a server to store the files until Dropbox can download them.

As of several months ago, that feature has finally been added! I already updated Abiathar Online to make use of it, so I can dispose of the echo server's code. The only parties involved in Abiathar Online I/O are now just the client web page and Dropbox.

The changes are live on GitHub.