reznok / GMCAbilitySystem

An Unreal Engine plugin that adds an ability system to the General Movement Component plugin
MIT License
35 stars 16 forks source link

Queue Refactor #95

Open Packetdancer opened 2 months ago

Packetdancer commented 2 months ago

This is a fairly significant set of changes, reworking how the ability queue works and how the effect application works.

The core of this is the creation of a templated TGMASBoundOperationQueue where each TGMASBoundOperation represents a single action (add/remove, whatever) to a queue. The queue can be replicated client-to-server via GMC moves (as with the ability queue), server-to-client via RPC (as with the ServerAuth effect queue type), or used as a holding pen (as with the PredictedQueued effect queue type). In addition, each operation has a non-templated form which can be passed via RPC and then restored to a full operation in the queue.

Atop that change, the following additional changes were made.

For the sake of testing, there is a matching queue-refactor branch of the GMASExTemplate project which pulls this branch as the GMAS submodule, and where the BP_EffectBox has been converted to using the new API. In addition, BP_EffectBox has been set up so that the method by which the effect is queued can be changed easily in the blueprint (so that I didn't go insane while testing every queue type on every network scenario, repeatedly).

(However, despite the changes, previous code should Just Work seamlessly, though the older legacy API will have deprecation warnings.)

The bound operations queue functionality is meant to also support gameplay cues, as my next large task.

Aherys commented 2 months ago

First fast review, nothing to report, good job.

petegilb commented 2 months ago

This is super cool! I looked through it and there's nothing that I disagree with so next step would be some testing and we'll see where we're at!

rafadsm commented 1 month ago

I am experiencing a small rollback when using sprint in the demo project described (Playing as Client) When using sprint, my character accelerates for a few milliseconds, then returns to normal speed and accelerates again The same when sprint is turned off The character slows down, accelerates and slows down again I tried to bind to MaxDesiredSpeed, but that wasn't the problem I don't know if it could be something with the ability system or the demo

Here is a video, it doesn't always happen, but at some point you notice the character doing a slight rollback

video: https://streamable.com/if7uk4

Although I don't understand much about the gmc, I believe you did a great job with this rework

petegilb commented 1 month ago

I am experiencing a small rollback when using sprint in the demo project described When using sprint, my character accelerates for a few milliseconds, then returns to normal speed and accelerates again The same when sprint is turned off The character slows down, accelerates and slows down again I tried to bind to MaxDesiredSpeed, but that wasn't the problem I don't know if it could be something with the ability system or the demo

Here is a video, it doesn't always happen, but at some point you notice the character doing a slight rollback

video: https://streamable.com/if7uk4

Although I don't understand much about the gmc, I believe you did a great job with this rework

I had the same issue. Was getting replays constantly when starting

Packetdancer commented 1 month ago

@rafadsm -- Do the most recent changes to the branch fix your desync/replay? I know they did for @petegilb, but I want to double-check.

rafadsm commented 1 month ago

@rafadsm -- Do the most recent changes to the branch fix your desync/replay? I know they did for @petegilb, but I want to double-check.

I did some tests and the desync/replay is fixed, thanks!

Crezetique commented 2 weeks ago

image Bringing this over from discord to ensure vis and in case someone has the chance to look into it.

Replicable in fresh project. An issue occurs when nested gameplay tags are granted and removed with effects. The effects are removed, but the granted tag is not removed correctly. In the screenshot scenario, State.Test granted tag is never removed. Having the effects added or removed in different order does not change the outcome.

reznok commented 1 week ago

Changes were brought in with #97

Keeping this open for now as there's some good discussion about changes that haven't made it in yet and should be in another PR.