LucasSchachtMusic
Member
Hey guys!
I am kind of new to gml.
I know the basics and currently I'm practising a lot and experimenting with new things. I (still) use Game maker 8. But now to my problem:
I was creating a pause menu consisting of an extra room, which is displaying a screenshot of the current view as background. Everything so far works very well, but I want to restore the previous background.
My persistent controller object manages the pausing. When I press the esc button, it saves 4 variables.
1. obj_Player.x
2. obj_Player.y
3. Current background
4. Current room id
I have 4 buttons in that pause room.
1. Continue
2. Save
3. Settings
4. Back to main menu
What I did for the first button was simply:
Sending the player back to the previous room with his last coordinates and replacing the screenshot background with the old background I was storing in that variable. All of these variables are global and everything works just fine. Except for replacing the background. I didn't know how to either refresh or dispose the background before drawing a new one.
What I have now is, that when I draw the old background, it overlaps with itself and creates weird pixels...
I'm currently not able to show you my code, cause I'm on the phone, but I would really appreciate you recommending me different methods on how to avoid getting this problem.
I already tried deleting the current (screenshot) background and creating the old one. I read about using surfaces, but I don't quite understand how that works.
P.S.: I think this problem only appears, when I pause the game while jumping / falling. Might be something else tho.
I am kind of new to gml.
I know the basics and currently I'm practising a lot and experimenting with new things. I (still) use Game maker 8. But now to my problem:
I was creating a pause menu consisting of an extra room, which is displaying a screenshot of the current view as background. Everything so far works very well, but I want to restore the previous background.
My persistent controller object manages the pausing. When I press the esc button, it saves 4 variables.
1. obj_Player.x
2. obj_Player.y
3. Current background
4. Current room id
I have 4 buttons in that pause room.
1. Continue
2. Save
3. Settings
4. Back to main menu
What I did for the first button was simply:
Sending the player back to the previous room with his last coordinates and replacing the screenshot background with the old background I was storing in that variable. All of these variables are global and everything works just fine. Except for replacing the background. I didn't know how to either refresh or dispose the background before drawing a new one.
What I have now is, that when I draw the old background, it overlaps with itself and creates weird pixels...
I'm currently not able to show you my code, cause I'm on the phone, but I would really appreciate you recommending me different methods on how to avoid getting this problem.
I already tried deleting the current (screenshot) background and creating the old one. I read about using surfaces, but I don't quite understand how that works.
P.S.: I think this problem only appears, when I pause the game while jumping / falling. Might be something else tho.