Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
selliott4

I've created a utility that displays differences in WAD revisions visually

Recommended Posts

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:

 

map05-tree-moved.png.0d69e938976df111fc4d62c64c99d52d.png

 

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.

Share this post


Link to post

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.

Share this post


Link to post

I used OMGIFOL to generate map images at a fixed scale and then made GIFs from them manually.

Share this post


Link to post

But will it generate images with things? I'll look at OMGIFOL more tomorrow and possibly answer my own question.

Share this post


Link to post

Interesting. A bit hacky, but over time it'll get improved.

 

BTW, why is there a map07.wad in the PR?

Share this post


Link to post

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.

Share this post


Link to post
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:

 

map05-from-omgifol.png.e0b68ff248885f488045c3e1e30223f9.png

 

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.

 

 

 

Share this post


Link to post

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.

Share this post


Link to post
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.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×