GAS - Weapon fire ability but not using instant hitscan

So i want to implement a non-instant-hitscan weapon in Lyra which of course will use GAS. Think for example dog fighting in aeroplanes. Instant hitscan would suck. I want the bullets to travel through the air over time.

In my research it seems that GAS will typically do 3 RPCs per ability activation (try activate, replicate target data, end ability) which means if you have 1 bullet == 1 ability activation == 3 PRCs it would be unreasonably expensive for a large number of players all firing automatic weapons.

This is mitigated in fortnite (and lyra i presume) by “ability batching” but this is only applicable for abilities that do all 3 things (activate, replicate, end) in an instant. OK for instant hitscan weapons but not for what i want.

So i was thinking that the ability should just be called once when the player begins firing and end when the player stops firing.

Somehow we maintain a list of all the bullets that are “in flight”

Somehow we keep adding to this list as the weapon continues to fire

Somehow each frame we do a “mini hitscan” from the bullet’s previous location to where it should now be based on time delta and bullet properties (velocity, drop off, whatever we want to simulate)… if the hitscan hits anything then somehow execute some damage and remove the bullet from the list (unless you want the bullet to keep going i guess)

Somehow when the list of tracked bullets becomes empty as all of them have expired, we end the ability.

Does what i am describing sound like a reasonable approach?

Does anyone have any pointers for how implement any of the things i have talked about? I’m still very new to GAS.

It seems like gameplay abilities only work for things that are “instant” and that you need to use “Ability Tasks” to handle things that occur over time.

Would it be appropriate to have an ability task per projectile? Or would that be unnecessary and just have one ability task that keeps adding projectiles?

Would we track our list of projectiles that are in flight in the ability or the ability task?

Honestly i don’t know enough about GAS to know what to ask… any help would be apprieciated.

Did you ever find a solution?

check out tranek/GASShooter on github, good reference for everything GAS and it has a rocket launcher implemented, which fire actual rockets.