Hitscan

Hitscan attacks hit or miss their target the very moment the attack is launched, and therefore cannot be dodged. All melee and bullet attacks work like this; there are no projectiles involved, invisible or otherwise. Melee attacks have a range of 64 units and bullet attacks a range of 2048 units.

Melee attacks are monster and weapon specific, but the damage done by a single bullet is a fixed (though randomized) value. The damage caused by a ranged hitscan attack only varies (excluding the randomization) according to the number of bullets fired by the weapon or monster.

In addition, the damage dealt by player and monster bullet hitscan attacks is slightly different. For player bullets, the damage is calculated as (P_Random %3+1)*5; this returns a value which can be 5, 10, or 15. For monster hitscans, the formula is ((P_Random%5)+1)*3, returning a value which can be 3, 6, 9, 12, or 15. Thus, while the maximum damage is identical, the mean damage will be a bit lower for monster bullets.

Monster melee attacks use a simple range check, whereas bullet attacks and player melee attacks use a hitscan line computation system to assist with autoaiming and to make sure there is no unwanted target in-between the attacker and its victim. Note that up to Doom 1.4, demons used a short-range hitscan line attack with their bite, allowing for the occasional (but rare) demon-started infighting. This was changed to a range check like the imp and baron of hell melee attacks in v1.5.

The lost soul in the beta version of Doom used a long-range melee attack consisting merely of a sight check. Contrarily to other hitscan attacks, it had no risk of hitting an unintended target.