Jump to content

Things about Doom you just found out


Sigvatr

Recommended Posts

Memfis said:

Hmm, this is quite interesting. I guess you could see speedrunning as finishing the game as fast as possible or as making the game think that you were as fast as possible. Has anyone ever done something like this with other games? Preferably involving something more complex than editing an *.ini file or something.



-edit-

Here's one with commentary:

Share this post


Link to post

Not an "official" thing... But when I try to make the monsters infight many times the monsters behind don't shoot, they just keep walking or change direction.

Share this post


Link to post

According to the source code, it's really nothing more than your bad luck, because monsters don't detect if there are any things between them and the player, their line of sight check can only be blocked by solid map geometry.

Share this post


Link to post

The monsters behind other monsters are further away, so they have smaller chance for attack. Just get closer then.

I feel that infights are way too effective. Mixed groups kill each other and all I need to do is show my face for a bit, and then go hide behind a corner, or circle around them. After a while, they're all dead and I haven't fired a shot.

Share this post


Link to post
Jimi said:

The monsters behind other monsters are further away, so they have smaller chance for attack. Just get closer then.

You are apparently right. This is a part of P_CheckMissileRange() function, called by each A_Chase (standard walking codepointer) if the monster has a missile attack.

    dist = P_AproxDistance ( actor->x-actor->target->x,
			     actor->y-actor->target->y) - 64*FRACUNIT;

...
    
    if (!actor->info->meleestate)
	dist -= 128*FRACUNIT;	// no melee attack, so fire more

    dist >>= 16;

    if (actor->type == MT_VILE)
    {
	if (dist > 14*64)	
	    return false;	// too far away
    }
	

    if (actor->type == MT_UNDEAD)
    {
	if (dist < 196)	
	    return false;	// close for fist attack
	dist >>= 1;
    }
	

    if (actor->type == MT_CYBORG
	|| actor->type == MT_SPIDER
	|| actor->type == MT_SKULL)
    {
	dist >>= 1;
    }
    
    if (dist > 200)
	dist = 200;
		
    if (actor->type == MT_CYBORG && dist > 160)
	dist = 160;
		
    if (P_Random () < dist)
	return false;
		
    return true;

"dist", after the "dist >>= 16;" command, represents rough distance of the monster from its target, measured in standard map units. P_Random() returns a pseudorandom number between 0 and 255. Obviously, distance can never be higher than 200, due to the "if (dist > 200) dist = 200;" command. The missile attack will happen only if P_CheckMissileRange() returns true. It can be aborted if "(P_Random () < dist)" Therefore, monsters that are closer to their targets than 200 units have increasingly higher probability of attacking. But all further monsters should have the same low probability. Except certain monsters (MT_UNDEAD = Revenant, MT_CYBORG = Cyberdemon, MT_SPIDER = Spiderdemon, MT_SKULL = Lost Soul), whose distance is divided by two (by the "dist >>= 1;" command), therefore their probability of attacking will be increased up to 400 actual map unit distance.

Share this post


Link to post

I knew that a monster don't notice if there's another monster in his line of sight , but not this thing of the distance, it's cool to know it now.

Share this post


Link to post

The yellow key door with items on E1M3. Mind blown. After playing for like 15 years I didn't know that was there.

I've been playing that map for years and never really thought about what the yellow key is even for. I kinda forgot that I collected it earlier. I randomly saw it when watching a video of John Romero play coop with some guy.

Also years ago when I finally found how to get to the soul sphere on E1M3 and the other secret area. E1M3 has the friggin coolest secrets. This was about 5 years later since I started playing DooM.

Share this post


Link to post

The most pain resistant enemy is the Archvile (painchance 10/256), and the least pain resistant enemies are the Lost Soul and Commander Keen (painchance 256/256), closely followed by the Romero Head (painchance 255/256). Whether it's 255 or 256 actually makes a difference. I didn't want to believe it at first, but according to the source code:

    if ( (P_Random () < target->info->painchance)
	 && !(target->flags&MF_SKULLFLY) )
    {
	target->flags |= MF_JUSTHIT;	// fight back!
	
	P_SetMobjState (target, target->info->painstate);
    }
P_Random() returns a random number between 0 and 255, so if the painchance is exactly 255, it's still possible that "P_Random () < target->info->painchance" will evaluate as false, if the random number was exactly 255. But with painchance 256, it is already certainly true.

Share this post


Link to post

I hardly knew about the level changes until I started experimenting with downgrade patches. Doom version 1.1 was particularly interesting, as a lot of familiar things were either missing or different.

Oh, in 1.0 (0.99), the blue door in E1M9 asks for a blue "skull key" rather than a keycard :P

Share this post


Link to post
DeathMetalAccountant said:

The chainsaw makes a start-up noise if you die while holding the trigger

No, it doesn't. It's just the standard saw-attack sound. This sound (DSSAWFUL) is actually much longer than how it normally sounds in the game. The game only plays the first few tics, then either repeats the sound from the beginning (if you still hold the trigger), or mutes it in favor of chainsaw's idle sound (if you stop holding the trigger). It's logical, because chainsaw's attack codepointer makes the attack sound every time it's called, and chainsaw's weapon-ready codepointer makes the idle sound every time it's called, while muting any previous sound the chainsaw was making at the time. None of these situations happen when you die while holding the trigger - chainsaw will enter its weapon-lowering state, not another attack state or weapon-ready state. That's why the saw-attack sound plays to its end. But it's a different sound that the start-up noise.

Share this post


Link to post

And you get the same sound if you exit a level while holding the trigger with the chainsaw equipped.

Share this post


Link to post

Each and every animated floor in E3M3 is damaging, including water in not only the inescapable sidepits of the bridge in a secret room, but also in the "cellar" next to the Invulnerablity sphere. Basically E3M3 is also one of the few levels (if not the only) in Ultimate Doom to feature all of the liquid substances in the original game (minus the brown kinds of slime which are D2-exclusive), though quite a few do appear on the ceilings, e.g. in the room with scrolling METAL1 texture on the sides. Also, there is one "unmarked" instance of a damaging floor, an overlook textured with ROCKRED (the ROCKRED, however, does imply that staying there too long is not advised).

Also, the E2M5 damaging sector which is texture-related (#159) has BLOOD* as ceiling.

Share this post


Link to post

This has probably been mentioned already but I'm not about to check through several thousand posts to find it. Anyway, unlike every other version, the pickups in SNES Doom are 'infinitely tall'. You can leap off a ledge and mysteriously pick up any supplies directly below you regardless of the apparent vertical distance between you and it.

Curious as to whether this also applies to projectiles now, but I'm too lazy to test it.

Share this post


Link to post

It would be possible to make a PWAD with custom sprites that worked flawlessly in vanilla Doom, without the Dehacked hack. To do so, however, would take a mere million or so dummy lumps in the PWAD.

Share this post


Link to post
damerell said:

Besides being irrelevant, this also isn't true. The Web was on one NeXT box in 1990, the one Berners-Lee was busy inventing it on.

Oh, my grammar fucked me up again...

... but! The WWW (Web Browser) was released in '90 (more like '91)!

Share this post


Link to post
Linguica said:

It would be possible to make a PWAD with custom sprites that worked flawlessly in vanilla Doom, without the Dehacked hack. To do so, however, would take a mere million or so dummy lumps in the PWAD.

That's a "theoretical" possibility, because there's a limit to the number of lumps in a wad than vanilla Doom can handle. This limit is far short of a million (apparently it's 4046 lumps per wad), and was encountered by the BTSX team, which is why BTSXe2 is split into two different wads.

And yes, there is also a limit to how many wads can be loaded at a time in vanilla. The maximum is 20 in total, IWAD included.

This gives you a theoretical maximum of 80 920 lumps maximum in vanilla Doom.

Share this post


Link to post

I feel weird whenever I learn about more math things because of a game where all I do is shoot the monster in the face.

Share this post


Link to post

Games are all maths (especially vectors, sets, probabílities, basic algebra). The computer never "saw a monster".

Share this post


Link to post

Yeah, I know it's "theoretical". I was researching if it would be possible to make custom sprites work in vanilla without the normal hacks people came up with (floating S_END in PWAD, changing sprite suffix with Dehacked).

The reason that custom sprites do not normally work is because when loading up, the engine initializes three arrays: spritewidth[], spriteoffset[], and spritetopoffset[], and fills them with the correct values for each sprite. The problem is that "each sprite" means only those found between S_START and S_END, so you have to try and play games with adding an extra S_END to your PWAD, but then the game crashes because the engine detects two different TROOA1 frames or whatever, so you need to do the Dehacked thing to change the sprite suffix, etc. ANYWAYS, so because these arrays only have the normal sprite info put in them, if you have custom sprites in your PWAD, when it tries to draw your custom sprite as lump #2951 or whatever, it will look up spriteoffset[2951], read random garbage data since it's past the end of the array, and say, "hey, apparently the sprite is offset 5 million pixels, so better not actually draw it onscreen."

So I figured, what if I could make it read SO FAR past the end of the array that I actually ended up in memory allocated to a PWAD lump? Then I could just craft a custom lump to have the proper values and it should work.

The only problem is that (in this latest run of my Choco Doom at least) spritewidth[] starts at 0x28bf12c, and the first lump in a PWAD starts at 0x2c838ec. Which is a mere 3,950,528 bytes in between. (Which makes sense, since it caches all the IWAD sprites in between.) Since each value in the array is a 4-byte integer, that means I would need to overrun the array by about a million, which means I would need a million lumps in my PWAD to make the engine try and read that far ahead.

Share this post


Link to post

As best as I can tell from the linuxdoom source, doom appears to consider 'normal pitch' to be 128, whereas heretic and hexen consider it to be 127. Both values are approximations for UCHAR_MAX divided by 2, but depending on what DMX treated 'normal', it's possible that Doom 1.2 pitch shifted sound effects (ever so slightly: by '1' value but I don't know how that maps to sonics, yet) when it thought it was playing them unmodified. (probably up if I recall how it used M_Random, from the top of my head.)

More experimentation needed.

Share this post


Link to post

Interesting as always. Who would have thought that a game about murdering hellspawn could inspire these discussions over two decades later?

Share this post


Link to post

My "only just discovered" moment would have to be that episodes 2 and 3 in SNES Doom were only playable on higher skill levels. I remember hiring it from the video store when I was a kid and being disappointed that only episode 1 was available, because I always played on ITYTD.. and I only had shareware Doom on PC at the time.

When I read that on doomwiki I was like "whaaaaaaaa.."!



also: first post, hi! Been playing Doom since my dad brought home shareware 0.99 not long after it was released :D

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...