tony wrote:
Just see how many shots it's humanly possible to fire before they start going offscreen and that (+ a little buffer) would be your number. Then just recycle the array (such as when you use up the last element in the array, you know that the shot that was in the first element is long gone and the space is available for the next)
You might run into a problem with different screen sizes and resolutions. If you can maximize the window then a bigger screen means you can have more 'shots' on at one time.
No, you do not have to reinitialize the array. When you want to do if you use tony's solution is determine your max number, then have a check if the array index you are at is max-1 (-1 because the array starts at 0). The way you will be referencing the array is by a counter. Each time you put something in the array you do counter + 1. When counter = max - 1, reset the counter to 0.
There might be a better way if we had more details. I don't understand why you want to store all of these in an array.