A good feature for a video game to have is full screen switching. Full screen helps a game feel more immersive and being able to switch out of it helps people who have specific monitor setups. Today will show how you a method for implementing full screen switching.
In Gamemaker Studio 2, make an object and call it o_fullscreen.
Turn persistent on. A persistent object only has to be placed in a room once for it’s code to run through the whole game.
Make a key press event and set the key to F1. Add the following code:
In the first room of your game, place o_fullscreen into the Instances layer. o_fullscreen only needs to be put in the first room of your game.
In Options, select the Windows tab. Go into Graphics and change the following:
Allow window resize: ON
Scaling: Full scale
Start fullscreen: OFF
Use synchronization to avoid tearing: OFF
Start the game and press F1 two times. Your game’s screen should effortlessly switch between window and full screen.