The Display

The "window" is where GameMaker Studio 2 displays your game, and, depending on the target device, there are different things that can be done with it, like set it to fullscreen or not (for example). Views, however, govern what you see within that window, and so have another series of functions dedicated to them. The following two sections deal with these two aspects of displaying your game:

  1. The Game Window

However, sometimes it's not enough to get information about the game window and views only, and you really need to know things about the display itself. The following function all give you details about the size and orientation of the display, details about the GUI layer, and information on the mouse:

  1. display_reset
  2. display_get_height
  3. display_get_width
  4. display_get_orientation
  5. display_get_dpi_x
  6. display_get_dpi_y
  7. display_set_gui_size
  8. display_set_gui_maximise
  9. display_get_gui_width
  10. display_get_gui_height
  11. display_set_ui_visibility
  12. display_mouse_get_x
  13. display_mouse_get_y
  14. display_mouse_set

There are also a couple of special functions that can be used to save the display, or part of it, to an image file:

  1. screen_save
  2. screen_save_part

NOTE: On Windows8 SurfaceRT devices, there is a canvas limit of 2048x2048, which means the drawing canvas cannot go above those dimensions (neither with views, nor by setting the game window directly) otherwise your game graphics will be corrupted or degraded.


Back: Cameras And The Display
Next: Cameras
© Copyright YoYo Games Ltd. 2017 All Rights Reserved