The Dink Network

Mapnuke for Windows

March 25th, 2024
Score : 4.0 tolerable
Peasant They/Them Australia
Not too long ago, I was troubleshooting a Freedink bug in which certain map screens caused a segfault while attempting to load. To cut a long story short, it was because the engine was expecting that map.dat screen numbers would never go beyond the nominal maximum of 768. This amount of 768 was exceeded on large maps such as in Friends Beyond 2 and 3 due to the inner magic of how this particular program operates.

As mentioned in the description, MapNuke doesn't really nuke anything. Instead, it hides screens by removing the reference to them in dink.dat's screen index by setting values to zero. This makes DinkEdit think that there's no screen at that location when in fact the one that was there is still lurking in the bowels of map.dat. When creating a new screen over this apparition, a new one is added to the end of map.dat and the reference in the index set to this new screen, bloating it a little more. To do all this properly would require map.dat to be rewritten with the screen's data omitted, with every subsequent screen index reference in dink.dat decremented by one to account for its absence.

Checking the index data of Friends Beyond 2 reveals that some screen indices go above 800 meaning that MapNuke was used on more than 30 screens during the development process. At the end of all this bug-squashing I was quite puzzled. Why would someone use MapNuke that many times if all available screens were to be filled-in anyway? Surely the effort invested in closing DinkEdit and running an external program where you click a ton of boxes was greater than simply batch-removing all the sprites on those screens with Alt+Delete and then painting over the existing tiles, seeing as they're going to be re-created, and re-tiled all over again anyway once MapNuke's finished with its screen-hiding.

Even after excluding this possibility, I can't really understand why anyone would truly need to remove a screen created in DinkEdit. If you're removing them for the sake of preventing the player from walking onto them, there should already be some sort of obvious border defining the size and scope of the world, the lack of which is an indictment upon the map designer's skills unless it's a rare case of something like "Happy Sunshine Land". Perhaps you accidentally cloned the wrong screen using DinkEdit's helpful screen-cloning feature, but this isn't a necessary scenario for MapNuke either as the intended one may be retrieved by pressing "L" and importing from the same map. Otherwise, the only feasible use case I can think of involves anal-retentives who are petrified by the prospect of someone in the world loading up DinkEdit and discovering the Enter key was accidentally pressed at some point while in the throes of map-editing.