Mikko Ronkainen:

Let's say I just use dynamic array and grow it when adding new particles to the system, and when particles die, just set their dead flag on. This means that, when adding a new particle, I need to scan the array first for possible dead particles that can be reused. Is there some trick that could be used here to reduce excessive searching/iteration?

Generally avoid resizing the array. Just leave some many ones in the array.

Bye,
bearophile

Reply via email to