GameMaker [SOLVED] Issues with creating a pause screen

Kealor

Member
So im making a pause interface wherein upon pausing the game is moved to a different room within which lies the interfaces, inventory menu etc. and i got a few questions:

1. The current method of designing wherein a room switch occurs (previous room made permanent then non-permanent after switching back) works fine, however i want to have a screen cap of the last frame before pausing (making it look as though the pause menu is an overlay). I'd imagine the easiest way to do this would be taking a screencap, loading the screencap file into a temporary sprite then drawing the sprite. the issue being that i am currently using the trial version of GMS2 so "add_sprite(<args>)" is not usable. Is there another method i can use other than using add_sprite?

2. Should i just completely re-vamp my pausing method such that all objects have a pause clause wherein they do nothing if game is paused?

3. As a bonus: being a standalone programmer/artist making a game that may not generate any money, is it worth it to spend $100 on GMS2 pro?

Thanks!
 
K

Kuro

Guest
So im making a pause interface wherein upon pausing the game is moved to a different room within which lies the interfaces, inventory menu etc. and i got a few questions:

1. The current method of designing wherein a room switch occurs (previous room made permanent then non-permanent after switching back) works fine, however i want to have a screen cap of the last frame before pausing (making it look as though the pause menu is an overlay). I'd imagine the easiest way to do this would be taking a screencap, loading the screencap file into a temporary sprite then drawing the sprite. the issue being that i am currently using the trial version of GMS2 so "add_sprite(<args>)" is not usable. Is there another method i can use other than using add_sprite?

2. Should i just completely re-vamp my pausing method such that all objects have a pause clause wherein they do nothing if game is paused?

3. As a bonus: being a standalone programmer/artist making a game that may not generate any money, is it worth it to spend $100 on GMS2 pro?

Thanks!
3. Well I'm biased, but I think it's totally worth it.
2. Personally I would go with pause menu as an overlay and just pause everything. But switching rooms is just as valid a tactic. So it's really preference.
1. I'm not sure of the limitations on the demo, so can't comment, but you might want to see what functions pertaining to surfaces, if any, are available in the demo.
 
So im making a pause interface wherein upon pausing the game is moved to a different room within which lies the interfaces, inventory menu etc. and i got a few questions:

1. The current method of designing wherein a room switch occurs (previous room made permanent then non-permanent after switching back) works fine, however i want to have a screen cap of the last frame before pausing (making it look as though the pause menu is an overlay). I'd imagine the easiest way to do this would be taking a screencap, loading the screencap file into a temporary sprite then drawing the sprite. the issue being that i am currently using the trial version of GMS2 so "add_sprite(<args>)" is not usable. Is there another method i can use other than using add_sprite?

2. Should i just completely re-vamp my pausing method such that all objects have a pause clause wherein they do nothing if game is paused?

3. As a bonus: being a standalone programmer/artist making a game that may not generate any money, is it worth it to spend $100 on GMS2 pro?

Thanks!
1. and 2.
I finished my pause menu last week, so have this rather fresh in my mind from what I did in my current game and in my previous.
I don't switch rooms when pausing. Instead I create a pause object (obj_pause) and this handles everything that is needed. In essence it does the following:
Creates a surface and copies the current drawn surface to it.
Deactivates all instances in the room (excluding itself).
Draws the surface that it created and then draws the pause menu over the top of that. This obj_pause has all the code to handle all of the input from the player for selecting the options, etc.
When you select the "Return to Game" option, it destroys itself and in the Destroy Event it clears the created surface and reactivates all the other instances in the room.

Compared to my previous game, it works a lot better. In my first game I did your #2 in that every object had a clause to exit any events in them if the pause object existed. I then had to add loads of clauses all over the place as well as dealing with stopping alerts from continuing to execute as well. It was messy.

3. I'm biased as well, so I will say that yes it is definitely worth it. Even with learning the new way of doing things compared with 1.x, I'm loving it and finding it a lot easier to get things done.
 

Kealor

Member
thanks for the advice guys, pretty sure ill end up forking over the 100 haha

1. and 2.
Creates a surface and copies the current drawn surface to it.
Im most likely going to change my pause code to the method you stated but how exactly did you do this step? Specifically i don't know how to access the current drawn surface. i've tried "application_surface" but that just returns an image containing all my active sprites/fonts.
 

Kealor

Member
sorry, by "active sprite/fonts" i actually meant i was getting this weird sprite map where 1 of each sprite frames were all lay out on the screen.

id screenshot it and share it but for some reason i cant replicate it, i actually got the pause to work exactly as intended from the beginning so all is fine there.

i think maybe what i was doing is i was copying the drawn screen before the draw event in my pause controller so it was loading a different state of application_surface, but that's just a guess

thanks for the help again
 
1. and 2.
I finished my pause menu last week, so have this rather fresh in my mind from what I did in my current game and in my previous.
I don't switch rooms when pausing. Instead I create a pause object (obj_pause) and this handles everything that is needed. In essence it does the following:
Creates a surface and copies the current drawn surface to it.
Deactivates all instances in the room (excluding itself).
Draws the surface that it created and then draws the pause menu over the top of that. This obj_pause has all the code to handle all of the input from the player for selecting the options, etc.
When you select the "Return to Game" option, it destroys itself and in the Destroy Event it clears the created surface and reactivates all the other instances in the room.

Compared to my previous game, it works a lot better. In my first game I did your #2 in that every object had a clause to exit any events in them if the pause object existed. I then had to add loads of clauses all over the place as well as dealing with stopping alerts from continuing to execute as well. It was messy.

3. I'm biased as well, so I will say that yes it is definitely worth it. Even with learning the new way of doing things compared with 1.x, I'm loving it and finding it a lot easier to get things done.

this is EXACTLY what I'm doing right now! Great method. do you have ANY tips or pointers for creating surface, deactivating all, and setting up the pause obj proper? I understand these concepts ROUGHLY, so I'm currently in the purgatory of slowly bashing my way through very complex code... any help will benefit us all I'm sure!
 
Top