I am starting a new project that requires around 200 animated sprites to be playing at the same time so I knocked together a couple of small demos, one in oF and one in WPF/C#. All I have done is make a basic sprite class that loads a directory of images into memory. I then make 200 of these objects and play them back in a loop.
In the sprite class in oF I am setting setUseTexture to false and assigning the pixels to another ofImage that is drawn to screen.
Surprisingly the WPF application works better than the oF application and I am wondering why.
WPF - starts instantly, 20% CPU, 1GB memory.
oF - memory hits close to 2GB and crashes while loading the images.
I know a sprite sheet would be better in oF but am wondering why it is struggling to keep up with WPF (which in my experience is normally a lot slower/more memory intensive) in this instance.
Can anyone shed any light on this?