• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

GMS 2 [SOLVED] Alpha problem with surface for a pause system



Hello, hello,

I had a pause system with the screenshot stuff drawing on the screen but it seems the surface system can have a better result for my game.

Right now, I managed to create a new surface where I copy/paste the application surface on it when I pause the game but there is a problem with the sprites that have an alpha lower than 1. When I pause the game, the sprites with an alpha equal to 1 are perfectly drawn and still have an alpha equal to 1.

But the sprites with alpha lower than 1 have their alpha even lower, they become even more transparent.

So what I want to do is either having everything at alpha = 1 then I will have a black screen with alpha 0.5 to create a fake transparency or having directly every sprite at alpha = 0.5.

Most of the threads on this problem are talking about GMS 1.4 (I have GMS2) so a lot of things are irrelevant for me and so far I can't find a solution to solve this problem.

For the code, when I press Esc, a oPause object is created with this in the create event:

pauseSurface = surface_create(room_width, room_height)



surface_copy(pauseSurface,0,0, application_surface)


and in the draw event I have:
"draw_surface(pauseSurface, 0, 0)"

So here I am again, asking for help to resolve something far too complex for my brain. :(