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

IDEAS WANTED: technical aspects of the Doom engine

Recommended Posts

A long time ago I got the idea to write or help write or edit or otherwise get done a series of articles that would cover technical aspects of Doom and the Doom engine and how they affected the game and the way it plays. I never actually got around to it, and eventually cph wrote a couple of articles in the same vein at http://www.doom2.net/doom2/research/ . Anyways I would like to get a feel for if there's any interest in writing some more of these, and if so, what sort of topics would be good.

What I'm trying to find are things that are not obviously apparent, but which still have some impact on the game, or possibly could have some impact on the game. They would be written for the coding noob so all code snippets would be explained thoroughly, and would be written with enjoyment in mind, rather than some dry document.

Here's the ideas I had in mind, please give your own so I can see if there's enough unexplained material that could be written about. Plus if you'd like to help write them that would be awesome too.

* joyb_speed 31 and why it turns on autorun in the classic exe
* the ouch face and why it happens in such a weird way in the classic exe
* crap in the source code about the monster firing AI, exceptions for different monsters, how it works etc
* your idea here

Share this post


Link to post

There isn't much I can think about that wouldn't somehow be strictly related to editing, although I haven't heard explained the bug that allows wallrunning. Also, I remember another glitch where if you turned the volume to 0 ingame, you would still hear monster sounds OUTSIDE of the hearing range at full volume. Is that what you're looking for? If not, I have some editing-related ideas(that would possibly have to do with sourceports):

DELETED BECAUSE IT HAS NOTHING TO DO WITH THE QUESTION

Share this post


Link to post

Well here's a thing. Check out this WAD:

http://www.doomworld.com/idgames/index.php?id=7664

It's an old DM megawad by various authors, including good old Adam Williamson. Warp to MAP04 in either prboom or the original .exe (but not ZDoom) and check out the speeds of the scrolling walls that are right in front of you when you start. Some of them is going at the "normal" rate, while others are absolutely fucking racing along. I always wondered, what the hell is going on there?

Share this post


Link to post

The phenomenon when you become a zombie in a single player game.

What exactly causes wallrunning.

Also, perhaps it can be explained why the original game doesn't allow sprite replacements to be loaded in a PWAD.

Share this post


Link to post

Exactly what is wrong that the skies in Doom 2 don't change properly when you move from one "episode" to the next?

Why is there the business of monsters and other objects being of infinite height, even though projectiles can pass over something without striking it?

What happens to a corpse when it gets crushed that makes an Arch-vile resurrect it as a ghost?

Exactly how does the randomizer work? (I've heard it relies entirely on player motion hence why demos need only record the player's actions)

How does the game decide whether a monster will scream or not when hit? (Certain weapons seem more "painful" than others?)

Why do corpses sometimes "skim" along a ledge before coming to a halt?

Not sure if this one counts because it involves Dehacked, but why is it that if you give a non-flying monster the lost soul attack, sometimes it starts bouncing up and down strangely?

Share this post


Link to post

What's the deal with the double sound effect for blazing doors?

Why do you sometimes get stuck inside walls if you save while standing on a ledge?

Share this post


Link to post

Why can you shoot enemies with hitscan weapons on the other side of a closing door that's almost closed?

Share this post


Link to post

In the Mill level in TNT (or Plutonia, I forget), why are there players you can see if you noclip, but don't get hurt when shot, and aren't voodoo dolls for player 1?

EDIT: Read more here

Keep in mind I was n00b when I posted that.

Share this post


Link to post

Why do enemy bodies slide on ridges or stairs until they hit the wall, etc after they're killed?

Share this post


Link to post

I'd certainly read any such articles with great interest. A few possible topics:

A nice clear explanation of wallrunning (especially why there is a difference between North-South and East-West) would be great. Technical info on the speed boost and the distances that can be jumped from a wallrun start would be even better.

The map07 issue where the special tags can be triggered twice (without -respawn or -skill 5) - I think I understand that, but have never seen it described in detail.

Glides (e.g. map16, map21 and map22). I've only ever seen very vague explanations of them.

Grabs. How they work, and why there are different types of them (the standard "straferun into the wall", the "rub yourself up against the railing" as in E4M1, and the weird "run straight ahead into the wall", as in E4M2).

An explanation of the bizarre map24 trick, where the player is able to make use of a narrow ledge that is the other side of an impassable linedef.

What (if anything apart from a different random number seed and double ammo) is the difference between "-skill 5" and "-skill 4 -fast -respawn"?

Share this post


Link to post

The original Doom Source code had code for horizontal sliding doors, wolfenstein-style.

It also had some old status bar code for when the messages were displayed there in the betas.

Share this post


Link to post
Jonathan said:

Well here's a thing. Check out this WAD:

http://www.doomworld.com/idgames/index.php?id=7664

It's an old DM megawad by various authors, including good old Adam Williamson. Warp to MAP04 in either prboom or the original .exe (but not ZDoom) and check out the speeds of the scrolling walls that are right in front of you when you start. Some of them is going at the "normal" rate, while others are absolutely fucking racing along. I always wondered, what the hell is going on there?


that can be answered right now.

Its an effect when you have a linedef with the scrolling type that shares the same sidedef number. This effect is seen in Plutonia map05.

This doesn't work for zdoom.

Share this post


Link to post

* joyb_speed 31 and why it turns on autorun in the classic exe

The especially weird thing about this is that it varies between versions. 31 works for the 1.9 exes, 29 for the Final Doom exes, and in v1.2 you need to use 30. Maybe some other versions use yet other values but I haven't checked.

Share this post


Link to post
Ryback said:

The especially weird thing about this is that it varies between versions. 31 works for the 1.9 exes, 29 for the Final Doom exes, and in v1.2 you need to use 30. Maybe some other versions use yet other values but I haven't checked.


...and 27 for Heretic

Share this post


Link to post

Some kind of actual documentation for the source code in general would be the bestest thing.

Share this post


Link to post

I remember seeing some article about wallrunning once, i think it can somehow confuse the engine into thinking the player is already at the far end of the wall, except the player is not at the far end of the wall, so goes speeding towards the far end at the maximum speed the engine can manage without buggering up

Share this post


Link to post

Those are interesting questions.
You may call your text, The Doom Anomalies FAQ, or something.
So here are my additions:
What is the background for Lost Souls not being counted as monsters. The Pain Elemental wasn't even planned to be consider Lost Souls just as projectiles back then, or maybe they were?

There's another think, I don't get: How did they manage it that the wall lowers instantly in E1M8 when the barons die in "Doom done quicker". There must be something strange going on as well.

In Doom 2 map07, I sometimes managed it, that the step in front of the exit rises twice. What's wrong with there?

What was the purpose of the strange behaving "-wart" command?

What (if anything apart from a different random number seed and double ammo) is the difference between "-skill 5" and "-skill 4 -fast -respawn"?

That's easy. You are allowed to use cheat codes with skill 4, with skill 5 you don't.

"What were the original betas suppose to shape doom as?"

The Doom Bible should answer that very vell. They probably didn't thought of more than that.

Share this post


Link to post

What is the background for Lost Souls not being counted as monsters. The Pain Elemental wasn't even planned to be consider Lost Souls just as projectiles back then, or maybe they were?

Lost souls were counted as monsters in the earliest Doom versions - they showed up in the kills percentage, anyway. It was only when the PE was designed that they changed this in the code.

There's another think, I don't get: How did they manage it that the wall lowers instantly in E1M8 when the barons die in "Doom done quicker". There must be something strange going on as well.

This exploits the fact that sector tag 666 only activates at the end of the Baron's death sequence, for dramatic purposes.

The sequence of events is like this:
* player shoots 2-3 rockets at Baron 1.
* player shoots 5 rockets at Baron 2, killing him.
* while Baron 2 runs through his death animation, player shoots Baron 1 and kills him.
* when Baron 2's death animation finishes, both Barons are dead, so the linedef activates.

The key to this is that Baron 1 has to be killed while Baron 2 is still running through his death animation. If the player is too slow and Baron 2's animation finishes while Baron 1 is still alive, then sector tag 666 won't activate as there's still a Baron alive.

In Doom 2 map07, I sometimes managed it, that the step in front of the exit rises twice. What's wrong with there?

Basically the same thing as above, two Arachnotron deaths overlapping.

Share this post


Link to post
Ryback said:

Basically the same thing as above, two Arachnotron deaths overlapping.

And it rises twice because when the last arachronotron's death sequence ends, it checks again, finds no arachnotrons alive for a second time, and thus raises the platform again. With -respawn, you can get it to rise many times, and you see a lovely tutti frutti effect.

I had a stab at explaining this here, but in general terms, and without reference to the source code.

Share this post


Link to post
DooMer 4ever said:

I've heard that PE:s can somethimes be turned to ghosts too. Why?


If they get crushed and then resurrected.

Also, if you put a resurrection frame to the barrels, and crush them, an Archvile can make ghost barrels.

Share this post


Link to post

Draconio said:
What happens to a corpse when it gets crushed that makes an Arch-vile resurrect it as a ghost?


If a monster is crushed, its corpse's width and height become equal to -1. That's why the 'ghost' effect is different than noclipping, in that you can walk and shoot through it, expect for explosions (which do not need to collide with a thing to do damage).
And apparently, the change of width/height remains even after resurrection; resulting in the 'ghost' monsters.

It had to be like this, I guess, because if a monster got crushed before the NoBlock code-pointer was activated in its death state, you'd end up with a blocking crushed corpse (which was infinitely tall in regular DOOM). That's my theory on the 'ghost' subject...

Share this post


Link to post

Well, that map07-thing is an ugly bug then, as it even prevent you from finish that level when that happens. :( I guess this wasn't fixed either, as this probably would affect the E1M8 thing as well. Does COMP_666 in Prboom cover this bug?

I've heard that PE:s can somethimes be turned to ghosts too.

I didn't saw that. I wonder, where do you get the corpse from? Wouldn't be the same thing possible with Lost Souls then?
Could dehacked even be used to make Archviles resurrect Archviles?

Share this post


Link to post
Terra-jin said:

If a monster is crushed, its corpse's width and height become equal to -1. That's why the 'ghost' effect is different than noclipping, in that you can walk and shoot through it, expect for explosions (which do not need to collide with a thing to do damage).
And apparently, the change of width/height remains even after resurrection; resulting in the 'ghost' monsters.

It had to be like this, I guess, because if a monster got crushed before the NoBlock code-pointer was activated in its death state, you'd end up with a blocking crushed corpse (which was infinitely tall in regular DOOM). That's my theory on the 'ghost' subject...


a good way to try this is modifying the properties of the blood splat, so it has the dimension of a shotable thing. Then let an Archvile resurrect a crushed monster and see what happens.

Or, change the dimensions of certain monster to the ones of the blood splat and see if it is a ghost.

Share this post


Link to post

By the way...

You know, I am so fucking sick of thread titles that don't tell you anything. "IDEAS WANTED" gee I don't know, are we talking about cold fusion or time travel or maybe making a square room, I guess I have to fucking click on it to find out!!

Share this post


Link to post

If you want to create a 'ghost' monster, set its dimensions to -1 each. The point is that the dimensions are reset to -1 when crushed, so it doesn't really matter what dimensions the monster had before (or the blood pool itself).

One another note: I've seen something very strange in original DOOM. I had set the blood splatters (from hitscan attacks) to a duration of -1, so after a while of crazy IDFA chaingun carnage, there were some hundreds of things in the level. And suddenly, ALL the things in the level were reduced to -1 width and height! Everything was a ghost all of a sudden, including myself :D

I have absolutely no idea how or why this happened, but it was very funny to experience. As a ghost, all attacks passed right through me, except for explosions and melee damage. Oddly enough, it seemed monster melee attacks could hit me, but my melee attacks couldn't.

Share this post


Link to post

That reminds me: I once managed becoming a ghost by myself. Not that common voodoo player issue where you carry no weapon but still can activate things and exit the level. I was able walking through anything like those ghost monsters do.
I have no clue how this happened nor how to reproduce this. Maybe someone can point out such a bug which can happen under certain circumstances.

Share this post


Link to post
LogicDeLuxe said:

Well, that map07-thing is an ugly bug then, as it even prevent you from finish that level when that happens. :(

No. You can still jump to the exit, from one of the lowered Manc platforms. Can't remember if it needs S40 or S50. You see it in one of Henning's NM demos (0726nm01). Vile pointed this out in the thread I linked to above.

There might be some pwad maps that are more seriously affected by it though.

The noclip bug is a weird one. Some discussion here (see Opulent's post). It's not much use to the player except in very unusual circumstances (i.e. the map includes a "-10/20% health, end level/game" sector).

Regarding ghost PEs, I think the crusher has to be of a certain type (slow, steady movement) for the PE to leave a resurrectable corpse.

Share this post


Link to post
Fredrik said:

By the way...

You know, I am so fucking sick of thread titles that don't tell you anything. "IDEAS WANTED" gee I don't know, are we talking about cold fusion or time travel or maybe making a square room, I guess I have to fucking click on it to find out!!

Yeah I agree. I've been changing titles for a bit that have nondescriptive names like "help!" or "can you explain this?"

Hope you dont mind me tweaking your thread title Ling.

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
×