Projectile Vs Hitscan on Spark
Soul_Rider
Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
in Modding
I want to design some new weapons for Proving Grounds, but I thought I would ask for general opinion on which is the best way to go on the spark engine specifically.
To make a high speed shooter as I intend with Proving Grounds, hitscan weapons are not as accurate. Players move very quickly, and with a 100ms interp, the player isn't going to be where you see them on the screen. This leads me to create projectile weapons instead.
Currently Grenades are predicted projectiles, but the Rocket is not, as it was based on very old Grenade code. I have seen issues with Rockets flying straight through people, so predicted projectile is the way to go, but how would this impact on gameplay, and on client/server performance?
Also there have been lots of issues with things like spit, whereas I am not aware of any issues with the Railgun. Are these Projectile issues, or more related to the individual implementations?
Looking forward to some general opinions and informed advice
To make a high speed shooter as I intend with Proving Grounds, hitscan weapons are not as accurate. Players move very quickly, and with a 100ms interp, the player isn't going to be where you see them on the screen. This leads me to create projectile weapons instead.
Currently Grenades are predicted projectiles, but the Rocket is not, as it was based on very old Grenade code. I have seen issues with Rockets flying straight through people, so predicted projectile is the way to go, but how would this impact on gameplay, and on client/server performance?
Also there have been lots of issues with things like spit, whereas I am not aware of any issues with the Railgun. Are these Projectile issues, or more related to the individual implementations?
Looking forward to some general opinions and informed advice
Comments
definitely not.
@turtsmcgurt, I have looked at this, and as far as I can tell, the amount of animations, code and effects that are being played for the GL, are causing what appears to be the slowdown. I tried to do a recording of this, but while recording I got a max 35fps, but it does aid showing your point. Gorge Spit suffers no 'issues' during low FPS, where as firing the GL, feels like a tiny micro-stutter before it fires. It is tiny, but feels magnified the lower the framerate is.
Spit is just a meshed material file, rather than a separate model that gets created, in the case of a Grenade.
I get a similar feeling with the shotgun too, at low fps, although the old stuttering and hitching problems have been removed, but not sure what is causing that as it is hitscan.
Grenades have a minimum lifetime, so that they cannot blow up too quickly. Personally for me that is why they can feel crappy.
Railgun is hitscan which is why it doesnt have any of the projectile related issues.
I need to look into the visual effects they've used for the RailGun, because it certainly appears as if it is a projectile, but I can see from the code it clearly isn't.
I think for me the best way to go would be to make as many of the projectiles that I will use Meshed Materials (ala spit), rather than models (as in the case of the grenade).
Hmm, now I need to finalize which weapons I want in the mod...
Actually, this is inaccurate. Hitscan weapons are (in theory) absolutely accurate, in that if you aim correctly on the client and press the trigger, if it hits on the attackers screen, the server will register as a hit.
The server actually tracks the state of each player and moves back both positions and animations of all possibly affected targets to determine if a hitscan weapon would have hit (the major reason why servers are very CPU hungry - it does this for every moving player for collision purposes as well...)
This is independent on interp and network latency. Increased interp and network latency will just affect the defender - if there is a lot of latency, you have a very long "tail" for attackers to hit - the famous "died when around the corner" effect comes from this.