Application Surface

This section deals with the application surface and the functions specific to it.

GameMaker: Studio doesn't actually render most things to the screen directly, but instead it renders them to the application surface. This is essentially a surface, just like any that you can make yourself using the surface functions, and as such can be manipulated with the surface functions, drawn to, sent to shaders and anything else that you would normally do with surface are also applicable to this.

NOTE: The only thing you cannot do with the application surface is free it. It always exists, although the index value to access it may change.

When you run your game, this surface is created the first time that the draw event is called in each new room that you enter, which means that nothing is drawn until that point. However, you can still get the application surface position and resize it in the CreateEvent or any other event without getting any errors and the values used will be relevant to the surface when it is created. The actual sequence of events is as follows:

The use of this surface means that you can easily create incredible transitions using shaders, or take the screen and wrap it around a 3D form, or simply scale a low-res game up to any resolution screen... The possibilities are endless!

To access this surface, you need to use the built-in global variable application_surface which is explained on the following page:

  1. application_surface

You also have a couple of specialist functions that are designed only for use with the application surface:

  1. application_surface_enable
  2. application_surface_is_enabled
  3. application_get_position
  4. application_surface_draw_enable


Back: Surfaces
© Copyright YoYo Games Ltd. 2018 All Rights Reserved