T
Theodor
Guest
I am currently trying to create a game with destructable terrain like in the worms games. I have currently been able to create one with a code that draws a black circle on the white terrain, which then is created into a sprite and replaces the old sprite, giving it a new collision mask.
My problem is that this constantly eats more and more ram each time the function is called, untill the game crashes. I use the "sprite_create_from_surface" function and have located that this is the reson for the constant ram loss.
My question, does anyone know how this memory problem can be prevented or any other way to create a destructable terrain?
My problem is that this constantly eats more and more ram each time the function is called, untill the game crashes. I use the "sprite_create_from_surface" function and have located that this is the reson for the constant ram loss.
My question, does anyone know how this memory problem can be prevented or any other way to create a destructable terrain?