Projectile Vs Hitscan on Spark

Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
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 :D

Comments

  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    Spit is actually a combo of both IIRC. Close up it's hit scan and far away it's a projectile, or maybe it was the other way around.
  • turtsmcgurtturtsmcgurt Join Date: 2012-11-01 Member: 165456Members, Reinforced - Supporter
    edited January 2014
    seeing as how you've familiarized yourself with the code, any idea why the grenades fired from the grenade launcher feel shitty when compared to gorge spit? it's like the server side grenade is a half second behind, making it pretty difficult to use it seriously. the other option is that it's exaggerated due to the slower travel time, along with the high as balls interp. (which is more likely, I guess)
    SamusDroid wrote: »
    Spit is actually a combo of both IIRC. Close up it's hit scan and far away it's a projectile, or maybe it was the other way around.
    definitely not.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    edited January 2014
    @SamusDriod, I have double checked the code, but I cannot find any reference to Spit being Hitscan at any distance, at least, there is nothing in SpitSpray or Spit.lua which would indicate anything other than a purely projectile weapon.

    @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.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    It really doesnt matter what kind of MS your player ents would have, hitscan should always be accurate regardless. It more depends on what kind of gameplay you want.. Projectile weapons reward more accurate prediction and leading, where hitscan rewards more accurate tracking.

    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.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    Hmm, in that case I will probably look at using a combination of the two, tailored to the gameplay I want.

    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...


  • matsomatso Master of Patches Join Date: 2002-11-05 Member: 7000Members, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Shadow, NS2 Community Developer
    Soul_Rider wrote: »
    I
    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.

    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.


Sign In or Register to comment.