As compelling as it is for them to have the game ask the server if it's okay to start using an ability, I really wish they'd just forgo that option. And instead have the client check locally if it's okay, then have the server confirm once the animation is started (and the data is sent) the only thing this would REALLY do, is make it so that in some situations where there's a terrible bug, or in situations where someone is attempting to hack...
The animation would play but nothing would happen. I'm okay with this, it really isn't going to negatively affect anyone. The reason they don't check locally is to prevent people from simply telling the game "I can do this" even when they can't. As long as the game checks that they can do it before the damage is applied, they won't be able to fool the system.
So in short...
- Client: Locally check if move can be performed, begin animation.
- Ping server, send latency.
- On server: check if move can be performed, if okay continue, else cancel ability.
- Server return damage dealt to client.
- On server: Calculate: Seconds to damage frame - (latency to client x2) and wait.
- Client: On damage frame, display overhead damage, display enemy reaction animation.
- On server: after the serverside wait, deal damage on server, ping client GUI to update.
This would... I believe... be the best way to do it in order to maintain visual fidelity and keep everything in sync. Problems would arise in two situations.
- Client to Server Latency x2 > Number of seconds from animation start to damage frame
- Latency changes between executing animation and reaching the damage frame
The first is... possible, for some really fast abilities. But it wouldn't be any different than what currently happens by much, if your latency is really high, there's just bound to be delays.
The second one... It seems unlikely that your latency would fluctuate greatly in the matter of a few miliseconds, or at the most a few seconds, but the delay shouldn't be a huge deal.
Most of the time it should look pretty good with this method I would think. Edited, Aug 17th 2011 3:16pm by RamseySylph Edited, Aug 17th 2011 3:17pm by RamseySylph