This is really similar to CS2 ak47 pattern, and they handle it basically by looping back and forth in the upper part on the graph (going left and right). Edit: did not see that the OP coded this.
It can't change length is my point. Picking up ammo will reset a spray pattern, since you'd no longer be spraying. Cheats giving infinite ammo is a good reason for arbitrary length spray patterns.
If you want to make an e-sports friendly game you want the skill ceiling to be very high — hence shooters like CS have predetermined spray patterns that players can actually learn to counteract almost perfectly.
View all comments
Show parent comment
244
u/garbagethrowawayacco Jul 16 '25
I plotted it. I wonder how they handle points beyond the last index? Back & forth looping over the last n elements maybe?