Obsolete Display Functions

These functions are for dealing with aspects of how the game is displayed.

Function List:

FunctionDescription
screen_refreshRefreshes the screen using the current room image (not performing drawing events).
screen_wait_vsyncWaits for the next vertical synchronization of the monitor.
set_automatic_drawIndicates whether to automatically redraw the room (true, default) or not (false).
set_synchronizationIndicates whether to synchronize the drawing with the refresh frequency of the monitor.
display_set_sizeSets the width and height of the display in pixels. Returns whether this was successful. (Realize that only certain combinations are allowed.)
display_set_colourdepthSets the colour depth. In general only 16 and 32 are allowed values. Returns whether successful.
display_set_frequencySets the refresh frequency for the display. Only few frequencies are allowed. Typically you could set this to 60 with a same room speed to get smooth 60 frames per second motion. Returns whether successful.
display_set_allSets all at once. Use -1 for values you do not want to change. Returns whether successful.
display_test_allTests whether the indicated settings are allowed. It does not change the settings. Use -1 for values you do not want to change. Returns whether the settings are allowed.
window_set_region_sizeSet the width and height of the drawing region in the window. adaptwindow indicates whether the window size must be adapted if the region does not fit in. The window size will always be adapted if you use fixed scaling.
window_set_region_scaleIf the window is larger than the actual room normally the room is displayed in a region centered in the window. It is though possible to indicate that it must be scaled to fill the whole or part of the window. A value of 1 is no scaling. If you use a value of 0 the region will be scaled to fill the whole window. If you set it to a negative value it will be scaled to the maximal size inside the window while maintaining the aspect ratio (this is often what you want). adaptwindow indicates whether the window size must be adapted if the scaled room does not fit in. Adapting the window is only effective when the scale factor is positive.
window_get_region_scaleReturns the scale factor for the drawing region.
window_get_region_widthReturns the current width of the drawing region.
window_get_region_heightReturns the current height of the drawing region.
window_set_visibleSets whether the game window is visible. Clearly you normally want the window to remain visible during the whole game. The program will not receive keyboard events when the window is invisible.
window_get_visibleReturns whether the game window is visible.
window_set_showborderSets whether the border around the window is shown. (In full screen mode it is never shown.)
window_get_showborderReturns whether the border around the window is shown in windowed mode.
window_set_showiconsSets whether the border icons (iconize, maximize, close) are shown. (In full screen mode these are never shown.)
window_get_showiconsReturns whether the border icons are shown in windowed mode.
window_set_stayontopSets whether the window must always stay on top of other Windows.
window_get_stayontopReturns whether the window always stays on top of other Windows.
window_set_sizeableSets whether the window is sizeable by the player. (The player can only size it when the border is shown and the window is not in full screen mode.)
window_get_sizeableReturns whether the window is sizeable by the player.
window_defaultGives the window the default size and position (centered) on the screen.
window_view_mouse_setSets the position of the mouse with respect to the view with index id.
window_views_mouse_setSets the position of the mouse with respect to the first view that is visible.
room_set_captionSets the room caption for the given room index.

Why These Are Obsolete

These functions are now considered obsolete due to the changes in the way that GameMaker: Studio draws things to the screen, as well as the fact that some of them are legacy functions from quite a while back which are no longer valid for modern computers and devices, or that they don't work on any device except a Windows machine, and even then they are usually not necessary.


Back: Obsolete Functions
Next: Splash Functions

© Copyright YoYo Games Ltd. 2018 All Rights Reserved