Request Client Side Prediction for skills (Improved latency for non-Turkish/European when using skills)

SammyYako

Üye
Katılım
13 May 2022
Mesajlar
18
Puanları
3
Update:
I've implemented client side prediction to show how nice it is and how responsive the game will feel. I posted a video but will explain in text how it works (in case it's easier to understand). As I mentioned in the video, I'm happy to share the code or talk to the devs regarding the solution.



Explanation:
Let's say my my ping is 300. The client starts the cooldown immediately and sends a request to the server telling it that I activated my skill, the server receives the request after (roughly) 150ms and validates that it's not already on cooldown, that I'm in range, etc. and if it passes, it will activate the skill on the server and send a response back to the client telling it whether it was accepted or not.
Even if my client's cooldown is ahead by half of my ping, by the time I send another response, it takes another half of my ping (150ms) to reach the server, so by the time the second request reaches the server, the server's cooldown would have reached 0 and it would be allowed to activate again.

You may have noticed I used the word "roughly" above. This is because in the real world, your ping is never stable and one way ping is not guaranteed to be half of your overall ping (although it's a good enough approximation for most cases). Therefore, we need to handle jitter (ping fluctuation). So let's say my ping fluctuates or all of a sudden my request reaches the server in 100ms instead of 150ms (due to different routing). Well, in this case, the server still has 50ms remaining on the cooldown, so what should the server do? I decided to handle this in my code by have a configurable tolerance value which buffers/queues those skills so that they can be activated when the cooldown completes. If we set this jitter tolerance value to 100ms, then the server would realize that the client's request has come in 50ms too early and since that's below the threshold, it will queue the skill up so that after 50ms it can be activated. If on the other hand my request came in 150ms too early (or if the client is cheating and sends requests way too quickly), the server will simply reject them. This allows things to continue normally even in the face of jitter.

Another thing to point out is that everything on the client is visual - it doesn't need to be, the client can predict hp and mana etc. but this is good enough for now.
The server applies all the effects like healing, damage, etc. so that will still be delayed, but at least cooldowns aren't blocked and can go through.

Server can still reject skills if they're on cooldown, you're out of range, or whatever other reason. Stroke on skillbar slot 7 (in the video) is an example of what it looks like when the server rejects the skill. Only the client that used the skill will see the animation on their side, other clients will not see anything. For others, it's like nothing happened.

Everyone is going to benefit from this. Even for people playing under 100 ping, it's still going to feel a bit more responsive.

Amazing explanation.

Let's hope the devs get on to this right away.
 

Alag

Üye
Katılım
1 Haz 2022
Mesajlar
16
Puanları
3
Hm, this should be definitely one of priorities.
Good job in explaining concept of solution.

By the way, I live in Europe and I also don't feel as smooth as the rogue on the provided video. When I'll be at home after work, I will count amount of minors on one pot ... just out of curiosity.
 

Abramovic

Üye
Katılım
28 Nis 2022
Mesajlar
6
Puanları
3
Do you have any update on this matter. Please update us, we're waiting this problem fixed in every patch.
 

creeper

Üye
Katılım
3 May 2022
Mesajlar
33
Puanları
8
So I finally get 59 on my sin and go to Haddar but no exp all night American time, 4 hours looking to exp, I'm guessing maybe most Americans 59+ are in Death Valley maybe? but with the client side lag I will probably die a lot to humans lol,

On ko it's a simple tbl fix, not sure here but it's important to fix, I mean some "are paying premium" but yeah the important thing is to fix this for the health and growth of the game, please update soon because right now there's no reason to buy premium until this is fixed, I am stuck with nothing to do because there is no exp at my time to play and can't pk with the disadvantage of client side lag, just constructive criticism :) gg

ps. My ko clan which is #1 on cypher with most all time np/glowy bans want to come over but won't with this issue, they say the game is not ready, not to mention good peruvian clans that stream, they will not stream with this lag disadvantage.
 

Alag

Üye
Katılım
1 Haz 2022
Mesajlar
16
Puanları
3
So I finally get 59 on my sin and go to Haddar but no exp all night American time, 4 hours looking to exp, I'm guessing maybe most Americans 59+ are in Death Valley maybe? but with the client side lag I will probably die a lot to humans lol,

On ko it's a simple tbl fix, not sure here but it's important to fix, I mean some "are paying premium" but yeah the important thing is to fix this for the health and growth of the game, please update soon because right now there's no reason to buy premium until this is fixed, I am stuck with nothing to do because there is no exp at my time to play and can't pk with the disadvantage of client side lag, just constructive criticism :) gg

ps. My ko clan which is #1 on cypher with most all time np/glowy bans want to come over but won't with this issue, they say the game is not ready, not to mention good peruvian clans that stream, they will not stream with this lag disadvantage.
If your timezone is not that much different from from CET (GMT+2) (Since USA is big), we do sometimes xp parties, even tho mainly during weekend (or after work, but it's usually like 1 or 2 hours a day if anything at all). We're not that active yet (we'll see how the game development progresses) but better than nothing. If interested we can talk on discord (EverLegacy is together one).


------------------------------------------------------

And to the topic ... I tried to minor as in video and I am unable to process skill that many times as him too.
It would be good to see message from staff members if the issue is in active development, on the backlog or not planned so far. I guess people would like to know where they stand and what to expect.
 
Son düzenleme:

creeper

Üye
Katılım
3 May 2022
Mesajlar
33
Puanları
8
Ok so I just tested myself I'd test more but got through more than a 1000 pots and I can't buy pots from store but thats another issue, my cc just wont pass

I used an old trick most l33t sins use and legal but I won't say here, the point is I can do the heals much faster than the op on the videos but my mana runs out and it runs out because of lag, like it's ready and I click it but takes it about 600 mil sec to go off after I press it,

At first mana goes off at a semi reasonable time but after like the 3rd the lag on mana goes to like 600ms, I think maybe there is more going on here than just client side prediction problem, there maybe is some lack of server side optimization as well

I'd run more test but I'm out of mana lol

ps. Alag maybe later I'll make a post where we can add friends from our timezone so we can play together and add a discord or something
 
Son düzenleme:

PENCHE

Üye
Katılım
28 Mar 2022
Mesajlar
69
Puanları
18
This is something they can't fix right away. Latency/Ping depends heavily on your physical location vs. Game server's location.

WTFast is probably the only solution for now. I've been using it for the past 7 years in other MMORPG and FPS games.
 

SammyYako

Üye
Katılım
13 May 2022
Mesajlar
18
Puanları
3
This is something they can't fix right away. Latency/Ping depends heavily on your physical location vs. Game server's location.

WTFast is probably the only solution for now. I've been using it for the past 7 years in other MMORPG and FPS games.
Did you even read the thread? Mono fixed it in Unreal.. Don't be lazy, go read the original post.

 

Anthelior

Üye
Katılım
1 Nis 2022
Mesajlar
348
Puanları
43
There should be at least 2 different region for the game, one for NA, one for EU. "At least" for now.
 

PENCHE

Üye
Katılım
28 Mar 2022
Mesajlar
69
Puanları
18
Did you even read the thread? Mono fixed it in Unreal.. Don't be lazy, go read the original post.

I did, and I watched the video as well. The solution is not that simple when dealing with massively multiplayer game where too many people send too many requests to the game servers at the same time.

Again, it depends on your location vs game servers location. That's why a lot of games have EU1, EU2, NA1 etc. different servers in different parts of the world.

Don't get me wrong, WTFast isn't a 100% solution though. It's a bandaid to treat a wound... When I was playing other games (one was very similar to Rise Online), people that live close to the game servers were able to use their skills faster than me. However, it makes the gameplay experience a little better comparing to playing without WTFast.
 

fstab

Üye
Katılım
20 May 2022
Mesajlar
304
Puanları
43
As Turkish players, we have this problem especially in the death valley of the evening hours
 

creeper

Üye
Katılım
3 May 2022
Mesajlar
33
Puanları
8
The mana lag is even worse than the minor, completely un playable as is, i mean you think the minor lag is bad, well the mana lag is way longer, half the time I can't do anything waiting a full second after I press mana when it's ready until the mana finally fills the mana bar and then I can attack or minor, so reg lag then server permission then back to client then back to server to execute-that's just un playable, I can deal with a little lag but unnecessary triple lag, I'm just not interested in this game as is

I've seen this play out before, we complain and the devs say nothing, this is a terrible omen/sign, been a long time now and still no feedback from devs, how do y'all see it?
 

creeper

Üye
Katılım
3 May 2022
Mesajlar
33
Puanları
8
Seems much better now for like a week now, don't know what they did but they did something, ty :)
 

knight_luo

Üye
Katılım
24 Şub 2021
Mesajlar
49
Puanları
8
I'm from China, ping=130ms, Turkish player can use 240HP healing 9 times in 5 seconds, but I can only use 6 times, which results in 1VS1 battle, after 5 seconds, the enemy player will have 720HP more than me, also, in 10 seconds, MY R damage will be 2 less than the enemy player, so, I will not 1VS1, I am not a coward, because I know, this is not a fair fight! I'm sticking with it, because I also believe that developers will do their best to improve some of the mechanics, and when they get it, it will be fairer! Come on! rise
 

Şu anda bu konu'yu okuyan kullanıcılar

Üst Alt