Things about Doom you just found out

1 minute ago, Arctangent said:

Well, I doubt the duplicate entries are because the renderer can't support a full 8-bit palette, especially since 250 is a really weird number for something like that. Didn't know the palette only had 18-bit color space, though - is that due to the format of the PLAYPAL lump, or can PLAYPAL support 24-bit color that's then converted to 18-bit by the engine for the sake of the renderer?

The duplicate entries are because id screwed up, I don't remember the exact number. The palette is less than optimal. It's a lot better than Wolfenstein 3d, which uses the default colors from Deluxe Paint, this explains the slightly odd color scheme in that game. The 18 bit stuff is part of how some VGA mode(s) work. Doom tells the graphics card which colors each index is mapped to. So when you get hit in Doom by a bullet, pick up an item, wear a rad suit etc, all it does is upload a new palette and draw with this palette instead of the default one until it swaps to another palette again. This technique is called palette swapping and is very common in many games of the era.

Doom doesn't really tell the gfx card to render something in red or dark red, it tells it to render that pixel with the color in palette position X. Change the palettes and you change the color of the entire game.

Storing each color as 18 bits would probably be easier on the hardware they had at the time and would use less memory. Since you can only use 256 different colors at once anyway, there wouldn't be much added fidelity in going from 6 to 8 bits per channel. If I'm not mistaken older versions of doom use mode 13h while later uses a 'mode x'. Read up on Abrash Black Book for more information about this, it's freely available as pdf.

Share this post


Link to post

For a good demonstration what can be done with color cylcing and palette swaps, take a look at: http://www.effectgames.com/demos/canvascycle/?sound=0

Try looking at the same image with different palette versions. the image is the same, only the colors change.

It should be possible to make a doom wad with a custom palette where you would only see certain details when you're wearing a rad suit or taking damage. A very simple demonstration of this would be to map a few colors to all black in the default palette, but when you're wearing the raid suit the colors map to different shades, allowing you to see hidden writing. Step it up a notch and you could hide demonic messages and pentagrams that only show up when you take damage...

7 people like this

Share this post


Link to post
38 minutes ago, zokum said:

It would be interesting to see if anyone could parse the wad file color palette entries and give us the exact result.

rjy@vile /tmp % deutex -get playpal
i WR19 Reading WAD /usr/share/games/doom/doom2.wad:     (2919 entries)
i WR19 Reading WAD /usr/share/games/doom/doom2.wad:     (2919 entries)
i PL05 Palette is Doom
i GE02 /usr/share/games/doom/doom2.wad: PLAYPAL: extracting
w PI10 Picture PLAYPAL: width < 1 (0), skipping picture
i AA99 Normal exit

rjy@vile /tmp % convert -size 256x1 -depth 8 rgb:playpal.lmp -append -format '%k\n' info:
3386

2m9CBbc.png

 

Edited by RjY
1 person likes this

Share this post


Link to post
3 minutes ago, RjY said:

rjy@vile /tmp % deutex -get playpal
i WR19 Reading WAD /usr/share/games/doom/doom2.wad:     (2919 entries)
i WR19 Reading WAD /usr/share/games/doom/doom2.wad:     (2919 entries)
i PL05 Palette is Doom
i GE02 /usr/share/games/doom/doom2.wad: PLAYPAL: extracting
w PI10 Picture PLAYPAL: width < 1 (0), skipping picture
i AA99 Normal exit

rjy@vile /tmp % convert -size 256x1 -depth 8 rgb:playpal.lmp -append -format '%k\n' info:
3386

2m9CBbc.png

 

I don't think you have removed all the duplicates.

Share this post


Link to post
1 minute ago, zokum said:

I don't think you have removed all the duplicates.

-format %k gives a calculated count of unique colours. With and without -unique-colors gave the same result, 3386. If there were no duplicates, the result would be 3584 (i.e. 256*14).

rjy@vile /tmp % convert -size 256x1 -depth 8 rgb:playpal.lmp -append -format '%k\n' info:
3386

rjy@vile /tmp % convert -size 256x1 -depth 8 rgb:playpal.lmp -append -unique-colors -format '%k\n' info:
3386

rjy@vile /tmp % convert -size 256x1 -depth 8 rgb:playpal.lmp -append info:
rgb:playpal.lmp RGB 256x14 256x1+0+0 8-bit sRGB 0.000u 0:00.000

rjy@vile /tmp % convert -size 256x1 -depth 8 rgb:playpal.lmp -append -unique-colors info:
rgb:playpal.lmp RGB 3386x1 3386x0+0+0 8-bit sRGB 0.000u 0:00.000

 

Share this post


Link to post

Doom uses palette 0, 2-8 and 10-13. 1 and 9 are unused. There's also an error in the palette format. The format is 24 bpp, but vga only supports 18bpp so there could be some rounding down. The two unused ones should lower it by about 500. The rounding error is a bit harder to calculate properly.

Share this post


Link to post
16 hours ago, zokum said:

Doom uses palette 0, 2-8 and 10-13. 1 and 9 are unused. There's also an error in the palette format. The format is 24 bpp, but vga only supports 18bpp so there could be some rounding down. The two unused ones should lower it by about 500. The rounding error is a bit harder to calculate properly.

After using a hex editor to delete the two unused palettes from the playpal file, the convert command gives: 2901

 

I wrote a script to skip the unused entries more easily and to truncate the colors' two least-significant bits, this produces:

$ ./pal_total.php -d PLAYPAL.doom 
Doom uses 14 palettes with 3386 unique colors
$ ./pal_total.php -u -d PLAYPAL.doom 
Doom uses 12 palettes with 2901 unique colors
$ ./pal_total.php -u -t -d PLAYPAL.doom 
Doom uses 12 palettes with 2521 unique colors

$ ./pal_total.php -u -t -h PLAYPAL.heretic 
Heretic uses 11 palettes with 2366 unique colors
$ ./pal_total.php -u -t -s PLAYPAL.strife 
Strife uses 12 palettes with 2518 unique colors
$ ./pal_total.php -u -t -x PLAYPAL.hexen 
Hexen uses 28 palettes with 5851 unique colors

So there are your answers, assuming there are no errors in the script.

Edited by Xymph

Share this post


Link to post

The Plutonia Experiment is 23.01% Chaingunners and 13.80% Revenants. Also, MAP11 of Plutonia, Hunted, is the only map in Final Doom that doesn't have at least one Chaingunner.

Edited by Archvile Hunter
7 people like this

Share this post


Link to post
25 minutes ago, Archvile Hunter said:

The Plutonia Experiment is 23.01% Chaingunners and 13.80% Revenants. Also, MAP11 of Plutonia, Hunted, is the only map in Final Doom that doesn't have at least one Chaingunner.

I guess the Chaingunner% and Revenant% is a good standard for people looking for WADs that they're going to play. Sadly it's difficult to do these statistics.

Share this post


Link to post
11 hours ago, GarrettChan said:

I guess the Chaingunner% and Revenant% is a good standard for people looking for WADs that they're going to play. Sadly it's difficult to do these statistics.

I wonder if there is a utility that compiles these sort of statistics. I remember seeing a thread by @fraggle regarding the difficulty of Freedoom, with statistics about monster hit points and health and the like. Maybe it was something he wrote himself. Still, it would interesting if there was a utility for the kind of monster and related statistics you're talking about.

1 person likes this

Share this post


Link to post

I just learned about the reload hack in vanilla Doom. Also when using the -file parameter, adding a tilde (~) character before the filename causes the WAD to be reloaded each time the level is restarted, allowing the level to be edited in parallel without restarting the game.

4 people like this

Share this post


Link to post
8 hours ago, Xyzzy01 said:

I just learned about the reload hack in vanilla Doom. Also when using the -file parameter, adding a tilde (~) character before the filename causes the WAD to be reloaded each time the level is restarted, allowing the level to be edited in parallel without restarting the game.

Oh, god, I wish we'd known about this in 1994. I'm not saying it would have magically made all our levels good but a lot of dodgy texture alignment and suchlike was just because the edit/test cycle was so slow...

5 people like this

Share this post


Link to post

I just found out that Maximum Doom was a thing, and that it had SOOOOOOO many PWADs.

Share this post


Link to post

Not "Just found out" ... but giving Memorial a playthrough, and was reminded as a kid (at least the first 3 years of playing Doom 2 at least) ... I ALWAYS used IDCLIP to get through the starting door of Map 18...Shootable doors weren't really common at ALL in these games, and they just kinda throw one at you randomly...

5 people like this

Share this post


Link to post
On 2/2/2018 at 0:21 PM, Resigned_34 said:

I just found out that Maximum Doom was a thing, and that it had SOOOOOOO many PWADs.

It's a real garbage heap, although pretty dang novel back in '96 when I lacked an Internet connection. I've sometimes thought about wading through it again, to see if there are any gems, but there's a couple thousand mods at least (many of which are literal 1994 wads) which doesn't sound like a very attractive proposition. Amusingly, it has a normal "M" rating for violence; I suppose id might have overlooked the infrequent erotic textures that occasionally adorned a wall texture or two, back when that sort of thing was, I suppose, in vogue.

Edited by GoatLord
1 person likes this

Share this post


Link to post

maximum doom includes a few jim flynn levels so its not a total waste

 

my new realisation: You can make a doom level with new textures, and the world doesn't end EVEN IF none of those textures has the UAC logo stencilled on

stop repping for the corps guys, you don't benefit, they only respond to sabotage

Share this post


Link to post

Maximum Doom has a few hidden gems in it, you'd be surprised. Sometimes I load a random PWAD out of it just to get some inspiration and experimental vibe going.

 

 

Share this post


Link to post

i never  noticed that

1 person likes this

Share this post


Link to post

The new lamp sprites in Doom2 seemed to be used very little too. Pretty much everywhere it's just the torches.

Share this post


Link to post

I found out the other day that you can zoom out to hide the HUD and - more importantly - see more of the weapon sprites.  The chaingun and plasma rifle look MUCH better this way.  I played through Doom II and probably used those weapons more than I ever have in my life.

4 people like this

Share this post


Link to post

john romero is the first man on earth to have successfully killed himself and lived

4 people like this

Share this post


Link to post

You can get 117% armor on E1M1 of Doom 1 (not including secrets). 

 

Share this post


Link to post

I recently found out that you can break GZDooM a little by having your HP overflow, causing you to become a zombie and completely messing with the game's logic. In fact, you literally can't shoot if you do overflow your HP XD

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