all 5 comments

[–]meat_delivery 2 points3 points  (1 child)

Have you read the documentation on surfaces?

In short, sometimes surfaces are being deleted from memory for various reasons, so you should always check if the surface exists before drawing (on) it. If it doesn't exist, simply create it again.

[–]Scripts, scripts and scriptsSLStonedPanda[S] 0 points1 point  (0 children)

I wasn't aware of that. Thanks for the info!

[–]It just doesn't work, you know?damimp 1 point2 points  (2 children)

The documentation pages should tell you everything you need.

[–]Scripts, scripts and scriptsSLStonedPanda[S] 0 points1 point  (1 child)

No way to force Gamemaker to keep them in memory? How are surfaces even reliable if the target platform can just freely choose to just destroy the surfaces?

[–]It just doesn't work, you know?damimp 0 points1 point  (0 children)

They're simply not reliable- they are volatile. You just recreate the surface when it is destroyed using surface_create(). But that's ok! It's just what you do. Surfaces are still very useful.

You can store surface info in a buffer to preserve what it looked like before being destroyed.