So I’ve been playing Rogue Lineage recently and I’ve noticed how drastically your ping affects your gameplay advantage.
When you left click to throw a punch in Rogue Lineage, the client side sends a signal to the server and then the server does the punching. There’s no client-sided feedback either. Depending on your ping, there can be very unpredictable/long delays between a Left Click and your character punching. This can be problematic in fast-paced pvp games.
Problem: There’s a inconsistant/random delay between when the user Left Clicks and the character punches.
Cause: The server’s not receiving the message fast enough because of ping
What solutions are there to help even the playing field with ping lag in pvp combat?
A potential (but bad) solution could be to have
Client sided combat collisions
So the client side throws a punch, detects what it hits, then sends the server a message of what it hit.
This gives lag switchers and exploiters a huge advantage.
Another solution I thought of was
Tick based actions
Instead of having the client tell the server to punch as soon as possible, why not give the server more time to receive the message? Why not create our own predictable delay?
The server and the client both have a built-in clock that stays synchronized at roughly the same time. This clock is unaffected by network lag. It works just like a regular clock. (See tick() under global functions)
Instead of telling the server to punch as soon as possible, the client side sends the server a future/upcoming tick time. When the server’s clock reaches that specific tick, the punching initiates.
For example, if the client is at tick time 100, it sends the server a message of 100 + 5 or “105”.
When the server receives this message, “105”, it waits until it’s current tick reaches 105 and then makes the character punch.On the client side, attacking has a windup of 5 seconds, and then the punch. The network has that entire 5 seconds to send the message from the server to the client. (By my testing, you can lower that to around 1-2 seconds)
When I tried messing around with this concept, I realised there’s a lot more that goes into combat than just when you punch. Where you punch is also a fairly big factor. Positioning your character is still tethered to your ping. This might make when you punch more predictable, but getting punched would still be based on where your character is positioned. You’d still be at the mercy of your ping to move your character out of the way when avoiding a punch. A possible solution to that could be to reduce player movement speed.
Is there any point in bothering with these nuances?
What do you think?
I hope this wasn’t hard to read.
Typing all this out has helped me process it.
I’m open to further clarifying anything if needed.