Skip to content
Hyomoto edited this page Nov 29, 2020 · 5 revisions
Jump To back Overview Contents Macros Index

Module Overview

The FAST render is designed to make scaling your game to meet multiple resolutions less painful. By default GML uses the "black bars" method of scaling, but if you are working with pixel perfect sizing, the FAST render can make the process less painful. Render is still under development

Dependencies: Core

Contents

RenderManager

All of the functions bound to the FAST render are accessed through RenderManager, which is used to initialize the FASTRender object. This object is used to draw the final image to the screen, and thus Render will not function if it is disabled. There are two modes that the render can operate in, with or without views. By default, the size of the internal render will be interpreted from the view in the first room of the game, however, this behavior can be overridden by simply declaring the resolution you would like to use.

RenderManager().set_resolution( 1280, 720 );

Once done, the render will configure the views in the game to match the internal resolution. The render will also work to scale the game window to a comfortable size. There are two functions which affect this scaling:

RenderManager().set_scale( 0.7 );
RenderManager().set_precision( 1.0 );

This would scale the game window to occupy roughly 70% of the target monitor using a scale to the nearest whole pixel. This would create a pixel-perfect scale for the game window. Changing the precision to 0.5 would scale to the nearest half pixel, which would allow more flexibility in the final window size, but could cause squishing/stretching on the final image. How much this affects the final image will depend on the resolution of the art and the amount of scaling applied.

Macros

Name Type Value Description
none
Clone this wiki locally