Skip to main content

graphics.toml

The graphics.toml file can be used to specify configuration related to graphics. Simply create a file named graphics.toml, make sure it is in the root directory of your game's project, and Easel will automatically load it. Below is an example of a valid graphics.toml file, with all the default settings:

[graphics]
resolution = "max"
minResolution = "low"

cameraRadius = 50.0
aspectRatio = "auto"

bloomAlpha = 0.3
shadowX = 0
shadowY = 0.5

Resolution

Easel can function at three resolutions: low, medium, and high. See Resolution to learn more about what these mean. The resolution parameter defines the initial resolution of your game. The minResolution parameter defines the lowest resolution that your game can be set to, either automatically or manually.

Camera

The camera determines how the game-world coordinates are mapped to the pixels on the screen. The cameraRadius parameter defines the default radius of the camera. The aspectRatio parameter defines the aspect ratio of the camera. This may be overridden at runtime using the Camera function.

Bloom

The bloomAlpha parameter defines the default opacity of the bloom effect. These can be overridden on a sprite-by-sprite basis using the bloomAlpha parameter, for example see PolygonSprite.

Shadow

The shadowX and shadowY parameters define the offset of the shadow effect, in game-world coordinates.