tranek / GASDocumentation

My understanding of Unreal Engine 5's GameplayAbilitySystem plugin with a simple multiplayer sample project.
MIT License
4.52k stars 819 forks source link

[Question] GE Cooldowns causing drops in RoF conditions #100

Open KungaEntertainment opened 1 year ago

KungaEntertainment commented 1 year ago

Heya, want to ask whether someone knows around what CD vs ping ratio does the RoF handicap start occurring with GE CDs? I can see this being an issue in a FPS title with very high cadency weaponry, but do assume (/hope 😄 ) in a game with a minimum CD on GAs of around 0.5s this might not ever occur (as long as the clients have semi-decent connection/distance to the server of course).

//Noting such a ratio in the GE CD prediction section (4.5.15.3) could be a nice addition

tranek commented 1 year ago

It's always there. It just depends on what maximum ping you want to support. Therefore the answer is it depends on your game's requirements.

KungaEntertainment commented 1 year ago

Yes I understand the issue "always exists" if You reach high enough ping. But I meant more of at what CD/ping ratio approximately does it begin to manifest?

My guess would be probably something like if (Your ping + Delay before replication) < Skill CD, the RoF won't be affected (?)

MattiaPezzanoAiv commented 1 year ago

@KungaEntertainment Hi, I am not the author but I think I can shed some lights. Your question doesn't have an answer other than is always there unfortunately. The server will send to the client the packet with the "cooldown finished" information always after it has finished (on the server) therefore the client will always have it with some amount of delay. This ofc depends on your ping and in a perfect world a client with 30ms ping should kind of be all right assuming your weapon is not insanely fast. Although we live on planet Earth and things don't always go our way :D With a very short cooldown you might get into trouble with unreal trying to buffer rpcs and stuff like that, also inconsistent pings will most likely cause you some trouble. I have personally tried with 0.2 seconds delay and it doesn't feel quite right. In my experience, anything above the second is just about fine, but again, looks okish but the delay will be there. your cooldown will not be 1 second but 1 + ping more or less, so keep that in mind.

ErenBalatkan commented 1 year ago

You may want to implement Cooldown not as a gameplay affect but as a timer with remote ability cancellation support for fast firing abilities. For traditional RPG abilities with >0.3 sec cooldowns taking the ping hit is safer

This is the route they used for Lyra weapon fire ability