➡️Light
Introduced in Game Maker 0.8. In Game Maker 0.10, this was moved to be a component for improved interconnection of logic. Documentation is being updated.
Build Singleplayer & Multiplayer Logic - about [SP] or [MP] behaviours or components.
Common Uses
Light fixtures, spotlights, campfires, soft glow to emphasise emissive Assets
Dark spaces with negative light
Child Objects for pickable items (flashlights, torches, etc), moving Objects (vehicle headlights), etc.
Visual hints or puzzles
Localised ambience and storytelling
Parameters
Options | Details |
---|---|
Light Type (dropdown) - Choose the type of light you want to use. Point Light emits light all around the Object. Spot Light emits light in front of the Object. | |
Starting State - Determines whether the light source is on or off at the beginning of the game. | |
Intensity (slider) - Determines the brightness of the light. | |
Range (slider) - Defines how far from the source the light will reach. | |
Falloff (slider) - Increase or decrease the falloff strength of the light. | |
SpotAngle (spot light only slider) - Determines the cone-shaped angle that the light in front of the Object will emit within. | |
Light Color - Select the colour of the light from a color picker or by inserting a Hex Code. | |
Subtractive - Determine whether you want the light to be subtractive. | |
Message to Turn ON - Add the message(s) required to turn on the light. Message to Turn OFF - Add the message(s) required to turn off the light. |
Documentation of the light component is being updated.
WHAT IS IT?
The Light component can be used to create individual light sources anywhere in a scene and can be customised to change the look and feel of an experience by adjusting its colour, intensity, position, and distance the light will travel.
The Lighting component can also be turned on and off using messages, which means one experience can have many lighting states.
Being able to custom lights is also a great way to brighten up areas of an experience that might not have direct light from the environmental lighting, like caves, tunnels and buildings.
A MULTI-PLAYER COMPONENT
All players in the experience will be able to see the same lights, with the same configuration, behaving in the same way.If the message required to trigger a lighting state change is driven by player action, then the lighting state can be triggered by ALL players.
APPLYING THE COMPONENT
Because this component is multiplayer enabled, make sure to select ‘Synchronized’ in the conponent selection window when adding it to an Object.
It’s recommended to use logic entities with Light component. This makes them easier to identify in Edit Mode and reduces the face count in an experience, which improves performance.
PARAMETERS
The Light component supports previews in edit mode, so you can adjust light parameters and see the results in real time.
Light Type
Point Lights
Setting Light Type to Point Light will make the light emit from a central point and radiate in ALL directions as a ‘sphere’ of light.
Spot Lights
Setting Light Type to Spot Light will make the light emit from a central point and radiate in ONE direction as a ‘cone’ of light.
Starting State
This variable uses a toggle to define if the Light component is initially On or Off.Setting the toggle to OFF means the light will be inactive when the experience loads. Setting the toggle to ON means the light will be active as soon as the experience loads.
Intensity
Range
Falloff
Fall-off defines the gradient in intensity from the centre of the light to the outer edges of the lit area.The values can be set between 0 - 1, where a lower number will produce a softer gradient, and a higher number will produce a harder edge.
Spot Angle
Light Colour
Colour Preview
In the top left corner of the window is a solid bar of colour which will display a preview of the colour and will update in real-time as you adjust it.
Colour Code
To the right of the Colour Preview is a field with a hash (#) and a string of letters and numbers referred to as a Hex Code. The Hex Code represents the colour displayed in the Colour Preview and can be copied and pasted into other Light components to achieve the same result.
Colour Selecter
Below the Colour Preview is a large square with a crosshair in it.Clicking on an area within the square, or clicking and dragging the mouse within the square, will move the crosshair and change the colour preview to the colour in that location.The colours displayed within the square can be adjusted using the drop-down list or the presets in the bottom right corner of the window.These options will change which two (2) colour attributes are prioritised when moving the crosshair:HS - Hue and SaturationHV - Hue and VibranceSH - Saturation and HueSV - Saturation and VibranceVH - Vibrance and HueVS - Vibrance and Saturation
Red, Green, Blue
The Red, Green and Blue sliders, commonly referred to as RGB, can be individually adjusted to change how much of each primary colour is present in the light.
Hue, Saturation, Vibrance
The sliders to the right of the Colour Selecter are labelled H, S, and R and control how much of the colour properties, Hue, Saturation, and Vibrance, are present in the light.
Hue
Saturation
Vibrance
Apply
Make sure to click the ‘Apply’ button once the desired colour has been achieved. Closing the pop-up without clicking ‘Apply’ will result in losing the edits made to the light colour.
Subtractive
The Subtractive parameter can be toggled to 'TRUE or FALSE, and when it's toggled to 'TRUE', the area that was previously lit will now remove light rather than add it.The Subtractive Light still uses the same variables as the standard light, with a key difference that increasing Intensity will more aggressively remove light within the defined range.
When a standard Light and a Subtractive Light overlap, they will blend depending on which Light component has the greatest Intensity value.
Message to Turn On
This field can be used to access existing Messages or to create new ones. When received, this message will turn the Light component ON.
Message to Turn Off
This field can be used to access existing Messages or to create new ones. When received, this message will turn the Light component OFF.
Last updated