selliott4 Posted April 3, 2017 Previously in the thread "Using wadlc and wadldc in the build" I asked if there are utilities that can be used display the difference between two WAD files as an image. This is my attempt at creating such a utility. I've created a script "wad-diff" that will do this. By default it generates a diff image for changed WAD files in the "levels" directory, but it can also be used to generate diff images for arbitrary git revisions. Here's one of my favorite examples: The above was generated for git commit 0c004ce which says "MAP05: Move tree aside to prevent the player from getting stuck". By diffing that revision we can see the tree that was moved. Unchanged pixels are white. Adds are blue and removes are red. You can generate this image with: Quote make wad-diff-display commit=0c004ce~..0c004ce As can be seen above I've added make targets that invoke the scripts. Target "wad-diff-display" displays the diff images produced via "display". By default the diff images are the size of the display, so normally you can see more detail, but I didn't want to post such a large image. It doesn't always work this well since sometimes Yadex displays different revisions of the WAD at different scales, but it works a lot of the time, especially for small changes. I've created pull request #430. 3 Quote Share this post Link to post
Linguica Posted April 3, 2017 Not quite the same, but I did something similar for the beta Doom 2 levels that Romero released a while back: https://www.doomworld.com/linguica/romerofiles/mapgifs/ 1 Quote Share this post Link to post
selliott4 Posted April 3, 2017 Nice. What tool did you use to generate those images? What I did is a bit of a hack (taking a screenshot of Yadex), so I'm open to using a better utility. 0 Quote Share this post Link to post
Linguica Posted April 3, 2017 I used OMGIFOL to generate map images at a fixed scale and then made GIFs from them manually. 0 Quote Share this post Link to post
selliott4 Posted April 3, 2017 But will it generate images with things? I'll look at OMGIFOL more tomorrow and possibly answer my own question. 0 Quote Share this post Link to post
Catoptromancy Posted April 3, 2017 Tool is nice. A nice bit easier to see changes than staring at a gif. 0 Quote Share this post Link to post
Voros Posted April 3, 2017 Interesting. A bit hacky, but over time it'll get improved. BTW, why is there a map07.wad in the PR? 0 Quote Share this post Link to post
selliott4 Posted April 3, 2017 Oops. Normally I'm pretty good at reviewing the files in my commits, but I was doing some last minute testing with map07.wad, and that change snuck by. I've create pull request #432 that is just like #430, but without map07.wad. 0 Quote Share this post Link to post
selliott4 Posted April 5, 2017 On 4/2/2017 at 10:40 PM, Linguica said: I used OMGIFOL to generate map images at a fixed scale and then made GIFs from them manually. I've downloaded devinacker's fork (seems to be the preferred one) of OMGIFOL. It looks like you used the included drawmaps.py to draw those images, which doesn't render things as is. I've enhanced OMGIFOL's drawmaps.py so that it renders things as little circles with random but consistent colors which I've submitted to devinacker as a pull request. Here's what MAP05 (the MAP used in the OP) looks like with my enhancement: The tree in question is a little purple dot, but this is not a diff, it's just the latest version of MAP05. Incidentally I was curious what OMGIFOL stands for. It's "Oh My God! It's Full Of Lumps!". So they get credit for humor :-) So this has potential to be a replacement for the screen capture of Yadex approach used by my wad-to-image script, but it will take more work to get the thing colors to resemble the things they represent, and even more work for them to be the right shape. Given that do you guys think you'll merge my pull request? It should be pretty safe in that the only code change it makes to an existing file is to add a few targets to Makefile that people don't have to use if they don't want to. And people can rework wad-to-image to instead use OMGIFOL in the future when and if they overcome the thing limitations mention above. 0 Quote Share this post Link to post
selliott4 Posted May 13, 2017 I know this in an old thread, but I wanted to let everyone know that I just created a utility for converting maps in WADs to images named 'wad2image" that's much nicer than the Yadex screenshot approach in my pull request. There are many options to control how the images are created. wad2image can select multiple maps from multiple WAD files and create images for those maps. wad2image can create animated GIFs to illustrate the differences between revisions of a map. I made a web page for it as well as a github page. Anyway, I don't know if there is still any interest in being able to see differences in revisions of maps, but if so maybe I can work on a new pull request. Linguica, You're in the credits file because as far as I know you came up with the idea of using animated GIFs to illustrate the difference between revisions of a map. Thanks for that. 1 Quote Share this post Link to post
Blastfrog Posted May 16, 2017 On 5/13/2017 at 10:44 AM, selliott4 said: Linguica, You're in the credits file because as far as I know you came up with the idea of using animated GIFs to illustrate the difference between revisions of a map. Thanks for that. It doesn't hurt anything, but that's kinda silly to credit anybody for that. I know for a fact that I did it before him, and I'm certain someone must've done it before me, too. 0 Quote Share this post Link to post
selliott4 Posted August 24, 2017 I've finally submitted a significantly overhauled pull request in part based on feedback I received. I hope it's helpful. Let me know what you guys think. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.