Back

MapDiffBot & IconDiffBot


A lot of my hobby projects revolve around BYOND/Dream Maker, which is an old language for creating games. However, bringing an old language in line with modern development methodologies, is not the easiest thing in the world, but it is still doable.

As part of the game language, there are specific files for icons/sprites, and in game maps/worlds. The icon file can hold multiple sprites, each with a named ID, and multiple directions or animation frames tied into the same state ID, but the actual image “data” inside the file is just one large PNG canvas, with some text metadata to split it up into the frames and state IDs. Since these files are binary, you cannot easily review them in code review when someone creates a pull request, and having to download them every time was not user friendly at all.

On the other hand, Map files are plaintext files, however they are just dictionaries of tile keys, and then a large array of those dictionary keys to show what is where. If you reverse lookup the key, you can see what is on a tile, but only the class name for it, no idea of what it is. If you want a graphical representation, you must look inside the code at the class name, find its icon and icon state variables (which is not always easy as they are usually defined on a parent class), which made reviewing these tiresome.

Example of a dictionary key inside a map file

Enter MapDiffBot and IconDiffBot. While I did not initially create these, I am now the project maintainer and primary host for them. These programs are GitHub applications which run whenever a pull request has changes. They are capable of reading the changed files, rendering before and after images, and even stitching the frames into a gif in the case of animated icon states.

These tools handle about 500,000 requests per month, and currently sum to ~350GB of data stored on my servers. I take hosting these seriously and pride myself in having 99.9% uptime over the course of a 90 day period.