Talk:Partial invisibility


Can Revenants' tracking rockets still target a player with a blur sphere, even if the Revenant fires the rocket in the wrong direction?

Yes. The blur artifact only confuses the monsters to make them inaccurate. It has no effect on Revenant rockets. oTHErONE (Contribs) 23:53, 9 March 2007 (UTC)

Exact amount of accuracy reduction[edit]

p_enemy.c, A_FaceTarget

if (actor->target->flags & MF_SHADOW)
   actor->angle += (P_Random()-P_Random())<<21;

p_mobj.c, P_SpawnMissile

// fuzzy player
   if (dest->flags & MF_SHADOW)
      an += (P_Random()-P_Random())<<20;	

Although I'm not very into hex calculations, my estimates are ±45° (0x20000000) for the first case (that'll be hitscan, I suppose), and ±22.5° (0x10000000) for the second (projectile attacks). Are my values correct? It might be useful to include them here or into the fuzz effect article. Also, I wonder what actual numbers will come out after the idiosyncrasies of Doom's RNG come into play.

On a side note, I haven't managed to find any exceptions for the spectre's fuzz. It appears that they are equally as hard to hit as fuzzy players (to monsters, not the player, of course). If so, the Spectre article needs a correction. --Unmaker 19:18, 1 September 2012 (UTC)

Can't argue with any of that (FWIW).  The RNG module tells us:
  • Angle varies between -43.76° and 43.94°, or half that for projectiles
  • Mean of 0° and standard deviation of 17.84° (i.e. small shifts are uncommon in fact), or half that for projectiles
  • Angle is never zero (because no two consecutive return values are equal)
I'll describe this in the article if I can wring a passable histogram out of this POS spreadsheet application.  :P     Ryan W (talk) 01:51, 3 August 2014 (UTC)
A_FaceTarget is a separate function that is also called during attack sequence and its role is to cause monsters to face in the direction of their target while attacking. In this context, the relevant bit of code in A_FaceTarget makes it so that monsters targeting partially invisible players face in a random direction during attack. However, the random angle offset calculations yielded by those functions are independent from each other. Load MAP32 on Doom II and give yourself the god mode and blur sphere via cheats, then observe how the direction of fired cyborg's rocket does not always match with the direction the cyborg is facing while firing said rocket. What is more, in info.c (lines 621 to 623) you can see how A_FaceTarget is called during demon's attack sequence, while P_SpawnMissile is never called because demon is exclusively melee combatant. However, if you are partially invisible, you could notice that demons standing in place while biting you are "wiggling" around, randomly switching their angle in random directions within the ±45° interval. Note that the "wiggling" is a purely visual effect and does not affect the demon's (or any other monster's) attack accuracy itself.
BTW I am not fluent with how to convert those hex values to angles so I am not sure whether this ±45° value is correct, but seems reasonable for me. —Preceding unsigned comment added by (talk)
I think I got it figured out, and what I came to understand agrees with your hex conversion values (0x20000000 is 45° degrees). I also edited out my mistake in previous part. I was mistaken to initially believe A_FaceTarget's effect was purely cosmetic, but now I see that it affects the direction of hitscan tracers (but not melee attacks, because monsters' melee does not involve aiming, and instead is just a simple range check). Important thing to note is that hitscan attacks of possessed humans and spider masterminds already have a built-in accuracy reduction by default, more specifically their pellets are subjected to ±22.5° spread. For example, let's assume a zombieman attacking a partially invisible player. From A_PosAttack (zombieman's attack function):
   A_FaceTarget (actor);
   angle = actor->angle;
   S_StartSound (actor, sfx_pistol);
   angle += (P_Random()-P_Random())<<20;
   damage = ((P_Random()%5)+1)*3;
   P_LineAttack (actor, angle, MISSILERANGE, slope, damage);
we can see that A_FaceTarget is called first to make zombieman face his target. During the execution of A_FaceTarget function, the first step of accuracy reduction is applied -- a random offset within ±45° range is being added to actor->angle that is passed as and argument of A_FaceTarget. After returning from A_FaceTarget, we save that value in a local variable named angle (bolded to make distinct) to use it in further calculations. Next, the built-in hitscan spread of ±22.5° is added to angle, which ultimately results in ±67.5° random offset (with non-linear probability distribution, since it involves two independent offset calculations).
-- 17:10, 27 April 2022 (CDT)
Here is a video fragment confirming the aforementioned findings: (timestamp of 03:06). It shows the phenomenon of "wiggling" demon described earlier in previous entries.
-- 09:40, 28 April 2022 (CDT)
One month has passed and the relevant proposed changes are still pending. It assures me that it was a good decision to stop contributing to what seems to be a dead website. Cheers. -- 10:59, 28 May 2022 (CDT)
Some edits are not touched by most editors but have to wait for one with enough knowledge on the specific, technical topic. I do understand your disappointment about that, but it only takes one look at Recent Changes to realize this is anything but a dead wiki. ;-) --Xymph (talk) 16:16, 28 May 2022 (CDT)
Apologies but this slipped by me and I see no issues with it. I wish that more people with reviewing access were active on a regular basis but I can only plead and hope. --Quasar (talk) 16:36, 28 May 2022 (CDT)

Display filter[edit]

The player's sprite (as seen by other players in multiplayer mode) will be given a filter similar to that of the spectre

Similar? How similar? Isn't it the same? --Kyano 21:24, 10 April 2014 (UTC)

It is exactly the same. It also isn't a "filter". --Quasar 02:11, 11 April 2014 (UTC)