Hitscan
Encyclopedia
Hitscan is a term that is used mainly in computer games
Computer Games
"Computer Games" is a single by New Zealand group, Mi-Sex released in 1979 in Australia and New Zealand and in 1981 throughout Europe. It was the single that launched the band, and was hugely popular, particularly in Australia and New Zealand...

. It is a test to find out what can be hit by an in-game weapon (be it a melee weapon, or the projectile emitted by a firearm). Hitscan weapon is often used colloquially to refer to a projectile weapon which uses unmodified hitscan information to dictate whether or not it has hit its target—deploying the weapon calls the hitscan function, and if an object is detected in the path of the projectile, a hit is registered. The effect is that these projectiles travel at infinite speed and have a linear or otherwise simple trajectory—a practical but very crude simulation of a bullet's speed and accuracy. Programmers need not use hitscan data in precisely this way when programming weapons.

Although hitscan weapons behave as described above, they can be given a more 'natural' appearance; for example, the assault rifle in Half-Life 2
Half-Life 2
Half-Life 2 , the sequel to Half-Life, is a first-person shooter video game and a signature title in the Half-Life series. It is singleplayer, story-driven, science fiction, and linear...

 calls a hitscan function in the middle of a 'blazing gun' animation, creating a small amount of lag
Lag
Lag is a common word meaning to fail to keep up or to fall behind. In real-time applications, the term is used when the application fails to respond in a timely fashion to inputs...

 between weapon deployment and the hitting of the target to better approximate real-life ballistics
Ballistics
Ballistics is the science of mechanics that deals with the flight, behavior, and effects of projectiles, especially bullets, gravity bombs, rockets, or the like; the science or art of designing and accelerating projectiles so as to achieve a desired performance.A ballistic body is a body which is...

.

Contrast to simulation

With advances in processing and internet bandwidth, it has become more practical to simulate the ballistic
Ballistics
Ballistics is the science of mechanics that deals with the flight, behavior, and effects of projectiles, especially bullets, gravity bombs, rockets, or the like; the science or art of designing and accelerating projectiles so as to achieve a desired performance.A ballistic body is a body which is...

 nature of real-world firearms in real-time games by using "projectile" models.

Advantages

The primary advantage is the 'cheapness' of the simulation, it uses relatively simple mathematics to calculate hits. Although bullets do not move at 'infinite speed' via perfectly straight trajectories in life, they move fast enough that a hitscan solution is 'good enough' to simulate their behaviour for the layman. 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). It also simplifies the rules of the game, in that there is no need to lead the target (to aim slightly ahead of a moving target in order to compensate for the time it takes for the projectile to reach it).

Disadvantages

Visual representation of a bullet may cause confusion when it is applied to hitscan weapons. Because the actual bullet has no position, the bullet that is drawn is merely a 'ghost', where it lands may not necessarily represent its actual hit. Internet latency can compound this problem in online multiplayer gaming.

The hitscan method precludes ballistics, as it cannot simulate any kind of movement of the bullet, such as a parabolic arc or atmospheric resistance (including wind direction).

Examples

  • Pistol
    Pistol
    When distinguished as a subset of handguns, a pistol is a handgun with a chamber that is integral with the barrel, as opposed to a revolver, wherein the chamber is separate from the barrel as a revolving cylinder. Typically, pistols have an effective range of about 100 feet.-History:The pistol...

    , shotgun
    Shotgun
    A shotgun is a firearm that is usually designed to be fired from the shoulder, which uses the energy of a fixed shell to fire a number of small spherical pellets called shot, or a solid projectile called a slug...

    s, chaingun, zombies' weapons and the Spider Mastermind's chaingun presented in Doom
    Doom (series)
    Doom is a series of first-person shooter video games developed by id Software. The series focuses on the exploits of an unnamed space marine operating under the UAC , who fights hordes of undead and demons in order to survive...

     gaming franchise
  • Every single bullet weapon in the entire Call of Duty
    Call of Duty
    Call of Duty is a first-person shooter video game developed by Infinity Ward and published by Activision in 2003. It is the first game in a series with the same name. The game simulates the infantry and combined arms warfare of World War II. The game is based on the Quake III: Team Arena engine...

     franchise, except for the mounted Barrett M82 sniper rifles and bullet-time scenes.
  • Some bullet weapons in Halo: Combat Evolved
    Halo: Combat Evolved
    Halo: Combat Evolved, frequently referred to as Halo: CE, or Halo 1, is a first-person shooter video game developed by Bungie and published by Microsoft Game Studios. The first game of the Halo franchise, it was released on November 15, 2001 as a launch title for the Xbox gaming system, and is...

    .
  • Insurgency: Modern Infantry Combat
    Insurgency: Modern Infantry Combat
    Insurgency: Modern Infantry Combat is a total conversion mod for Valve Software's Source Engine. Insurgency is a multiplayer, tactical first person shooter, and implements elements of realism, in an attempt to increase player immersion and promote teamwork...

  • Machinegun, shotguns and railgun
    Railgun
    A railgun is an entirely electrical gun that accelerates a conductive projectile along a pair of metal rails using the same principles as the homopolar motor. Railguns use two sliding or rolling contacts that permit a large electric current to pass through the projectile. This current interacts...

     in the Quake series
    Quake (series)
    The Quake series is a line of first-person shooter video games produced by id Software.-Overview:The Quake series is somewhat unusual in that its focus changes frequently; the story of Quake II has nothing to do with Quake, and Quake III Arena has little to do with either of its predecessors...

    .
  • Shock rifle (primary fire), minigun, sniper rifle and lightning gun in Unreal Tournament
    Unreal Tournament
    Unreal Tournament is a futuristic first-person shooter video game co-developed by Epic Games and Digital Extremes. It was published in 1999 by GT Interactive. Retrospectively, the game has also been referred to as UT99 or UT Classic to differentiate it from its numbered sequels...

  • The Battle Rifle and other bullet weapons in Halo 2
    Halo 2
    Halo 2 is a first-person shooter video game developed by Bungie Studios. Released for the Xbox video game console on November 9, 2004, the game is the second installment in the Halo franchise and the sequel to 2001's critically acclaimed Halo: Combat Evolved...

  • Battlefield 1942
    Battlefield 1942
    Battlefield 1942 is a 3D World War II first-person shooter computer game developed by Swedish company Digital Illusions CE and published by Electronic Arts for Microsoft Windows and Apple Macintosh . The game can be played in singleplayer mode against the computer game AI or in multiplayer mode...

    and Battlefield Vietnam
    Battlefield Vietnam
    Battlefield Vietnam is the second video game in Electronic Arts' Battlefield franchise after Battlefield 1942. The game was developed by the Swedish company Digital Illusions CE and published by Electronic Arts on March 15, 2004 in North America and days later in other parts of the world....

    use the hitscan method; their successors, Battlefield 2
    Battlefield 2
    Battlefield 2 is a computer game by the Swedish developer Digital Illusions CE . During development, Trauma Studios contributed to the development of the game after it was acquired by DICE...

    and Battlefield 2142
    Battlefield 2142
    Battlefield 2142 is a first-person shooter video game developed by Digital Illusions CE and produced by Electronic Arts . It is the fourth game in the Battlefield series...

    , dispensed with this.
  • All weapons of Team Fortress 2
    Team Fortress 2
    Team Fortress 2 is a free-to-play team-based first-person shooter multiplayer video game developed by Valve Corporation. A sequel to the original mod Team Fortress based on the Quake engine, it was first released as part of the video game compilation The Orange Box on October 10, 2007 for Windows...

     which fire bullets use hitscan to test for hits, but use the particle system
    Particle system
    The term particle system refers to a computer graphics technique to simulate certain fuzzy phenomena, which are otherwise very hard to reproduce with conventional rendering techniques...

     to draw the bullets on-screen.
  • Most bullet weapons in Halo: Reach
    Halo: Reach
    Halo: Reach is a first-person shooter video game developed by Bungie and published by Microsoft Game Studios for the Xbox 360 console. Reach was released in North America, Australia, and Europe on September 14, 2010. The game takes place in the year 2552, where humanity is locked in a war with the...

    .
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK