Painting on a surface permanently

T

ThePropagation

Guest
I want to make a game where you do a paint splash on the game level like a canvas. I want the paint to stay there forever (until you leave the room). I'm super new at surfaces, when I do a particle create and set the target surface, it still does the particle life and goes away. I want to do it like the tutorial videos and have the draw circle for example stay forever like the video. I just want to do it with particles. But the particles go away just like they do on the application surface. How can I do this? Thanks
 

NightFrost

Member
Are you sure you're not clearing the surface every step? Surfaces will hold anything you draw onto them, so if a particle effect is drawn there it also should remain there. Also make sure your particles are actually drawn to the custom surface, not app surface... though I actually can't right now recall exactly when particles are drawn, though I'd assume during draw step in the normal order of things.

On another point, "forever" and "surface" don't go well together, as surfaces are volatile. You can expect to lose their content at some point.
 

TheouAegis

Member
If you wanted to stay forever, write the surface to a buffer every time the contents of the surface change. If the surface is ever destroyed, reload the contents of the buffer into the surface.
 
Top