Am I at a different position to where I was on my client at T=0 (the actual firing position), and where I was on the server at T=50? Does it roll me back and fire at the old position or at the position I am on the server at T=50? if a player shoots, and another client sees it but the positions are out of sync, does the muzzle flash appear on the model, or where the model should be? What about the muzzle flash - should it occur at a world position in space, or from the muzzle of the remote player that’s shooting, as far as the client is concerned? I.e. If it hit them, they’re dead, and they’ll find out 50ms later when the server tells them they’re dead. That’s a tenth of a second, if you’re bullets have covered the distance and hit, then it’s too late, player couldn’t move/save themselves. T=50:Server sees I fired and tells clients: T=0:I fire a burst of bullets: Tell server. So, let’s take a 50ms ping (that’s generous) It still feels odd to me - how can someone react properly if a burst of shots has been fired, and by the time they hear the first one, all 3 have already landed? if I’m 50ms behind the real shot with the playing of my FX, my hit impact is also 50ms behind the real impact, so I could time it out and get the true shot distance). And hopefully the different between the real shot and the local shot/muzzle flash, and the real impact and the local impact are the same, so it all appears consistent (i.e. Since there are no visible bullets/trails, I suppose as long as everyone hears the sound / sees the muzzle flash at roughly the same time, the flight-time of the bullet is irrelevant - they’ll feel/see the hit a fraction of a second later. The shooter might end up seeing a blood splatter that no one else did, but that’s only in rough network conditions I’m not going to respond for 5 mins, let everything even out, then continueīut basically muzzle flash/sound all ‘fire’ related things should be sent out asap, but the ‘hit’ effects should be confirmed by the server for everyone. This is where I get confused - should the other players be simulating the hit impacts, or waiting for the server to tell them the real impact location so it matches up? If they’re already waiting for the server (to hear about the shooting itself), why not a fraction longer to get the real location? Problem is if it’s a long-range shot… could be a while Though my point about the bloodsplatter etc still stands, there’ll be a lag, which is why games tend to go ‘client hit the person THEY SEE so do everything as if they had, but the server decides whether anyone else sees that’ I saw the “Impact effects” being called by the server and missed the ‘local effects’ I think I’m not all here this morning, it seems that’s what you’ve done That’s why in online games when you shoot someone, there can be the hit sound, the blood splatter etc, then they’re still standing.īecause the client ran through what it thought happened, then the server left the player alive as the authority on whether the hit happened, but from a player perspective it’s more fluid to accept that what it saw was true. Unless you have a really good connection, The game will have a better flow and feel for the player if the hit test is on the client.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |