As the title suggests, i'm doing a little side project. I'm making a particle system with SDL. Right now it works, there are just a few bugs and anomalies. First of all, i have a particle class and a particle handler class. Each particle handler class has an array of 10000 particles. The particle handler can start, stop, set, and render particles.
My first problem is this:
Code: Select all
Unhandled exception at 0x004133d7 in project.exe: 0xC00000FD: Stack overflow.
This is the error i get when i have more than about 10000 particles in my particle handler, and when i have more than 2 particle handlers running.
Is there any way around this?
Also, the speed of the particles depends on how many there are, 2 particles move faster than 10000. How can i fix this?
I'll post the code if you need it, just ask.