ScreenEffects
Changes the look of the whole screen, HUD included: a dark vignette round the edges, an old TV’s scanlines and curved glass, big chunky pixels, color fringes, and the colors themselves (saturation, contrast, brightness, a tint, or a handheld’s four greens). Put it on the camera. Every setting can be changed while the game runs, so scripts can tween them: drain the color as the player’s health runs low, or bulge the screen on a big hit.
Requires: Camera (it changes what the camera shows)
In a network game, each machine keeps its own entity with this on it: it isn’t sent.
Properties
Section titled “Properties”Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.
Screen
Section titled “Screen”vignette: a number = 0.4. How much the corners and edges darken, from 0 (not at all) to 1 (a spyglass). 0.4 frames a scene softly. (Field: a number.)scanlines: a number = 0. How dark an old TV’s lines across the screen are, from 0 (none) to 1 (black). (Field: a number.)curvature: a number = 0. How much the screen bulges like an old TV’s curved glass, from 0 (flat) to 1. 0.3 is about right. (Field: a number.)pixelSize: a number = 1. How big each pixel is drawn, in screen pixels on a 720-pixel-high window (it scales with the window): 1 is off, 4 is chunky, 8 is blocky. (Field: a number.)aberration: a number = 0. How far red and blue split apart towards the edges, like a cheap lens, from 0 (not at all) to 1. (Field: a number.)
saturation: a number = 1. How colorful it is: 1 as drawn, 0 black and white, more than 1 vivid. (Field: a number.)contrast: a number = 1. 1 as drawn; more makes darks darker and lights lighter, less washes it out. (Field: a number.)brightness: a number = 0. Added to every color: 0 as drawn, -1 black, 1 white. Small amounts (±0.1) for a mood. (Field: a number.)tint: a color, “#RRGGBB” or “#RRGGBBAA” = “#FFFFFFFF”. Multiplied into every color: white leaves it alone, a pale blue for night, red for danger. (Field: a color.)grain: a number = 0. How much film grain flickers over the screen, from 0 (none) to 1. (Field: a number.)palette: one of Full, GameBoy, Sepia, OneBit = “Full”. Draws the screen in a few colors only, after everything above. (Field: one of its values.)
While the game runs
Section titled “While the game runs”Not saved with the scene; scripts read them, and entity_get shows them as live while the game plays.
isActive: true or false. True if any setting changes the screen at all.
Scripts use it as ScreenEffects: its methods, events and values that aren’t saved with the scene.