• Ever wanted an RSS feed of all your favorite gaming news sites? Go check out our new Gaming Headlines feed! Read more about it here.

Deleted member 12790

User requested account closure
Banned
Oct 27, 2017
24,537
This is one of the best channels on Youtube, they make multiple videos breaking down all the algorithmic logic that dictates Doom's behavior:

Great examples:

How Enemy AI and pathfinding works:


How Revenants decide which missile to fire:


How Doom's RNG works


Bonus: Quake II's particle engine


I can't recommend this channel enough.
 

Ionic

Member
Oct 31, 2017
2,734
The only Let's Plays I watch are of Decino tearing through famous WAD's. If you want to learn how to play Doom properly, watch his analysis videos, then watch a playthrough of any WAD. He's an excellent source of Doom information and skill.
 
Oct 27, 2017
2,532
That and no death runs of highly difficult levels of classic FPS.

My only issue with him is when he, during a live stream, knowingly and enthusiastically accepted a donation from Markus Persson.
 
Last edited:

Deleted member 20297

User requested account closure
Banned
Oct 28, 2017
6,943
Similarly awesome series, that is solely focused on the 3DO doom engine, is here:









Also, it'd be irresponsible to not recommend THE DOOM ENGINE BLACK BOOK: https://fabiensanglard.net/gebbdoom/

Was Doom ever fixed on the 3do? I think I heard that a woman had to port the game to the system with very limited time and that it was a bad port so I wondered if someone fixed it by using the 3do properly.
 

signal

Member
Oct 28, 2017
40,183
Is doom objective c? I'm no programmer but the code for checking an odd number ( if (gametic & 3) ) looks weird. Someone explain pls.
 
OP
OP

Deleted member 12790

User requested account closure
Banned
Oct 27, 2017
24,537
Is doom objective c? I'm no programmer but the code for checking an odd number ( if (gametic & 3) ) looks weird. Someone explain pls.

Doom is C. that is a bitwise AND operation, it's less cycles than modulus division:

BBIiUe5.png


It performs a bitwise AND operation on every bit of the bitstring "Gametick," an unsigned 32-bit integer. You only need to examine the lower 2 bits of a bit string (xxxx-xx00, xxxx-xx01, xxxx-xx10, xxxx-xx11) for this purpose. an AND expression equates to 1 if both bits being compared are 1. In this case, the expression only evaluates to true if the lower 2 bits are 0x11 (binary 3), which is the same as doing x%4 only faster. 1 is the same as true. It's not checking to see if it's an odd number, it's a gate that only opens every 4 game ticks. This is because the lower 2 bits of any binary value will loop every 4 iterations:


0 = 0x0000
1 = 0x0001
2 = 0x0010
3 = 0x0011 (= &3 = %4 = true)
4 = 0x0100
5 = 0x0101
6 = 0x0110
7 = 0x0111 (=&3 = %4 = true)
8 = 0x1000
9 = 0x1001
10 = 0x1010
11 = 0x1011 ( = &3 = %4 = true)
etc

"3" as a 32-bit number is actually 0000-0000 0000-0000 0000-0000 0000-0011 so the upper 30 bits are always 0. 0 AND 0 is 0, 0 AND 1 is 0, 1 AND 1 is 1. By using bitwise and operations, you reduce the complexity of the check.
 

signal

Member
Oct 28, 2017
40,183
In this case, the expression only evaluates to true if the lower 2 bits are 0x11 (binary 3), which is the same as doing x%4 only faster. 1 is the same as true. It's not checking to see if it's an odd number, it's a gate that only opens every 4 game ticks.
Oh ok that's what I was looking for. My head hurts but thanks!
 

HTupolev

Member
Oct 27, 2017
2,419
How Enemy AI and pathfinding works:

The cacodemon at 9:50 is the most adorable thing.

In this case, the expression only evaluates to true if the lower 2 bits are 0x11 (binary 3)
Careful with your prefixes. 0x11 is decimal 17, not 3.

c evaluates anything nonzero as true, so the statement evaluates to true not only if the lower bits are binary 11, but also if they're binary 01 or binary 10.
I think you're mistakenly visualizing the code as if((gametic & 3) == 3).
 
Last edited:
OP
OP

Deleted member 12790

User requested account closure
Banned
Oct 27, 2017
24,537
Careful with your prefixes. 0x11 is decimal 17, not 3.

c evaluates anything nonzero as true, so the statement evaluates to true not only if the lower bits are binary 11, but also if they're binary 01 or binary 10.
I think you're mistakenly visualizing the code as if((gametic & 3) == 3).

lol both of those points are completely correct, should have been b0000, b0001, etc. I rarely have to work in raw binary strings, I'm used to hex notation every time I'm not dealing with decimal, my bad

functionally, it's sorta the same result (once aberration per every 4 ticks), I just got the swing of the gate incorrect. It'd be false every 4 ticks, not true every 4 ticks (and the aberration would be off by one in my example). Thanks for the help on the explanation.
 

Dangerblade

Member
Oct 25, 2017
2,642
decino is indeed awesome, but saying his content is "nothing but" deep dives into the logic is doing him a disservice as he is also an excellent player and his gameplay vids are equally worth a watch :)
 

Temperance

Member
Oct 25, 2017
5,798
[NO 2FA]
I mean I'm glad his channel isn't JUST deep dives because his no death runs are fun to watch, but I'll let the technically slide as more people need to know about him.
 

Temascos

Member
Oct 27, 2017
12,503
I liked Decino's video on whether a kill-less Doom 2 run is possible and it turns out...sort of? Icon Of Sin makes it impossible for a human to achieve but with dumb luck and being blasted to hell by Archviles in the right manner can turn DoomGuy into a living bomb that can destroy the Icon.
 

Metalmucil

Member
Aug 17, 2019
1,379
He just posted the final map of Sunlust on UV pistol start, single segment no saves if anyone is interested. I just finished watching it, its insane.
 

Dangerblade

Member
Oct 25, 2017
2,642
His next playthroughs are Doom 64 and Valiant (which looks super cool), he uploaded the first parts of both earlier this week :)