Been sort of struggling with this as of late. I have this really neat particle effect for when my character has a spell active which will stay on the character for the entirety of the game, but it's causing a memory leak and after only a minute of playing, the game slows down a ton, it starts off at 60fps, but gradually gets slower until it's at about 15fps, even when I'm not shooting any of the projectiles which also give off particles
I've been reading up on this and all I'm seeing is that you need to destroy the particle system when it's not in use, but what about an effect that will stay on the entirety of the game? I've been looking all over the place for a solution and posting here really is my last resort, as I don't like to bother forums with questions that may be very simple and mundane. Here is my code
There is nothing in the create event, it's all in the step event. My first solution was that maybe if I destroy the particle system every few seconds and let it come back, it will be ok, but I have no idea where to put the particle destroy function. Any help is GREATLY appreciated, and if having particles like this is simply not possible to have a particle effect like this on the entire game, I'd appreciate that too. Sorry for the absolutely atrocious code, I really don't know what I'm doing when it comes to programming.