Hi,
I have been taking a look at Monogame and have noticed it doesn’t have any built-in particle system. It’s ok, a low level framework doesn’t have the need to bring one to the table.
Anyway, I have found some implementations around and I’m a bit worried about performance. Particle systems are little monsters that iterate through a bunch of items to bring nice effects to life. When iterating through such a big amount of objects, contiguous arrays is the way to go. Mainly, as you know because we want no cache misses if possible (at least just as little as we could).
C# can create this contiguos kind of data structures (if I recall it correctly). An Array and even a List<>(that is based on Array) are a contiguos chunk of cache freendly memory. The problem is that it is a contiguos array of refernces not objects. So, based on my experience this is not what I would want to build a system like this.
Is there any possibility to build this using C++, minimizing the unwanted Managed<->Unmanaged traffic? Becasue if I have a lighting fast C++ particle system but can´t talk with the Rendering system natively it will be a pain :D.
As an example, unity3d has a built-in particle system but people have implemented their own particle systems and added to them the asset stores. My tests shown that they are less performant than the built-in ones (considerably).
P.D.: I don’t want to be “that” guy. Just, I need to be sure about monogame prior to step out of unity.