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?
Ok, thanks! That linked list cache thrashing was just the thing I
knew that I don't know :)
- Best data structure for a particle system? Mikko Ronkainen
- Re: Best data structure for a particle system? Damian
- Re: Best data structure for a particle system? Mikko Ronkainen
- Re: Best data structure for a particle system... Mike Parker
- Re: Best data structure for a particle sy... Marco Leise
- Re: Best data structure for a particle system? bearophile
- Re: Best data structure for a particle system? Mikko Ronkainen
- Re: Best data structure for a particle system... bearophile
- Re: Best data structure for a particle system... Chris Cain
- Re: Best data structure for a particle sy... bearophile
- Re: Best data structure for a partic... Chris Cain
- Re: Best data structure for a particle sy... Ivan Kazmenko
- Re: Best data structure for a particle sy... qznc