Okay that was funny. I never thought of even trying Brutal DooM + Chex Quest. Sounds awesome.
Although I’d played a little with Chex Quest before, I never tried it on the DooM source. Oddly enough it’s Ultimate DooM. In d_main.c you can do some simple test for chex.wad and pass it off as the ‘retail’ version.
Or you can simply just rename chex.wad to doom.wad or doomu.wad. Many of the strings for DooM are compiled into the EXE, not taken from the WAD file (although it could have been, I guess it was to prevent people from making overtly cheeky mods?).
So firing up the wad under my crappy DooM port thing to MS-DOS (for the sane people just use some other Win64/OSX/Linux thing like zdoom), and when selecting an episode you’ll see the Ultimate DooM levels.
Wait? What? I though Chex Quest was a ‘total conversion’ WAD. Well it turns out that it is, and it isn’t. They replaced a lot of the default stuff from a retail version of Ultimate DooM. And what they didn’t replace, well it’s still there. And yes that does mean everything outside of the first 5 levels are the original DooM levels. And that includes the music as well!
Well isn’t that surprising! And yes that means that it’s possible to just replace the first 5 levels with the default DooM levels and have that reverse conversion. In the same way the menu screens are very Chexy too:
It certainly gives that kid like feeling to it. Although the replacement Barrons of Hell are a little too big so they do look kind of silly.
So as always I’m late to the party. I’m sure someone out there didn’t have the retail version of DooM and instead used Chex Quest for those LAN games. Although it does detect that the WAD has been modified so I don’t think it would just be all that fine.
Not that finding the original WAD files, or source to the maps, and just compiling them yourself is all that difficult, but I guess it is something else to load up.
Ok, so since I’ve been playing around with the Freedoom assets, I wanted to process all the assets and then make them into an iwad. And for the graphics this meant generating a simple color cube palette and then transforming all of the images to match that palette. And the results were, while recognizable as DooM, they are drab.
And yes, it’s gray, and drab. So UK. And there is another problem, many of the ‘graphics’ assets were a mix of PNG and GIF, and it turns out that in the GIF format you usually have a single color set as your transparent color, and it’ll get cut out automatically. In this case the transparent color is cyan. However there is some cyan still in the image!
So the best way I figured to ‘fix’ this was to do a straight conversion using Imagemagick. So I loaded up paintbrush of all things and noticed that for some reason the colors had bled on the gif’s I had from the Freedoom pack I’d downloaded. And that there were actually 3 cyan colors that needed to be purged. In this case in hex they are 0x00fefe, 0x00f2f2, 0x02f6f5, and the one that they should have been, 0x00ffffff
So I had to run convert like this against all the GIFs that I needed to fill in the graphics that I’m currently not processing in Python. Now the images actually look right, no surprise cyan, but my palette still sucks
Although the Freedoom team has told me that it’s far easier to just use the DooM palette as their assets use that palette and it’ll just work. But I’m too stupid for that. One great feature of Imagemagick is that you can hand it an image, and ask it to reduce it to any arbitrary number of colors, and it’ll do a great job of it. And while that is great for a single image, that doesn’t help me when I’m talking about thousands of images. Except Imagemagick also has another great ability which is to paste a new image to the right of an existing one. So with a little creative use of the make command I can then build a single giant image that contains all of the artwork. Isn’t that great?
Although great care and detail went into the original DooM palette selection we can throw all of that away, and let a program stitch everything together, and then have it analyze the entire mess, and come up with the ‘ultimate palette’ that works best with everything. Although one word of warning it takes well over an hour on an i7 to just stitch the images together (I should have setup a RAM disk) but it only took about 10 minutes for Imagemagick to process the blob image to come up with 255 colors that work best across the entire image set.
With the reduction done, the next thing to do is to create a ‘palette image’, which is one pixel for each color. This is the palette that we will use to ‘reduce’ all the images against. It’s more so to let Imagemagick do the hard work of selecting a palette.
And then the next step is to process this palette with dmutils dcolors. While it is primarily designed to use the LMB file format from Amiga fame, it wasn’t too hard to modify it to read a palette file directly, and let it add in the ‘red pain’ color shift, along with the green ‘bio hazard suit’ effect. The color map it generates is totally corrupt at the moment, so I’m using the old perl program to generate one based off of the palettes.
Indeed it is something so crazy that I really don’t want to even do it a second time to make sure my process was reproducible. However compared to before, I think the results speak for themselves:
So while it does take the better part of forever to go through all the images like this, it certainly gives zeeDoom a little more ‘building the world from scratch’ type feel.
Now what is great is that the Feeedoom folks have had the whole ‘apple pie’ stance to their project, with everything included. However they have drifted tools, build processes and other methodologies through the years. But thankfully the full archives are online, so I could go through and piece stuff together to my liking. Of course this all needs various tools, and oh boy does it ever need tools. You need:
a C pre-processor
A Unix’y build environment, I used the ancient MSYS
And probably many more I’m forgetting.
The first was to compile the levels. I used Ron Rossbach’s ancient IDBSP, a C port of iD’s command line Objective C level compiler. I did run into two slight issues, the first is that Ron’s tool expects their to be a line in the level’s dwd file telling us the name of the wad it’ll compile to, which of course is missing. The other is that I suck a makefiles, and just cheated forcing the tool to use a .wad extension on whatever .dwg it converts. And with that out of the way, I had the levels all built.
However that is where I found out the hard way that Freedoom doesn’t target something like my goal of being able to run this wad with the original DooM v1.1 release. The first problem is that Freedoom uses a different palette set, where it looks like it should be deeper? I’m not sure, but one thing was for sure everything looked like a rainbow sea of wrong and any vanilla or chocolate engines. And that is where I got a fun chance to play with ImageMagik. It really is quite powerful.
The first problem of course is the palette. Buried in the Python build scripts is a Perl fragment for generating a palette, and the all important playpal.lmp & colormap.lmp. I also got to spend a lot of time trying to extract that palette and do something useful with it to no avail. But googling led me to VGA_palette_with_black_borders.png, on Wikipedia of all things. So using this as a base I could convert, dither, and re-map the higher color Freedoom artwork into something that would play nice with Vanilla Doom. The downsite is that I didn’t try to find out exactly what assets a DooM version 1 wad needs, so I converted them all. On a good Xeon or i7 it takes about 10-20 minutes all the images. I can’t even think about how slow this would be using a 486, 68040 or MIPS.
Vanilla DooM v1.1 only plays audio at 11,000 Hz, 8bit deep. All the later ones needless to say use better sampling, and once more again Freedoom was at a higher level. I used sox to re-sample all the audio into the lower frequencies.
Later engines also are capable of directly playing MIDI files, and taking advantage of OPL3 chips, instead of v1.1’s OPL2 level. Thankfully Natt’s midi3mus is still online, and I was able to use this to convert Freedoom’s MIDI into the more restricted MUS format.