#Client-side instant response vs server confirmation
1 messages · Page 1 of 1 (latest)
Which option is best A, B or a hybrid approach? My game is a parry based combat game where low ping is probably required anyway.
ideally client prediction is better but there are tradeoffs
wdym
regardless of animation playing wont it still feel wonky if aerial attack gives a boost only after server has confirmed it is allowed so it wont match the animation
making smooth and responsive netcode is hard and if you really dont know what you are doing id say it's generally better to make your attacks server authoritative
i already tried both approaches but i didnt see much difference in the "responsive" one
probably just cuz of my low ping tho
if you do client predicted attacks (so animtion instant feedback)
you might get descynced hits on the client
yeah
so you view your attack finish and then the damage is delayed
because you don't get instant feedback
you also need to sync all your combat state, like stun, cds, etc and that is additional effort
since you need to predict the activation conditions
but if your attacks get activated on server, you are gonna want to add some
input buffering
if you don't, you may get somewhat long delays between attacks if high ping
if you request an attack from server and need to wait for a response, your interval between attacks will be the same as your ping
also i'd recommend client hitboxes on m1s
yeah making combat that feels good is pretty hard i'd say
yeah alr doing that
also if you are doing client hitboxes you're prolly gonna want a hybrid approach, so if you dont receive a hit during the duration of the attack, just perform one on the server
hm?
and id also recommend using a custom character replicator like bettereplication or chrono since you get a bit less latency on player position (due to roblox interpolation / repliction intervals)
if you are doing client hitboxes and a player is high ping, they may hit the player on their client after the attack is timed out
on the server
if this happens just perform the hit on the server
** You are now Level 5! **