Gamemaker Studio 2: How To Make Full screen Switching

news_image

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:

window_set_fullscreen(!window_get_fullscreen());

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.

Fullscreen GIF

Advertisements

One thought on “Gamemaker Studio 2: How To Make Full screen Switching

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s