Views

This section deals with the functions for defining view properties.

Views are one of the most important of the display properties that you can manipulate with GameMaker: Studio. They are, basically, little windows into your game world that enable you to show the player parts of a room, either scaled or 1:1, and as such they are essential when your game room is larger than the display size. For information on how views can be set up without code directly from the room editor, please see the section More About Rooms - Views.

GameMaker: Studio permits you 8 independent views (numbered from 0 - 7), all of which can be active at any one time, and all of which can show different parts of the same room. This means that you can use views to draw HUD elements or to have split screen effects for example. Each view also has its own associated view port. If the view is a section of the room that the player can see, the port is the area of the screen on which this view is drawn, and as such you can distort and scale the view if it is a size other than the view port.

Something to note about views and view ports is that the total area of the bounding box for all active view ports in the first room of the game is what defines the background canvas size (or window size for MacOS, Ubuntu (Linux) and Windows), as illustrated by the image below: Finally, you should take care when using multiple views as the draw event for all instances is called once for each view, so if you have three views active in one room, the draw event will be run three times every step (basically doing three times the work) which can be a cause for slowdown if the game is large or complex. The view_current variable can be used to help limit these draw calls however.

The following functions exist that deal with views:





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here