Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative "burst mode" that shares a burst amongst multiple copies of a weapon rather than individually #10044

Open
Saugia opened this issue May 5, 2024 · 0 comments
Labels
mechanics Things dealing with the mechanics & code of how the game works

Comments

@Saugia
Copy link
Collaborator

Saugia commented May 5, 2024

Problem Description

Currently, burst affects weapons individually - a given gun or turret with a burst count of 3 will fire 3 times with a delay of burst reload between each shot, and the reload duration between each burst count. For multiple weapons, this is tracked individually - if a ship has 4 turrets with a burst count, each turret will separately track its counts and reloads. The tag cluster will of course make it so that all weapons fire simultaneously, so in the above example, each of the four turrets will fire in bursts of 3 at the same time with the same reload.

With the above said, we currently have the abilities for a given number of weapons to have a burst fire that can either be tracked simultaneously or in alternating pattern. However, if a ship is given a large amount of burst weapons, these reloads might overlap depending on the values. The obvious solution is to have a long reload time so that doesn't happen, but this becomes somewhat unwieldly when considering that an individual weapon's reload, if increased this way, would be pretty long.

Related Issue Links

N/A. (The only other burst-related issue open is about stream and bursts going on reload even only after partially firing a burst.)

Desired Solution

I'd like the ability to give some sort of tag either as a child of burst reload, or a separate tag alongside cluster, etc., that tracks the burst of all instances of a given weapon, called volley, and makes it so that a burst count is shared with all weapons instead of individual ones. This would be both an alternative way to approach the above, and add another way that burst weapons can operate.

For example, if a ship has 4 turrets with this tag, rather than each reload be tracked individually, the burst is tracked amongst all the weapons. Say the given burst count for this turret weapon is also 4. With the volley tag, rather than each individual turret track 4 shots and then a reload period before the next 4, all 4 turrets would alternative a combined amount of 4 shots, and then all of them pause for a reload before firing the next burst.

This would still be a sort of stream behavior, where any shots beyond the number of given weapons would alternate back to the first one that fired. (So, if a weapon with this tag has a burst count of 5, but there are 4 of them, that last shot would come out of the first weapon again.)

Alternatively (or maybe necessarily), we could make it so that a "burst count" of 1 means that additional weapons add "1" to this burst count per weapon. Then, have code so that weapons with only a "burst count" of 1 would perform this volley behavior instead of the normal behavior. Or maybe volley still needs to be separate.

For a specific example:

Two Mandible Cannons, with for example "burst count" 2 and "burst reload" 5, and "reload" of 60, with this new "volley", would still fire 2 shots alternating with one another with the "burst reload" 5 between them and "reload" 60 before they fire again. With a burst of 4, 4 shots (alternating between the two cannons). Etc..

If there's an odd number of weapons, it would just alternate normally, so, say there's 3 cannons with a burst of 5, they would alternate but one would shoot 3 times with the other shooting 2 (again, alternating) for a total of 5 shots.
That's what I'm looking for.

This way, a group of weapons can fire off a "volley", rather than individual weapons tracking bursts, which very quickly can overlap with other weapons, unless given long individual reloads, which makes singles of this weapon very unwieldly. You could argue that in that case, just buy more weapons, but I'm looking to retain more value in having both one and more if you can fit them.

(See below for a video example.)

Alternative Approaches

None that I can think of.

Additional Context

This behavior can currently be "mimicked", although outside of our control, with the Ballistic Cannon Turret as an example. The turret has the cluster tag, so multiple copies would fire at the same time. The Gegno Gneiss, which has 3 of these, has turret mounts that are lined down the center of the ship in a row.

As an AI gets in range of a target, it fires a weapon that is in range, and since these three have the cluster tag, as the Gneiss leads the three turrets into range (if it wasn't before), the three will fire sequentially (as they don't share a reload since they're meant to fire at the same time), one after another, from closest to farthest.

This then offsets the reloads of each turret slightly for the rest of the time the target is within range (or until the turrets lose track due to speed, etc.), essentially performing the above feature. Of course, the player cannot do this manually (but could with automatic turrets).

Example in-game with the above:
https://github.com/endless-sky/endless-sky/assets/93169396/b7771ee4-015e-453e-845e-1eea62ca76dd

This is a good example of the behavior I'm looking for as well. There are 3 missile launchers on each side for a total of 6. Each one fires (a group of 3) missiles (ignore the ones fired straight, that's a different launcher), and all 6 fire (these groups of 3) once, each time after another, before all go on a reload. I don't really care about having bursts of bursts, so ignore that part.

Same thing with the green turbolasers - the two of them fire twice, alternating, for a total of 4 shots, before going on a reload (albeit there's some slight randomness to it but I don't care about that).
https://github.com/endless-sky/endless-sky/assets/93169396/b75154f2-7f97-49d2-bb3b-4fe5f6f79fa4

@Saugia Saugia changed the title Alternative "burst mode" for burst count weapons that tracks all instances of a given weapon Alternative "burst mode" shared amongst multiple copies of a weapon with a burst count May 5, 2024
@Saugia Saugia changed the title Alternative "burst mode" shared amongst multiple copies of a weapon with a burst count Alternative "burst mode" that shares a burst amongst multiple copies of a weapon rather than individually May 5, 2024
@Saugia Saugia added the mechanics Things dealing with the mechanics & code of how the game works label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mechanics Things dealing with the mechanics & code of how the game works
Projects
None yet
Development

No branches or pull requests

1 participant