From Wikipedia, the free encyclopedia

Wiki Education Foundation-supported course assignment

This article was the subject of a Wiki Education Foundation-supported course assignment, between 16 May 2019 and 24 August 2019. Further details are available on the course page. Student editor(s): Anthonyn2520. Peer reviewers: Anthonyn2520.

Above undated message substituted from Template:Dashboard.wikiedu.org assignment by PrimeBOT ( talk) 23:44, 16 January 2022 (UTC) reply

Untitled

This article needs a lotta work. it's includes a section on games which include non-hitscan weapons is now useless, because it's standard to use projectiles now.-- Kitten 13:19, 25 October 2007 (UTC) reply


Surely "... laser beam travels at the speed of light, which is the fastest way that information can be transmitted. This is actually faster than a hitscan shot in computer games, since a computer can not process all necessary commands as fast as light travels from one point to another ..." can't be said to be always right? What if the distance in the game is 1 million light years? Tharg uk ( talk) 12:50, 14 June 2008 (UTC) reply


Sniper rifles can take up to 2 seconds to reach the target in real world situations (depending on distance)

  • You are correct. Problem fixed. Yvh11a 03:26, 22 November 2005 (UTC) reply

Wow. Ended up here from the Devil May Cry 3 article. I've never heard this term before, and while I can guess from the article that the term is used in FPS, it's not stated where it came from, or why it means what it means... And googling the term doesn't produce anything useful either. So, has the origin of the term been lost in the (relatively short) antiquity of FPS gaming, or is it just some elitist you-know-it-or-you-don't sort of thing? -- Rablari Dash 02:07, 14 June 2006 (UTC) reply

  • Everything that follows is speculation, not fact. My guess is that it's a programmer's term. In the early days of first person shooters, some programmer probably wrote a function called hitscan() that would be run every time the player fired a gun, and which would scan the area within the player's crosshairs to see if any valid targets existed. If so, they were hit, if not, nothing happened. The term probably caught on and spread from there, which would explain it's relative obscurity; by the time you knew the term, you already knew what it meant. Speculation ends here. Yvh11a 18:00, 14 June 2006 (UTC) reply
Yeah. You're right. When You program games simply You do hitscan. You're young and learning. You don't call it that way because You've never heard the term before. It has been done in 80's in most of basic (and BASIC? ;) ) games (not a space shooters ;) ... ). Reason is that it is much simpler to do that this way. Or better to say it is immediate. You call "hitscan" function and it will get You what was hit. Right now, right on this place. Immediately. If You wanted to have more "realistic" aka projectile You had to create bullet "aside". Simulate it together with player and rest of moving objects (enemies, rain, ...) .......... There are 2 main reason, I can think of, for doing hitscan() a) You don't know of anything better b) You know what're You doing (silent hill 1 most certainly used hitscan projectiles might have been expensive for PSX's memory and cpu) ......... What is so hard on projectiles then? The trouble is that they travel on a smooth line and time in any (due to nature of computers!) game is not smooth. This means You have to cut this line and You will have some troubles with precision. That on itself is not such a big deal. You have to also find all thing which can hit this line. Find nearest of them. In nutshell it is like doing hitscan many times a second, depending on how much is time sliced in a game. It can of course be predicted whether it is needed for some time and make it little faster. But as You can seed doing just hitscan is much easier. Just ask some more experienced programmer. .... There's also little gem ;). The code which looks like a hitscan() can be in fact projectile code. It can be done, thought I don't know of anyone who does it. It needs the code to be re-entered until hitscan is needed. You need to make a variable telling You "hey You have a bullet fired from Your gun somewhere" and it helps separating player() from weapon(), where the projectile code looking like hitscan one will take place. ;) 86.61.232.26 ( talk) 08:13, 22 March 2009 (UTC) reply
  • There are numerous functions in different games with similar names. The Unreal engine (or at least UE1 and UE2) uses the TraceHit function. I think Hitscan comes from either the Build3d or the DooM engine. Of course, if you look that up and put it on the page, it'll probably get deleted for containing original research. :-P Like Rablari Dash I tried finding articles on it with google, but it's such a common term most pages you find just use the word in some context, as opposed to explaining what it is and where it comes from. 213.10.112.111 17:44, 1 April 2007 (UTC) reply
  • Does Red Orchestra: Ostfront 41-45 deserves a mention under "Games entirely without hitscan weapons"? It's a good example of a game with proper ballistics. The ballistics simulation in it is pretty sophisticated. --MattyDienhoff 18:42, 1 April 2007 (UTC)

Wikified

Well, I divided the article in sections and added an image of the Shock Rifle's artwork in UT2007. I hope that's good enough to take out the Wikify request. (Now I'm really thinking about registering =P)

Fair use rationale for Image:UT3 2007-01 trailer Shock Rifle.jpg

Image:UT3 2007-01 trailer Shock Rifle.jpg is being used on this article. I notice the image page specifies that the image is being used under fair use but there is no explanation or rationale as to why its use in this Wikipedia article constitutes fair use. In addition to the boilerplate fair use template, you must also write out on the image description page a specific explanation or rationale for why using this image in each article is consistent with fair use.

Please go to the image description page and edit it to include a fair use rationale. Using one of the templates at Wikipedia:Fair use rationale guideline is an easy way to insure that your image is in compliance with Wikipedia policy, but remember that you must complete the template. Do not simply insert a blank template on an image page.

If there is other fair use media, consider checking that you have specified the fair use rationale on the other images used on this page. Note that any fair use images uploaded after 4 May, 2006, and lacking such an explanation will be deleted one week after they have been uploaded, as described on criteria for speedy deletion. If you have any questions please ask them at the Media copyright questions page. Thank you.

BetacommandBot 19:58, 3 December 2007 (UTC) reply

Games entirely without hitscan weapons?

If it's true that hitscan is in fact an obsolete concept, then I agree with Kitten that the growing list of games that don't use it should be culled. However, if it's removed, it should be replaced with a section describing in general why and how hitscan weapons have become antiquated.

I understand why using only projectiles is desirable, but what I don't understand is how it's feasible. In theory, the original Quake could have supported projectiles for everything without skipping a beat. The problem is that netplay would have ground to a halt. Hitscan is useful because the server doesn't need to send all these projectile entities to clients every server frame.

What I'd like to know is how modern games overcome the bandwidth difficulties inherent in using so many entities. I suppose it's possible they don't even worry about it. If that's the case, though, am I to conclude that modern games simply expect a broadband connection to be even marginally playable online?

-- 99.241.97.241 ( talk) 13:54, 8 February 2008 (UTC) reply

As an avid Gamer, and fan of several genres of games, to include FPS, I can't recall seeing 56k as a minimum requirement for online/multiplayer on new games, since probably 2003-4. I'd say that the majority of online games do expect broadband, especially FPS, where realistic ballistics is becoming the norm, and generally preferred. Take this for what it's worth. -- 71.9.106.176 ( talk) 00:50, 13 December 2008 (UTC) reply
  • There are some games without hitscan weapons, but obsolete is a bit of a stretch. Unless you're going for the slow motion effect or not trying to be realistic, hitscan is just fine for anything that doesn't move slow (rocket launcher) or very long range (sniper rifle). as for bandwidth, I'm guessing the client just passes a vector to the server which passes it to all the other clients, and the visuals are calculated client-side and hits server-side. Unless you're shooting thousands of bullets per second it probably isn't a problem. also, some games with automatic weapons only send start and stop signals and the server calculates the individual bullets. that's why semi-auto is usually better because there's less chance that lag will mess up your aim. —Preceding unsigned comment added by 66.112.99.5 ( talk) 03:43, 12 May 2008 (UTC) reply


In multiplayer Quake guesses what will happen. If someone has slow connection his actions are predicted. It does not work all the time and it can create lots of weird situations - player magically ressurected ...

Other games either mask hitscan or simulate. 86.61.232.26 ( talk) 03:14, 3 April 2009 (UTC) reply

Reworked

Thanks for all the things You all gathered I appreciate it. You all made splendid job here. Although it seems like I left not much of former article I just liked to make it cleaner.

This photon laser section is good. It has to do something with perception and that is the point. CG fakes lots of stuff - "it is good when it looks good" ;) . BUT (!!!) it seem like it is from some Star Trek ;). I am just not eager to rework it ,sorry. But it is NOT BAD, it is JUST LONG for something that "dead simple" as hitscan is. And it doesn't mentions lag of perception, I think (?). Which of course makes this light travel, like slow-motion or interstellar thing quite doubtful analogy ....... Infinite speed is fine by me. And it is is heck of a shorter ;) . I removed it You can take it back if You wish but I have just stated my reason why it is not necessary. It would be nice if it was about how our eyes or senses can be faked instead.

The original definition definition was not bad, but was not exact either.

I have cleaned a lot of stuff. And this hitscan. It is about a function. Hitscan IS NOT what it was reffered to. It IS a function to test whether a hit occured. And it is NOT necessary to have infinite speed. It just happened to be called that way since ??? . This term is very influenced and used in pop-culture. Therefore You just don't (usually) mean something else when You say it. But taking it verbatim it is much broader issue than this article tried to capture.

Ballistics is doubtful. Yes You can do hitscan with ballistics. Why not? If You just don't take line and You use parabola instead. If we take it as a line than hitscan has at least 2 conditions. Speed and trajectory. Verbatim just linear trajectory is BS. Verbatim just infinite speed is BS. This whole hitscan issue is pop-culture BS.

Deriving something from this fuzzy definition {infinite speed AND linear trajectory}, like I wanted (disadvantage - ) is BS. I just think that it needs someone who will nurture it because this article is inherently fuzzy.

Also who said it has to be projectiles? What about swords? And arrows. Hexen, Heretic and all those old slashers certainly used it. It was how far away is someone at what angle to center of the view. Yes it is not exactly good example, but in case of those games there were no aiming cursor to start with. Even Doom used some range for weapons so that player had it easier. It might be mentioned but I am not sure about it. There's source of Doom and Wolf, I or anyone may dig it one day ;) . Whether it makes a good point or not. Moves article somewhere out of this fuzzyness.

Good example might have been System Shock's pipe?

Does it needs another condition? Like {infinte speed, linear trajectory, (no?) range}.

There's also nothing about distance ;). Hitscan is, in fact used in all (?) the games mentioned there, but in small scale - at one engine timestep.

Also is it projectile AND hitscan article? Because Max Payne has nothing to do here unless it is counter example. Which it is. Brilliant one, btw ;).

Some examples seems to propagate certain (rather unknown) games and one of them used EA or some other publisher while other did not. It seems quite like a advertisement. I believe there should be as small amount of games as possible. On the other hand if it contained BIG list of games which use it it would be nice. These days they rather do it by havok and kill some other nice stuff which could have been there instead of this mostly useless simulation.

Also good point should be to make it is good if used properly.

I had problems how to structure this whole thing. There are lots thing which needs better naming. Categories are little fuzzy too. It needs pictures or something. Like some diagrams or tables. I don't know how much it'd helpu usabilty though ;)

Cheers 86.61.232.26 ( talk) 10:43, 22 March 2009 (UTC) reply

SS pipe might have worked like that if I remember ??? 86.61.232.26 ( talk) 10:45, 22 March 2009 (UTC) reply
I liked previous definition very much shouldn't there be popular culture definion and from programmers perspective or something along that line ??? I'd be happy if it came back it was maybe better for casual gamer. Who knows? But I liked it ;). 86.61.232.26 ( talk) 10:50, 22 March 2009 (UTC) reply

slow motion - Half life 2

If it has it then I believe it is an example of the fact that it can be fired any time. Because it was disputed based on slow motion mod. I don't know but if it has hitscan, then it is used (hitscan()) in the middle of blazing of a gun and it fools the eye to think it is not hitscan.

Q: Is there a chance half life uses ballistics - parabola - and it means definition has to exclude linear pat ? I remember having it some offsets for projectiles in distance thought I can't tell whether they weren't random and proportional to distance.

I am adding it (half 2 blazing in the middle that is) - FIXME. 86.61.232.26 ( talk) 10:59, 22 March 2009 (UTC) reply

sorry man, but bullshit article. even contains spelling errors —Preceding unsigned comment added by 85.2.178.78 ( talk) 23:56, 10 April 2009 (UTC) reply

Ballistics

From the article: "The hitscan method precludes ballistics, as it cannot simulate any kind of movement of the bullet, such as a parabolic arc". There aren't any citations yet, and I don't see any reason why a hitscan function necessarily has to shoot a straight ray as opposed to a parabola or any other simple mathematical space curve that can be intersected with targets. -- Damian Yerrick ( talk | stalk) 02:41, 7 March 2011 (UTC) reply

It has to be a straght line actually, thats the standard algorithm (its actually called RAYCAST and not hitscan, at least thats a wider term - raycasts are used not only to detect hits but for many many many things in any game, like - to calculate distances between any two given objects for the A.I. stuff, or to detect if your charactes is in fron of a door to open it) - but a parabolic line can be simulated. E.g. you can create a temporary dummy object in the point where the bullet came from, and once per every frame you calculate how far the bullet goes and how much would it drop, create another temporary dummy object there and make a raycast between the first dummy and this object to detect any collision with objects that may be between this two points, - and so on for each frame. So this is not a true parabolic line, but its good enough to simulate it for most purposes. There are also different models. But most likely they also employ the "hitscan"/raycast algorithm. 95.79.219.43 ( talk) 14:07, 10 February 2012 (UTC) reply
No, Damian is right. "Hitscan" just means working out the target hit by a weapon, in the same game "tick" as the trigger is pulled. The point is, the effect happens instantly, the line to target is worked out there and then. But the line doesn't have to be a straight one. It can be any function you like. So the article is wrong. And that's not the only error in it. 92.40.253.186 ( talk) 15:31, 11 August 2012 (UTC) reply

Frame rate issue

When you people describe the "non-hitscan" model, it seems that you describe it as a straightforward phisical simulation with collision detection between bullets and objects. It is not an accurate description, because hit detection based solely on solid body collisions is not plausible, nor viable. Any action in games is divided into frames. Usually you have about 60-80 frames per second (the "frame rate"). That is, about 1/60th of a second between two given frames, right ? Bullets move fast - during this 1/60th of a second a pistol bullet would travel as much as 5 meters, and a rifle bullet - up to 10 meters. So, in this frame the bullet is 5 meters from the target - and in the next frame it would be 5 meters BEHIND it, just not hitting anything that is between. That is why solid bidy collision detection in games DOES NOT work for bullets (but may be viable for arrows which are larger and travel much slower). You have to use some other methods, e.g. what I've described before. Some of them actually employ a phisical bulet, but solely for ballistic calculations< and not hit detection. For example, you may have a balistic bullet and in each of the frames you make a raycast from it to detect if it is anything in front of it. 95.79.219.43 ( talk) 14:07, 10 February 2012 (UTC) reply

Not necessarily. The game's frame-rate, for rendering, and it's "tick-rate", for working out movement and gameplay, are usually independent. Otherwise games would play slower on slower systems, rather than just being jerkier.
You also don't need to calculate the projectile at each possible position for collision with objects. Instead of a point, make your bullet a line, between the start and end-positions of the bullet's travel in this "tick". Detect if that line passes thru an object. Ta-da! — Preceding unsigned comment added by 92.40.253.186 ( talk) 15:38, 11 August 2012 (UTC) reply

Small edits

Removed Halo Reach from the examples list. Halo is an example of early crude non-hitscan ballistics. RomanK79 ( talk) 19:24, 1 September 2014 (UTC) reply

Close paraphrasing of major source

The most recent rework is largely composed of close paraphrasing. As the rework was the work of one editor working in good faith in a Wiki Education Foundation–supported course (referenced in the infoboxes at the top of this Talk page), I’m hesitant to revert it wholesale. The article likely needs new experts in the topic to review the recent additions and the new source they use, and rewrite, replace, or remove them as appropriate. — Saxifrage 20:29, 20 August 2019 (UTC) reply

What's the origin of this term, hitscan?

It would be great to include it in the article. "Hit" and "Scan" isn't exactly obvious as something like instant-hit. — Preceding unsigned comment added by Bbcjamie ( talkcontribs) 07:40, 24 August 2019 (UTC) reply


Good question. As the author of the Build Engine, I suspect it may have been (partially) my invention. If you download KENBUILD.ZIP [1] (the original release of Build Source code) and look at ENGINE.C, you'll see a hitscan() function for exactly the purpose of this article - to instantly check what a bullet hits by means of ray tracing. BUILD.TXT mentions "hitscan" as early as March 31, 1994. I would guess that the function was likely coined and implemented a few weeks earlier - between February 18 and March 4 of 1994. The story is during my first long trip to Garland, Texas, I got a phone call from Todd Replogle (Duke 3D programmer), who was in need of a function to perform an instant hit check. It didn't make sense to use projectiles for all weapons. I think he was trying to implement pistol code at the time. I don't remember if it was Todd or myself (Ken Silverman) who connected the 2 words ('hit' and 'scan'). I think he came up with the 'hit' part. Looking at old source code of mine, it is likely that I came up with the 'scan' part, as I do have a lot of functions with 'scan' in the name, such as: ceilscan(), florscan(), and scansector(). Note that these 3 were internal functions that nobody else would have seen, and I wasn't exactly sharing my engine source code at the time - not even with other developers at Apogee!

It is really strange to hear this term being used in common speech today .. well, among video game enthusiasts anyway. I'm not sure how it crossed over to pop culture, but I'm guessing it may have been mentioned in a README file or hint manual of one (or more) of the Build Engine games. Awesoken ( talk) 15:31, 5 December 2021 (UTC) reply

References