-1

How is generally managed the shooting and hitting targets in online shooter games? How it is decided who is actually hit if two players are moving and shooting at each other? Is it decided by server or clients? How "real-time" the synchronization between server and all clients is? I can imagine that the players ping (different ping) and some server and/or client computation time can make quite a mess in this. Is it so?

I seen various weird stuff in games I played, I would like to get some explanation why is it happening as it is:

  1. I shoot directly into the body of another player from close distance and it is no hit (Counter Strike 1.6, Arma 2, Arma 3, Heroes & Generals). Is it bias in perception, or it is real scenario for some reason?

  2. I shoot somewhere into a blank space (but realtively close to some player) and it is hit (Counter Strike 1.6, Heroes & Generals). Again is it bias in my perception? Or is it some auto aiming aid of those games?

  3. Players kill each other (Heros & Generals) - why is that happing? Is not clear who "shoot" first?

  4. I am getting killed when I am already hidden behind corner (Heroes & Generals).

If it is not possible to describe this process in some general scope (how it is usually handled in games), then please answer it for the games I mentioned.

Note: my ping is usually much lower then ping of other players - in CS1.6 I usually have less than <5 ms.

closed as off-topic by Unionhawk, arghtype, greg-449, Virusbomb, Rapitor Oct 3 at 18:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about Game Design and Development are off topic. This includes speculative questions about developer intent, with respect to both mechanics and narrative. You might want to ask over at GameDev.SE, but be sure to read their FAQ" – arghtype, greg-449, Virusbomb, Rapitor

  • 2
    This depends heavily on the game. It's generally adjudicated by a server, but how a game handles lag varies wildly game to game. Some games choose a "favor the shooter" approach (if the shooter clicked on you on their screen, but you were behind cover on your screen, the shooter wins), some take the opposite, but there's a variety of ways it's handled – Unionhawk Oct 3 at 17:34
  • @Unionhawk Thanks for comment. I added the scenario 4. - you mentioned. I almost forget about that. If it is different game by game, then I would like to get answer related to the game I mentioned. – matousc Oct 3 at 17:40
  • 1
    This question is pretty broad, but could be edited to reduce scope. Please consider editing it to only fit with one game and one and post again to apply to other games. Right now this is four questions for three games, a total of twelve questions - far too many for one post – PausePause Oct 3 at 18:22
  • I think this is mainly down to interpolation and the mechanism that is used to combat latency for all concerned. – Smock Oct 4 at 15:30
3

I will address your question in the realm of Counter Strike since it is the game out of those you listed that I am most familiar with. Take it with a grain of salt since not all FPS games are the same.

  1. If as you stated in the question you are moving and shooting, in CS it is quite possible that you would miss a target, even at close range, due to moving inaccuracy. Many games have moving inaccuracy especially those that claim to be more realistic but others that you have not listed like CoD, Battlefield, Overwatch, etc have negligible to no moving inaccuracy and reward players for moving quickly. In the scenario you listed, it is normal for a player with their crosshair directly on another player to miss a shot if they are moving (I'd actually be quite mad if I did get killed like that). Even if you are standing still, IF you and the other player are far enough away, that you would miss even if your crosshair was right on their head due to range inaccuracy of most guns outside of snipers (at least in CSGO).

  2. Same as above. I'm not sure how the vectors for bullets are calculated in CS but I assume they have a 3 dimensional plane with a variable area depending on what your character is doing (moving, crouching, standing still, jiggle peaking, etc). The coordinates of the final resting place of the bullet would be calculated and a vector would be drawn from the gun to the point and if it intercepts a character it will do damage based on the guns damage, where it hit on the character model, and if it passed through any penetrable surfaces.

  3. This one is not too absurd and it happens in games of all types. All games have different bullet travel times so it is quite easy for you to have a firefight with another person where both of you would have bullets in the air traveling towards the other at the same time. Unless the bullets are meant to despawn after you die, it is reasonable for you and another player to kill each other. It is even easier for this to happen if explosives are involved since they usually travel slow or have delayed explosions.

  4. This is, as Unionhawk said, more of a server thing. In CS, there are multiple kinds of servers that you may play on with something called a tick rate. The higher the tick rate, the more often the location of you and your enemies is updated. With low tick rates, although it is frustrating, it is normal for a shot to get fired where you were and still register as a hit. Since your character model is still registered as being there and bullets have a certain velocity, when the server does update, it would calculate you as still being there even if you were around the corner.

Hopefully this is helpful for you and please let me know if there is anything else you would like me to clarify.

Not the answer you're looking for? Browse other questions tagged or ask your own question.