Internet Explorer may not be fully supported. The CSP Team recommends you to download FireFox or Google Chrome. Thank you!

+ Reply to Thread
Page 1 of 14
1 2 3 11 ... LastLast
Results 1 to 10 of 131
  1. #1
    Programmer
    Join Date
    Mar 2011
    Location
    Lancashire, United Kingdom
    Posts
    171

    Lightbulb Predicting your attacks

    Hi all,

    Like the last developer log I wrote, this will be centred around the netcode used in CSProMod. I have recently implemented predicted deaths (or attacks). This is essentially your client predicting how your victim will act when you shoot them. For example, say you had 100ms ping, and you headshot an enemy with your deagle. In CSP1.08 or below, you would have to wait 100ms for the server to acknowledge you did in fact headshot the player, and tell you they are now dying (play headshot animation, draw blood, etc.) However, we can already safely predict that the server will tell us all this, so why wait?

    Prediction plays a key role in any multiplayer Source Engine game, and many other AAA multiplayer titles (Call of Duty, Battlefield, etc.) Without it, shooting, moving, or any actions you did (jump, crouch, etc.) would all be delayed by your ping. This is not a good experience. The Valve Developer Wiki defines prediction to be:

    [...]the notion of the client predicting the effects of the local player's actions without waiting for the server to confirm them.
    CSProMod not feeling "smooth" or "delayed" has been a common complaint by members of our community. In fact, the delay experienced in CSProMod is evident in all Source games, although to a lesser extent.

    All shots you fire at players are now completely predicted. This means that blood spurts instantaneously, blood splatters are immediately painted, flinch animations played: all the good stuff. We can also accurately predict when you have killed a player. For example, shooting an enemy with an AWP is guaranteed to be a death if you hit their upper body. Therefore we now start playing death animations, and fall to ragdoll when appropriate. I am proud to say this is the first Source engine game or mod that has prediction to such a great extent. (Note: this is not restricted to AWP, all attacks are predicted)

    Playing CSP with any ping will now feel a lot more "instant". I have been testing with pings of 400ms, and only slight jarring is evident when attacking players (which I am working on). This should help make CSP playable at much greater latency. In other news, delayed jumping and crouching has also been fixed. I hope you enjoyed this developer log, and thanks for reading!

    Video Log
    - Saul

  2. #2
    Member
    Join Date
    Nov 2010
    Location
    Spain
    Posts
    54
    I can`t wait to try it in 1.09
    Very good job Saul! ! ! You're the hardest working! ! !
    Last edited by mingot; 10-07-2011 at 03:07 PM.

  3. #3
    Senior Member n3krO's Avatar
    Join Date
    Jul 2010
    Location
    Málaga, Spain
    Posts
    4,074
    Saul, can you confirm that when the game predicts u shot an enemy there is no chance to that be false? More annoying then delayed animations would be false animations.

    If you have archived to do it, i don't know why valve didn't O.o

  4. #4
    Very good job Saul

  5. #5
    Programmer
    Join Date
    Mar 2011
    Location
    Lancashire, United Kingdom
    Posts
    171
    Quote Originally Posted by n3krO View Post
    Saul, can you confirm that when the game predicts u shot an enemy there is no chance to that be false? More annoying then delayed animations would be false animations.

    If you have archived to do it, i don't know why valve didn't O.o
    Obviously I cannot say that there is no chance this may happen, of course it may. If this does happen, then lag compensation has also failed server-side. It will be possible to disable predicted deaths with a ConVar, if your ping is consistently so bad that you're getting repetitive false positives. This is extremely unlikely at pings <100ms, as I barely get any false positive deaths with a 400ms ping.
    - Saul

  6. #6
    Senior Member n3krO's Avatar
    Join Date
    Jul 2010
    Location
    Málaga, Spain
    Posts
    4,074
    It's also extremely unlikely someone will play with over 130 ping so no worry about false positives at all

    Thx for your work

    Saul is better then Vale and HPE

    We CS

  7. #7
    a little question this will be in the 1.09?

  8. #8
    Member
    Join Date
    Apr 2010
    Location
    Luleå, Sweden
    Posts
    49
    Thanks Saul for another excellent write-up. Keep up the good work :3

    Quote Originally Posted by Fodes773 View Post
    a little question this will be in the 1.09?
    Quote Originally Posted by Saul
    In CSP1.08 or below...
    I guess so.
    Last edited by reima; 10-07-2011 at 04:09 PM.

  9. #9
    Programmer
    Join Date
    Mar 2011
    Location
    Lancashire, United Kingdom
    Posts
    171
    Quote Originally Posted by Fodes773 View Post
    a little question this will be in the 1.09?
    Hopefully, yes. There's naturally a couple of bugs at the moment and it still needs to be extensively tested.
    - Saul

  10. #10
    New Member
    Join Date
    Dec 2010
    Posts
    29
    Finally they picked up a guy, that actually know howto code stuff.

Posting Permissions

  • You may post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts