30 Nov 2025
Author: Me

3 Types of Hitscan Attacks

In video games where there’s shooting involved, including but not limited to the FPS genre, there are 2 main ways of handling the process where the user clicks on an enemy and the enemy gets hit. It may sound simple but the gameplay experience will differ greatly depending on which method is used.

One is the projectile method where the game spawns a projectile (maybe at the tip of the gun muzzle, or at the center of the screen). The projectile then travels in a specific direction, maybe while getting affected by gravity and other physical forces, and ultimately touches the enemy to register the hit. This is, of course, very similar to what happens in the real world.

The other method, however, called hitscan, is not like the real world at all. When the player initiates the shooting by clicking, the game immediately draws a ray from the player to the enemy, checks whether the ray connects or gets obstructed, and checks the distance of the ray to enforce a maximum range on the weapon. If it finds that the ray can touch the enemy at a reasonable distance, it registers the hit.

The main point is that the 2nd method happens immediately. If an enemy shoots at the player with a hitscan attack, the player doesn’t get to jump out of the way. Having good reflexes factors in less in this case, and so it can feel unfair or taxing on the player.

Either of these approaches can fail if done poorly, but it’s trickier to get hitscan to feel right. I’ve come to identify 3 main types of hitscan attacks, which helped me reason better while designing my games. Using the right one for the right situation can make a big difference in terms of gameplay.

Telegraphed Hitscan Attacks

One way to make sure hitscan doesn’t feel cheap and unfair is to add a telegraph beforehand. Maybe the enemy stops and aims for a moment. Better yet, the gun flashes a split second before the enemy shoots. Or maybe the enemy charges up a shot in spectacular fashion. Either way, the player notices the enemy preparing to shoot, and knows to act quickly. If done right, players who get hit will feel like it was their fault for reacting too late.

A steady delay between shots or a repeating pattern can also telegraph future attacks, as this will tell the player when to expect the next attack. The point is to avoid unpredictable hitscan attacks coming out of nowhere.

Weak Hitscan Attacks

Another way is to make the hitscan attacks rather weak, so that they are a nuisance instead of a barrage of punishing blows. This can serve to distract the player, or make them think they’re in more trouble than they actually are. Imagine a swarm of drones raining bullets. Despite being mostly unpredictable and unavoidable, this would be fine as long as the bullets don’t hurt much. Basically, in order for hitscan to feel truly unfair, it needs to hurt.

Deterring Hitscan Attacks

In this niche use of hitscan attacks, the attacks are both unpredictable and punishing, but the boundaries of the hurt zone remain well defined so the player knows what area to avoid.

An example would be a part of the map where a sniper is taking shots at the player if they enter the area. In this case, the purpose is to deter the player. The player gets hit with damaging attacks and can’t avoid getting hit, but quickly realises that they need to retreat. Once they exit the zone, the attacks stop. This serves a good gameplay purpose of guiding the player in the right direction without feeling unfair. Of course, it would help if it took more than one shot to trigger a game over screen to give people a chance to assess the situation before restarting at the last checkpoint.

Why Hitscan

Hitscan’s selling point is that it’s computationally cheaper. Projectile attacks spawn in a new instance of a projectile object, render it each frame, and handle its collision until it connects. A hitscan, in comparison, is just a quick vector math that feels not much different than a projectile attack under the right circumstances. Implementing a realistic frag grenade, for example, would’ve been very taxing on the hardware if we had to spawn hundreds of small projectiles and launch them in every direction.

Also hitscan tends to be less bug prone compared to projectiles, as handling the collision of a fast-moving, tiny 3D collider can be problematic depending on the physics engine.

Beyond Hitscan

Some games find a good balance between the feel of hitscan and the feel of projectile. Especially in early 2000s, we had many games playing with these concepts to create unforgettable experiences, like Max Payne and FEAR, where you get to slow things down by entering bullet time.

In such games, the standard gameplay feels like hitscan due to super fast bullets, regardless of whether the implementation under the hood is actually hitscan. But the difference is, when you use your slow-motion abilities, the bullets act like projectiles, coming at you at snail’s pace, easily dodged and avoided. But your bullet time is limited. So, although you get to switch between hitscan and projectile modes, you need to choose the right moment, which makes for deeply engaging gameplay.

The Goal Is Fun

Most games will need both projectile and hitscan attacks for different things. Taking a moment to understand what works and what doesn’t in terms of gameplay will save you a lot of time fixing wrong implementations of either attack system. Ultimately what matters more than anything is that the game turns out to be fun.


Video Game Development
Game Design
Hitscan
Godot
secondary banner background