To improve the responsiveness of weapons...

2»

Comments

  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    edited March 2012
    I tried a bit to fire on the cc, and the response time is close to optimal (100ms+ping if I understood correctly).

    But the problem I think is that the model hit animation seems to be linked to the server instead of being client side, so it lags behind.

    Nice paper on the subject by one of the valve's guy :

    <a href="http://web.cs.wpi.edu/~claypool/courses/4513-B03/papers/games/bernier.pdf" target="_blank">http://web.cs.wpi.edu/~claypool/courses/45...mes/bernier.pdf</a>
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    edited March 2012
    <!--quoteo(post=1911795:date=Mar 10 2012, 09:23 AM:name=matso)--><div class='quotetop'>QUOTE (matso @ Mar 10 2012, 09:23 AM) <a href="index.php?act=findpost&pid=1911795"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->However, the flinching effect (and the effect on health/armor) that your damage causes reflects a state change in an entity you don't "own". It would be a nightmare to predict on the client, and for normal lag-ranges and most effects, the lateness is acceptable (200 ms lateness in seeing a skulk die is 3-4 extra rifle bullets).<!--QuoteEnd--></div><!--QuoteEEnd-->

    200ms is acceptable!? On a 0 ping server? That's crazy.

    I don't understand. Surely that delay can be minimized to close to the ping time? If I'm playing on server with 50 ping then I've should be able to receive the update from the server that tells me if I've hit or not at close to 50ms. That's the way it seems to work in source.

    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->I'm not doing this to give NS2 bad rep, but have to face the fact that if we want NS2 to cater for the competetive players, it needs to be sub 100ms. Currently it's 250ms. :)<!--QuoteEnd--></div><!--QuoteEEnd-->

    Nice thread Skie. Honestly I don't think NS2 will ever be a good competitive game. In ns2 you get 20 updates a second from 30 tickrate servers with 100ms of interp delay. Not to mention the current poor server performance. Compare that to cs:go where all servers are 100tick and you can set your interp as low as 9.8ms.

    I really can't understand having only 30 tickrate servers for a game like ns2 where aliens are often moving around at very fast speeds. I'm sure it will be improved on greatly before release but I doubt we'll ever see 60 tickrate servers for ns2.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    edited March 2012
    Yes Yuuki, that is the point of client/server systems. The server decides if you have hit something or not. Therefore the animation is tied to the server.

    Imagine the client keeps displaying animations of a target being hit, and the player doesn't die after the specified number of hits. First thought, they are cheating, because the hit has clearly registered. This is why hit animations are tied to the server 'confirmation' of the hit, rather than a client that is only telling you what would happen if nothing changes.

    Great document by the way, well found :) Explains it much clearer than I could :)
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    I tried to do the same thing in cs:go, it's similar to quake in that it's basically instant. The death message has already came up and the players gun has hit the floor almost as soon as I clicked.

    Here's a quick video: <a href="http://www.youtube.com/watch?v=PM8I52oM07w&feature=youtu.be" target="_blank">http://www.youtube.com/watch?v=PM8I52oM07w...eature=youtu.be</a>

    <img src="http://i.imgur.com/Sxh1J.jpg" border="0" class="linked-image" />

    <img src="http://i.imgur.com/xy3Aq.jpg" border="0" class="linked-image" />

    <img src="http://i.imgur.com/kHR9o.jpg" border="0" class="linked-image" />

    <img src="http://i.imgur.com/hCsj3.jpg" border="0" class="linked-image" />
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    Wow, that is really impressive. I know they said they were making CS:GO a much tighter, more accurate game, but wow, that is impressive. Would be interesting to find out what techniques they've used to achieve that.

    Any information on how the system holds up in online play?

    I highly doubt it is, but it's almost like they've made a trusted client system :)

    Makes me wonder... Is it possible to make a kind of trusted client/server/peer-peer hybrid. This would have the server acting as presiding judge.

    The server in essence watches a peer-peer match, and only sends out interrupts when players do things that are outside of the rules- ie: fire faster than is allowed, move faster than allowed, etc.
  • Raza.Raza. Join Date: 2004-01-24 Member: 25663Members, Constellation
    <!--quoteo(post=1911828:date=Mar 10 2012, 01:12 PM:name=Soul_Rider)--><div class='quotetop'>QUOTE (Soul_Rider @ Mar 10 2012, 01:12 PM) <a href="index.php?act=findpost&pid=1911828"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I'm Q3 and UT, that is my original gaming background. That is also why I know trying to compare a client/server system to a non-client/server system cannot realisticly be done.

    The Lua/C++ debate isn't even part of this issue. Quake works out all the code on the clients, and passes it around to each other, with a little bit of co-ordination on the server. In CS:S/NS2 the clients update some information to the server, then the server calculates everything. This causes multiple issues, and basically means that in a battle, the feeling of responsiveness in the game is often affected by the slowest updating player in that battle.

    Client prediction was invented to try and 2nd guess what was happening, and that is why you see blood on contact etc, even though no hit is actually registered on the server. This method, while creating a seemingly constant instant world, iis actually behind the real world.

    The quake system is much closer to real world reactions, but there is next to no security and protection against cheaters.

    It is purely a trade off decision that has to be made in the development process - Fairness and slower responses with client/server or anything goes hacks and very accurate responses in a peer-peer system.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I'm not sure what your point is, because Quake 3, Unreal Tournament, Half-Life, CS:S and NS2 all use a client/server architecture.
    Not even Quake 1 was peer-to-peer according to a quick search on the net.
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    <!--quoteo(post=1911849:date=Mar 10 2012, 02:31 PM:name=Soul_Rider)--><div class='quotetop'>QUOTE (Soul_Rider @ Mar 10 2012, 02:31 PM) <a href="index.php?act=findpost&pid=1911849"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Wow, that is really impressive. I know they said they were making CS:GO a much tighter, more accurate game, but wow, that is impressive. Would be interesting to find out what techniques they've used to achieve that.

    Any information on how the system holds up in online play?<!--QuoteEnd--></div><!--QuoteEEnd-->

    It's the same on all source games on a local server. Try it on CS:Source, same thing. When you introduce ping into it then it obviously delays it by that amount (you can use net_fakelag in source the same as net_lag in ns2). Interestingly even if I set my interpolation to 200ms I don't get any delay for the kill to register, but the blood splatter is delayed. I guess once the server sends you the packet that says someone has died then it overwrites the interpolation delay time or something. It seems like ns2 has the interp delay built in even when on local servers. Whatever it is, it definitely doesn't feel responsive and I'm sure there's a way to improve it.
  • FloodinatorFloodinator [HBZ] Member Join Date: 2005-02-22 Member: 42087Members, Reinforced - Shadow
    <!--quoteo(post=1911842:date=Mar 10 2012, 02:30 PM:name=Wilson)--><div class='quotetop'>QUOTE (Wilson @ Mar 10 2012, 02:30 PM) <a href="index.php?act=findpost&pid=1911842"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->200ms is acceptable!? That's crazy.



    Nice thread Skie. Honestly I don't think NS2 will ever be a good competitive game. In ns2 you get 20 updates a second from 30 tickrate servers with 100ms of interp delay. Not to mention the current poor server performance. Compare that to cs:go where all servers are 100tick and you can set your interp as low as 9.8ms.

    I really can't understand having only 30 tickrate servers for a game like ns2 where aliens are often moving around at very fast speeds. I'm sure it will be improved on greatly before release but I doubt we'll ever see 60 tickrate servers for ns2.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Actual games often are based on a "old" engine, like source in CS:GO.
    You can't really compare Spark with source, because there is more than 10years (Source started around 1999 till it was released 2004) of difference in development and Human resources.

    If spark would be 13 years old, 100ticks wouldn't be a problem.

    Never forget that Spark is a brand new engine programed by <b>1!!!!!</b> person for a long time. Its like comparing a 18 and 28 years old girl. The 18 years old looks sexy but is a virgin and the 28 years old is more experienced but only 60% of her body are natural.
  • playerplayer Join Date: 2010-09-12 Member: 73982Members
    <!--quoteo(post=1911821:date=Mar 10 2012, 11:22 AM:name=Soul_Rider)--><div class='quotetop'>QUOTE (Soul_Rider @ Mar 10 2012, 11:22 AM) <a href="index.php?act=findpost&pid=1911821"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Quake and Spark engine are Extremely different.

    For example on Quake you can play with a 300ms+ ping and still get hit registration, in fact you can run at over 500ms and still compete, Why? because all the prediction and bullet code is done on each machine, there is no server control over firing. Quake doesn't have a true Server/client relationship it has more a of peer-peer relationship.

    ...<!--QuoteEnd--></div><!--QuoteEEnd-->

    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->The problem is the only way to go for a high speed, accurate fighting system is peer-peer. Unfortunately, there is no way of making a peer-peer system cheat free. Games using server/client rely on high bandwitdh and good connections for all the players to have an accurate game, currently not possible with the worlds internet connections. Games using peer-peer can run very accurately with massive pings, because communication is done direct with the person you are shooting, rather than a 3rd party intermediary (server).

    When every gamer has access to 1gb internet, current client/server games should run as well as peer-peer to games. Unfortunately that far in the future network traffic will be much higher in those modern games, thus negating the benefit, but NS2 and CS:S will play really well. Servers should be able to handle NS2 by then as well :)<!--QuoteEnd--></div><!--QuoteEEnd-->

    P2P, you keep using that word, I do not think it means what you think it means. Quake was the first game (or one of the first anyway) to introduce the client-server architecture, it does not use P2P, clients do not send any data to other clients, they are physically seperated and utterly unaware of each other, everything is routed through the server. Q1\Q2\Q3\Q4\Gldsrc\Source all use this exact same set-up, as does NS2.
  • SkieSkie Skulk Progenitor Join Date: 2003-10-18 Member: 21766Members, NS2 Playtester, Reinforced - Shadow
    <!--quoteo(post=1911862:date=Mar 10 2012, 05:47 PM:name=Floodinator)--><div class='quotetop'>QUOTE (Floodinator @ Mar 10 2012, 05:47 PM) <a href="index.php?act=findpost&pid=1911862"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Never forget that Spark is a brand new engine programed by <b>1!!!!!</b> person for a long time. Its like comparing a 18 and 28 years old girl. The 18 years old looks sexy but is a virgin and the 28 years old is more experienced but only 60% of her body are natural.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Of course, credit where it's due. It's been a great job so far, just pointing out that it can get even better.

    NS2 might not be competitive quality upon launch yet, but UWE will certainly continue working on it even after that, I hope!

    Here's to great years to come.

    <img src="http://tournaments.syracusenets.com/wp-content/uploads/2011/05/Trophy.png" border="0" class="linked-image" />
  • JerunkJerunk Join Date: 2002-11-22 Member: 9659Members
    <!--quoteo(post=1911867:date=Mar 10 2012, 11:09 AM:name=Skie)--><div class='quotetop'>QUOTE (Skie @ Mar 10 2012, 11:09 AM) <a href="index.php?act=findpost&pid=1911867"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Of course, credit where it's due. It's been a great job so far, just pointing out that it can get even better.

    NS2 might not be competitive quality upon launch yet, but UWE will certainly continue working on it even after that, I hope!

    Here's to great years to come.

    <img src="http://tournaments.syracusenets.com/wp-content/uploads/2011/05/Trophy.png" border="0" class="linked-image" /><!--QuoteEnd--></div><!--QuoteEEnd-->


    Great thread though, two things I look forward to is better fps and hit registration.
  • countbasiecountbasie Join Date: 2008-12-27 Member: 65884Members
    edited March 2012
    Is this also the reason I sometimes feel instakilled by a marine as a skulk?

    Why is the ammo display not changing when you shoot on your pictures, Skie?

    Well the lag is enormous, I actually start having a feeling when skulks are going to die - I stop shooting before the game tells me he is dead ;)

    Yuuki: Wow, that demonstration pretty insane.

    Edit: One answer I didnt't notice.
  • SkieSkie Skulk Progenitor Join Date: 2003-10-18 Member: 21766Members, NS2 Playtester, Reinforced - Shadow
    <!--quoteo(post=1911875:date=Mar 10 2012, 07:01 PM:name=countbasie)--><div class='quotetop'>QUOTE (countbasie @ Mar 10 2012, 07:01 PM) <a href="index.php?act=findpost&pid=1911875"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Why is the ammo display not changing when you shoot on your pictures, Skie?<!--QuoteEnd--></div><!--QuoteEEnd-->
    It displays the update for the 1 bullet I shot.
  • IronHorseIronHorse Developer, QA Manager, Technical Support & contributor Join Date: 2010-05-08 Member: 71669Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Subnautica Playtester, Subnautica PT Lead, Pistachionauts
    edited March 2012
    <!--quoteo(post=1911832:date=Mar 10 2012, 04:27 AM:name=Skie)--><div class='quotetop'>QUOTE (Skie @ Mar 10 2012, 04:27 AM) <a href="index.php?act=findpost&pid=1911832"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I also played Action Quake2 on the Finnish national team, I think that game still handled regging a bit differently. There was more delay before the bullets left the weapons, depending on your ping. ie. no prediction at all. Everything done on server.<!--QuoteEnd--></div><!--QuoteEEnd-->

    i want to say well done, again, finding this, but also
    ANOTHER ACTION QUAKE2 PLAYER?! i used to be in HoA, 2nd best clan
    god i love that mod, i played it into the ground, owned a server etc etc. and you're right, remember the sniper rifle when shooting at a falling player in say, jungle? major delays.
    must've been why they went all client side with Q3

    surely the pure server method would assist with the cheater problem if this was changed?

    p.s. PM me if you want to 1vs 1 with some m4s :)

    <b>Edit</b>: the devs really should consider this thread with some thought- tightening that responsiveness and feedback will greatly improve the perceived performance complaints.
  • paradoxumparadoxum United Kingdom Join Date: 2012-03-05 Member: 148193Members
    <!--quoteo(post=1910795:date=Mar 6 2012, 06:21 PM:name=GORGEous)--><div class='quotetop'>QUOTE (GORGEous @ Mar 6 2012, 06:21 PM) <a href="index.php?act=findpost&pid=1910795"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Yeah. It only takes 10 bullets to kill a skulk. Do you ever have 40 bullets remaining when you kill skulks? I usually end up dumping 25-50 per skulk.

    When in doubt, empty the magazine.<!--QuoteEnd--></div><!--QuoteEEnd-->

    wow seriously 10 bullets? I can empty entire clips at them and almost all the shots will visibly hit on my screen before they die
  • ogzogz Join Date: 2002-11-24 Member: 9765Members
    What is the issue of 'predicting' when a skulk would die, based on the bullets you shoot?

    It might look funny if in reality the skulk didn't die because he got healed, and you need to make him alive again on the client side...

    maybe some queue (visual or audio) when the client is predicting the skulk has died?
  • w0dk4w0dk4 Join Date: 2008-04-22 Member: 64129Members, Constellation, Reinforced - Shadow
    edited March 2012
    The claim that Quake uses P2P/trusted clients just made my day hahaha!

    Anyways, 200+ ms is absolutely unacceptable. The time should basically be the round trip time of the packet as well as some buffer time based on the tickrate of the server. (so with 30 ticks and a ping of 10, somewhere around 50ms).

    Also, regarding hit prediction stuff, read this excellent document:

    <a href="https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking#Lag_compensation" target="_blank">https://developer.valvesoftware.com/wiki/So...ag_compensation</a>
  • SkieSkie Skulk Progenitor Join Date: 2003-10-18 Member: 21766Members, NS2 Playtester, Reinforced - Shadow
    <!--quoteo(post=1911920:date=Mar 10 2012, 10:43 PM:name=ironhorse)--><div class='quotetop'>QUOTE (ironhorse @ Mar 10 2012, 10:43 PM) <a href="index.php?act=findpost&pid=1911920"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->ANOTHER ACTION QUAKE2 PLAYER?! i used to be in HoA, 2nd best clan
    p.s. PM me if you want to 1vs 1 with some m4s :)<!--QuoteEnd--></div><!--QuoteEEnd-->
    I stopped playing a looooooooooong time ago :D
    I was mostly interested in the jumping side of Aq2 towards the end of my career in it, but it's such a reflexes increasing game that you get the basic FPS ownage skills by playing it for 6 years.

    But while I played, I was mostly M4.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    <!--quoteo(post=1911864:date=Mar 10 2012, 05:01 PM:name=player)--><div class='quotetop'>QUOTE (player @ Mar 10 2012, 05:01 PM) <a href="index.php?act=findpost&pid=1911864"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->P2P, you keep using that word, I do not think it means what you think it means. Quake was the first game (or one of the first anyway) to introduce the client-server architecture, it does not use P2P, clients do not send any data to other clients, they are physically seperated and utterly unaware of each other, everything is routed through the server. Q1\Q2\Q3\Q4\Gldsrc\Source all use this exact same set-up, as does NS2.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I am sorry, you have to excuse me. My brains thoughts and the words I type/talk are not always connected :) I didn't mean P2P. I do know what P2P is, unfortunately it is very easy to get myself confused. I have a condition that makes me obsessed with details, and yet gives me an inability to communicate them to anyone without difficulty :)

    Over time you'll get used to my posts having the odd glaring error. Generally though, if you can ignore the obvious mistakes, the points I am making can usually be found. To be fair, the problem is at it's worst when I try and reply quickly. Must remember to slow down and re-read my posts before submitting :)
  • Sling_BladeSling_Blade Join Date: 2002-11-01 Member: 3412Members, Reinforced - Shadow
    Soul no offense but I really don't think you were very clear in anything that you said and have probably confused a lot of people...

    I'm not sure there is much difference between post quakeworld games and NS2's and most other current client/server architectures. A lot of the same techniques have been in use for a long time. At any rate, Wikipedia has a decent explanation of various techniques:

    <a href="http://en.wikipedia.org/wiki/Lag_(online_gaming)#Solutions_and_lag_compensation" target="_blank">http://en.wikipedia.org/wiki/Lag_(online_g...ag_compensation</a>

    But all this has to do with movement. None of these techniques necessitate a delay in hit registration, beyond the computational time it takes to do them. Which, most likely, is what IS the problem. But optimization is usually not a priority in beta.

    By the way, there are other ways to notice this lag. Anything that requires the server to make a decision has the same delay: mines going off, buildings being destroyed, etc.

    What is the tick rate right now? 9? If the servers are claiming the tick rate is much higher then I'd say the problem is more interesting... otherwise it just sounds like an optimization problem.
  • NurEinMenschNurEinMensch Join Date: 2003-02-26 Member: 14056Members, Constellation
    I'm sure this info is relevant to the devs and they will make the necessary adjustments when they can.
  • _Necro__Necro_ Join Date: 2011-02-15 Member: 81895Members, Reinforced - Shadow
    edited March 2012
    <!--quoteo(post=1911838:date=Mar 10 2012, 02:00 PM:name=Soul_Rider)--><div class='quotetop'>QUOTE (Soul_Rider @ Mar 10 2012, 02:00 PM) <a href="index.php?act=findpost&pid=1911838"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Unfortunately, there is no way of making a peer-peer system cheat free.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I question this. A (not so) simple solution to have client-client communication that has some protection from cheats would be to let the server only take random samples from the game data traffic of the clients. This way the server can check if the firing speed / movement speed / hit detection / etc. is, as the rules say. But only have a fraction of the traffic and cpu load at the server. You don't have to change the code of the server much, because he does the same prediction he does now but only for a short while at random times for random players. Plus: This prediction is not time-critical. It's only used to check, if everything is like the rules say and no one cheats some "hit" messages in or tries to claim he had shot the alien through the wall. Sure it's not death proof cheat secure. But this isn't server-client architecture too. This way you can have the ultra fast hit registration, that is to a degree cheat-secure and it takes load from the server, which is still responsible for updating the clients on the state of buildings in the map (which isn't this time-critical like player-VS-player hitreg).

    One question at the end: The network communication sure uses UDP and not TCP, am I right?

    Edit: Meh, should have read the whole thread. You mentioned this idea in a later post.
  • playerplayer Join Date: 2010-09-12 Member: 73982Members
    <!--quoteo(post=1912561:date=Mar 13 2012, 01:27 PM:name=_Necro_)--><div class='quotetop'>QUOTE (_Necro_ @ Mar 13 2012, 01:27 PM) <a href="index.php?act=findpost&pid=1912561"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->One question at the end: The network communication sure uses UDP and not TCP, am I right?<!--QuoteEnd--></div><!--QuoteEEnd-->
    You are right, TCP is unsuitable for extremely low-latency communication.
  • KalabalanaKalabalana Join Date: 2003-11-14 Member: 22859Members
    Skie, you are the man, I've been ###### about delays on the firing of weapons forever, and just like skulk movement and a whole slew of other issues that I noticed and other's told me I was crazy about, yet again, I've been proven right!

    Thank you, justification is so sweet.
Sign In or Register to comment.