Revenant Missiles Revealed

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Revenant Missiles Revealed

Postby Curunir » Sun Nov 09, 2003 4:02 pm

So, there was talk about the behaviour of the missiles of the Revenant and there were different opinions. But today I saw the truth in an article and tested what I read ingame. Whether the missiles are homing or not does not depend on the difficulty level. And the missiles are not always homing. That's what I found:
http://www.classicdoom.com/doommyth.htm

Scroll down to the paragraphs concerning the Revenant and be educated! :D
I just tested that in Alien Vendetta. The smoking rockets follow, the others don't. As simple as that.
I wonder how this has never caught my eye before in the game... :roll:
User avatar
Curunir
In heaven everything is fine
 
Joined: 02 Nov 2003
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Postby HotWax » Sun Nov 09, 2003 4:55 pm

Err... I already know this. I would hope that so do most people here.

I also *believe* that the non-homing missles are slightly faster than the homing ones, but that's more of a feeling and could be wrong. The speed difference (if present) is definately pretty slight.
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby cccp_leha » Sun Nov 09, 2003 7:00 pm

Apparently I knew this, because if I didn't, I'd be hiding behind corners from a hell of a lot more rev. rockets.
User avatar
cccp_leha
Words are silver; silence is gold... so stfu.
 
Joined: 16 Jul 2003
Location: NJ, USA

Postby Anonymous » Mon Nov 10, 2003 12:09 am

Hell, I hide from the damn things anyways. It's better than killing the revenant, then having to evade the flaming testicle-things following you around the room.
I'd like to know the probability of a revenant fireball being heat-seeking. I've been in extended battles with revenants without ever noticing a single one of those - on the other hand, sometimes it seems like they fire nothing but seekers.
However, I didn't know that only homing fireballs leave smoke trails - I guess I've never looked before.
Anonymous
 

Postby Lexus Alyus » Mon Nov 10, 2003 4:48 am

I know this, but I'm going to make out that I don't because hotwax is so more superior than I :-D

:twisted:
User avatar
Lexus Alyus
One day, I may actually release something...
 
Joined: 15 Jul 2003
Location: Nottingham, UK

Postby Ty Halderman » Mon Nov 10, 2003 6:30 am

Liam wrote:I'd like to know the probability of a revenant fireball being heat-seeking.
From a_revenant.cpp, the return meaning it won't be heat seeking:
Code: Select allExpand view
if (level.time & 3)
    return;

So it's basically randomized based on the length of time you've been in the level, and the chance is 1 in 4 of it not being heat seeking. That doesn't sound like my experience, but unless I'm up earlier than usual and haven't had coffee yet (true and true) then that's what the code says.
User avatar
Ty Halderman
I'm free! ...or at least inexpensive.
... in loving memory ...
 
Joined: 17 Jul 2003
Location: New Orleans LA

Postby Enjay » Mon Nov 10, 2003 7:30 am

Heh, I had a dive into the code the other day, trying to find out exactly that thing - ie what is the chance of a missile homing or not. However, not being familiar with such things, I was just looking for obvious words like perhaps "random" or somthing followed by some numbers. I don't think I would ever have realised that bit of code was relevant. :?
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Postby Chilvence » Mon Nov 10, 2003 10:02 am

I guess level time is just a convenient pregenerated random number seed that will always be "right" at the right time (for demos)

dunno what "& 3" does
User avatar
Chilvence
I had been waiting for Doomscript....
 
Joined: 11 Aug 2003

Postby Graf Zahl » Mon Nov 10, 2003 11:23 am

Ty Halderman wrote:
Liam wrote:I'd like to know the probability of a revenant fireball being heat-seeking.
From a_revenant.cpp, the return meaning it won't be heat seeking:
Code: Select allExpand view
if (level.time & 3)
    return;

So it's basically randomized based on the length of time you've been in the level, and the chance is 1 in 4 of it not being heat seeking. That doesn't sound like my experience, but unless I'm up earlier than usual and haven't had coffee yet (true and true) then that's what the code says.



You got it wrong! The probability is 1/4 of it being heat-seeking - if the frame duration was 4. It is 2, however. So it works as follows:
For half the projectiles the heat-seeking code is executed every second call. For the other half nothing is done.
Again this is typical id code. Why do it cleanly if a cheap hack is sufficient... ;)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Ty Halderman » Mon Nov 10, 2003 1:36 pm

Note to self: Coffee before posting :)
User avatar
Ty Halderman
I'm free! ...or at least inexpensive.
... in loving memory ...
 
Joined: 17 Jul 2003
Location: New Orleans LA

Postby HotWax » Mon Nov 10, 2003 4:25 pm

Chilvence wrote:I guess level time is just a convenient pregenerated random number seed that will always be "right" at the right time (for demos)

dunno what "& 3" does


& is the bitwise AND operator. That is, for each bit in the numbers being ANDed, if they are BOTH 1, the resulting bit is 1. If either or both is 0, the resulting bit is 0.

Example:

10 decimal = 1010 binary
3 decimal = 0011 binary
10 & 3 = 0010 binary (2 decimal)
because 1 & 0 = 0, 0 & 0 = 0, 1 & 1 = 1, 0 & 1 = 0

by using the level.time value and ANDing it with the number 3, the result will be different depending on how long you've been in the level. Since it's non-random, demoes containing revenant missiles SHOULD continue to work properly. (But, I thought there was a bug with them??)

BTW, the bitwise- operators are typically used when you want to store information about different things using a single varible or container. A single byte can contain 8 flags by ANDing each bit's decimal value with the container byte.

Flag 1 = Byte & 128
Flag 2 = Byte & 64
Flag 3 = Byte & 32
...etc...

For each of these, there can be only two results. Either the flag is set, in which case the result is the number you ANDed, or the flag is not set, and the result is 0. So:

Code: Select allExpand view
if (Flags & 8) .... do stuff ....


"do stuff" will only get executed if the 8-bit in Flags is set to 1. (Otherwise the equation would return 0, and 0 is equal to FALSE)
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby cccp_leha » Mon Nov 10, 2003 5:48 pm

Thanks, Prof. HotWax. :)
User avatar
cccp_leha
Words are silver; silence is gold... so stfu.
 
Joined: 16 Jul 2003
Location: NJ, USA

Postby Chilvence » Mon Nov 10, 2003 5:50 pm

Thanks for the tip ;)
User avatar
Chilvence
I had been waiting for Doomscript....
 
Joined: 11 Aug 2003

Postby HotWax » Mon Nov 10, 2003 9:03 pm

cccp_leha wrote:Thanks, Prof. HotWax. :)


You're welcome.
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests