Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I believe rockets and tank shells are actual projectiles - you can probably jump into an empty server and time how long from firing to hitting a known distance to figure the speed of those.
And I believe arty takes 22 seconds from firing to hitting (irrespective of the distance of the target).
They absolutely are not hit scan, every single thing you shoot in this game has ballistics.
Therefore all bullets will require an (initial) velocity stat. I haven't noticed a difference in the lead for different weapons so I suspect (but don't know) that all "simple" bullets have the same initial velocity.
NOTE: If the velocities were different the bullet drop (on a stationary target) would be different - I haven't noticed that, perhaps others have.
---
The difference between hitscan vs projectile comes down to two points:
With a projectile, a server object is created and its position is updated every server tick (server frame) the inter-frame interpolation can be modeled as either a straight path or a curved one (to allow for bullet drop). In such a scenario the server is effectively creating/checking one path segment for each frame the bullet is in flight, additionally only the server is checking for intersection of bullet and target.
With a hitscan there is only a single calculation (initially done by the client) effectively it calculates where the target and bullet will be at X frames in the future and sees if they intersect. Of course the server would have to validate / repeat the same calculation to prevent cheating.
In order to do this calculation the client would only need two additional things:
TL;DR - Its possible to simulate a curved trajectory / bullet lead with hit-scan weapons.
Staying true to your name I see
You sound like you know just enough about game development to be at the peak of the Dunning-Kruger model. Don't worry though: the Team17 devs are right there with you!
Since gravity doesn't affect the horizontal plane you can start the calculation purely in the horizontal.
You have known starting positions of the target and the bullet and known velocities of both, therefore it's just an intersection of two lines, hence you now know the time where the bullet would be at that intersect point (again only in the horizontal plane).
Move the player model by that amount of time, calculate how much the bullet would have dropped at that point in space and then do the collision test.
Depends, if we assume its modeled correctly (although simplistically) you could derive the velocity simply by testing bullet drop at various distances.
If we can't assume that, all bets are off.
I am not sure what you mean by "no brainer".
I could implement this either way (projectile or hit-scan) per my previous description.
There would be some small differences in the player experience. However unless you can identify one of those differences and say that is what HLL does today - I don't think you can conclude definitively which implementation has been used.
There might be something similar for bullet drop where its so insignificant, you don't really need to compensate, but I get the feeling that the game only really cares about bullet drop on things like tank shells, anti tank, etc.
Hell Let Loose's "Realism" style seems to be that they add a bit of clunk to certain weapons just to prevent you from effortlessly snapshotting or doing wild stuff with the weapons.
Additionally I found newer posts that said that a hybrid model was used (either hitscan or projectile) based on weapon type and distance to target.
The point I am making is hit-scan can be used to model more complex ballistics - you are not forced to use projectiles - although there may be cases where projectiles are preferable.
----
To answer the OP's original question, I also found a note that originally (back in the 2019 timeframe) the velocities of all weapons were taken from the real values of the modeled weapons. I have no idea if those values have been tweaked over the past 1/2 a decade.
Try hitting someone who is running at 100-200 m distance with an SMG or a StG44 and you will see that bullets in this game are definitely NOT hitscan. You will have to lead your shots or you'll see your bullets hit the ground behind the guy. Different guns actually have different bullet velocities. As a rule of thumb, it seems the higher fire rate the guns have, the slower their bullets travel.
You can test this in the firing range with the far away dummies. With a Kar98, you'll hear the headshot sound slightly earlier than with a G43 or a Garand for example. SMGs and the StG44 have even lower velocities. Thats why im always thrown off a bit when playing with the Kar after using the semi-auto rifles for a while because i lead just a little too much.
That has been my assumption. When you are shooting someone running a few hundred meters out you have to take that range into consideration so it doesn't fell hitscan to me.