Advertisement

server-side prediction...

Started by July 11, 2002 03:21 PM
9 comments, last by shurcool 22 years, 6 months ago
umm, hl has the problem of the client mispredicting hits. see cs. all shots fired are viewed diffrently from the client and server due to randomness in the shots. so each client sees a different spread of bullets. so TONS of mishits and hits occer on the client side anyway.

the client does not need to predict hits, just show them as the server oks them.

i understand perfectly well how the HL system works (which original used the quakworld system with no back extrapolation). maybe you never played HL before and after the change. maybe you never read about all the problems of players increasing their lag to get better accuracy. the HL system trusts the clients by using the previous known information sent to the client. thus if the server sends updates that a high ping client does not recieve, it dont use them in the extrapolation. i think this was slightly changed in later revisions of the netcode as it was a major flaw and caused tons of problems.

shrcool i understand perfectly what happens. its a disadvantage because no matter what you say, the low ping players get false packets that may get changed due to packets sent by high ping players. false information leads to worse extrapolation. the entire leading problem can be solved with better client side extrapolation.

HL and quake send vectors of movement not key presses. thus the person dodging the gernade would not get hit anyway in the non back extrapolation system. so the server can extrapolate acceleration (since it knows it) as well as movement. the client can as well. this is why you get the sliding effect in any game when you have a high ping.

"that makes him think that he was teleported back in time and hit."
guess what, he actually is. you might as well say, high ping players think they are missing and need to lead more due to lag. i still feel that equal compenstation of lag is required in the quake system. all players must lead targets. in the HL system, you have to hope that as a low ping player when you aim that an event by a high ping player dont change the entire world on you and cause you to miss. even though you are aiming EXACTLY at the target like a high ping player would. though its more likly the world will change on you due to false information sent by the server.

the problems you have were solved by worms well enough (i am sure). heres what happens. if your game is like worms and scorched earth. since there is no more then a single player moving at a time and the gameis deterministic the client can predict the events pretty well getting the ok from the server, and only changing things if the server dont ok something. HL weapons work like this. they only play the fire animation IF the mod author has anabled client side weapon prediction. if not, then they fire delayed just like in quake. ie the animation is delayed till the server oks it. bullet holes in walls are incoorect since the client uses different rand numbers then the server.

also quake2 (pretty sure quake3 is around there as well) runs at 10 frames per second (ie the animation and physics system). so thats 100ms per frame before an action is seen. so the client will have that much of a delay when pressing the button client side anyway so you can technically subtract that from the round trip ping since it affects how things are viewed. so someone with 100 ping wont notice much lag.

in any case, you dont need back extrapolation for a worms game, and such things dont affect a game when only a single player moves per turn anyway.

implement any system you want and see how it affects the gameplay. trust me back extrapolation will be diffiuclt to implemnet correctly since you will have to be careful how much you trust ping and how far you go back.

in any case the server can predict events accuratly since movement is very limited and deterministic in your game. even recoil can be predicted by the client well enough. if the client as an accurate view of the world, and is the only one who can act to change the world, then he can accuratly predict the world. the server merely oks things. and sends the changes to the other clients.

i suggest implementing and testing a few systems across the net with low and high ping players.


This topic is closed to new replies.

Advertisement