#Client prediction for skills (Projectiles)

1 messages · Page 1 of 1 (latest)

wraith creek
#

Hey, we are currently looking for decide for either authorative or distributed multiplayer approaches

Movement prediction is pretty straight forward from the logic side and apart from one small issue I have already implemented that for the authorative approach.
What I have trouble understanding though is creating new temporary gameobjects in a predicted state, and I would like your input on how this should work

Upfront some context:
Game: 1-4 Player Coop A-RPG
Networking: Steam Relay (Unity Transport in dev)
Game Speed: Fast paced

So now to my problem, if my non-host player presses the button for the fireball spell I would ideally not want to wait until the server has confirmed the skill, creates the fireball and sends it off. I would like to anticipate on the client that there will be a fireball that I can already show

These are the 3 methods I could think of:

  1. Hide the fireball creation behind a little windup animation, animation can be predicted, gives the server time to spawn fireball NetworkObject
  2. Pre-spawn a fireball object, catch the spawn event from the server and instead of spawning a new object assign the prespawned fireball as the "spawned" network object, then do transform reanticipation
  3. Ignore the little delays you have and just let the host/server do its job - high ping players will have desync problems anyways in this type of game

Any experiences or advices here?

stoic lance
#

Assuming you mean client authoritative, any of those options will work fine. Start with 3 initially to see if it's even a problem in the first place. Move to 1 if it is. 2 can be a last resort if you detect a high ping client.

wraith creek
stoic lance
#

Same deal since only the host can Spawn objects anyway.

wraith creek
#

Hmm so from first tests earlier 3 felt like casting skills was sluggish cause of that 1 round trip it takes until the cast

#

from around 60 ping (20ms jitter) on

stoic lance
#

A small casting animation should fix that.