Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Advantages  





2 Disadvantages  





3 References  














Hitscan






Español


 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Hitscaninvideo game design, most commonly in first-person shooters, is a type of hit registration system that determines whether an object has been hit or not simply by scanning if the item used was aimed directly at its target and then applies the effects of the item (usually damage) instantly. A weapon, for example, does not launch a projectile the player needs to lead, damage is applied as soon as the player's crosshair is on a target and the fire button is pressed. Internally, this is most commonly done by simulating a ray from the origin of the item along the trajectory of the "projectile" and simply scanning for any objects touching the ray. Games might still show a visual of a projectile although it technically has no effect. In contrast, a projectile-based weapon would launch an actual projectile object that moves through the virtual space at a certain speed and will apply damage only once it has actually touched ("hit") a target.

A projectile weapon which uses unmodified hitscan information to dictate whether or not it has hit its target is often called a hitscan weapon. Shooting the weapon calls the hitscan function, and if an object is detected in the projectile's path, a hit is registered. Once it's determined if something was hit or not, the system will then give a damage output based on where the ray hit the object. Since the effect is immediate, the projectiles effectively travel at infinite speed and have a linear or otherwise simple trajectory—a practical approximation of a bullet's speed and accuracy over short distances.

The hitscan method is modifiable by making some surfaces reflective, making the hitscan rays go on forever with no stop, or able to penetrate multiple objects at the same time in the same line. To improve the realism, programmers may use hitscan functions in slightly different ways; for example, applying a random perturbation to the calculated path to simulate inaccuracy.[1][self-published source] A simplified version of this occurs in the first-person shooter DOOM; when the player holds down the fire button with the pistol, it fires inaccurately from the second shot. As another example, the submachine gun in Half-Life 2 calls a hitscan function in the middle of a 'blazing gun' animation, creating a small amount of lag between weapon deployment and the hitting of the target to better approximate real-life ballistics.

Advantages[edit]

The primary advantage is the simplicity of the simulation, which uses relatively simple mathematics to calculate hits. Although bullets do not move at infinite speed via perfectly straight trajectories, they move fast enough that a hitscan solution is normally a reasonable approximation. It leaves the question of where a weapon has hit to just one function, streamlining the programming of weapons.

In terms of game design, it readily ties cause (the player presses a 'fire' button, executing a hitscan function) to effect (the hitscan returns a result, the player sees the weapon's effect at that location). As a heavily simplified model of real world ballistics, it makes games more accessible in that there is no need to aim slightly ahead of a moving target in order to compensate for the time it takes for the projectile to reach it. Although less realistic, this model requires no understanding of real weapon handling in order to play the game, and reinforces the intuitive understanding that whatever the reticle is placed over will be hit.

Disadvantages[edit]

Visually representing the firing effect of a hitscan weapon can be difficult: since the weapon hits its target instantaneously, any bullet or projectile that comes from the weapon is merely a 'ghost', and where it lands may not necessarily represent its actual hit. In particular, a projectile bullet effect will always lag behind the effect of its hit, a problem which can be compounded by Internet latencyinonline multiplayer gaming.

It is hard to change the path of a projectile once it leaves the gun with things such as wind and gravity. Since it is shooting out a beam that hits the target almost immediately, there can be no real changes to the path. An example of this would be shooting at a high speed object over a long distance. Under hitscan, a user aiming right on the target would hit it. However, if it were a realistic shooting engine, one would have to lead that target. It is impossible to have projectile ballistics or projectile motion with hitscan projectiles. There are games that use both hitscan and projectile ballistics, but not at the same time. Alternatively, some games may detect with a hitscan method and then provide an animation with projectile ballistics.[1][self-published source]

With advances in processing and Internet bandwidth, it has become more practical to simulate the ballistic nature of real-world firearms in real-time games by using a more realistic "projectile" model, spawning bullets as actual game objects with mass and velocity, and continuously simulating them until they reach their target.

References[edit]

  1. ^ a b Jung, Tristan (2018-07-14). "How Do Bullets Work in Video Games? - Tristan Jung". Medium. Retrieved 2019-07-18.[user-generated source]

Retrieved from "https://en.wikipedia.org/w/index.php?title=Hitscan&oldid=1228908193"

Categories: 
Video game terminology
Esports terminology
Hidden categories: 
Accuracy disputes from September 2020
Articles with short description
Short description is different from Wikidata
Articles needing additional references from June 2019
All articles needing additional references
Articles needing cleanup from August 2019
All pages needing cleanup
Articles with close paraphrasing from August 2019
All articles with close paraphrasing
All articles with self-published sources
Articles with self-published sources from September 2020
 



This page was last edited on 13 June 2024, at 21:42 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki