Game Rules
New in GM 0.9. GM 0.10: evolved math rule, new "Float" variable, share/reuse rulesets (copy/paste), new inputs & events, etc. GM 0.11: new "Team" variable, connectors, etc.
Last updated
Was this helpful?
New in GM 0.9. GM 0.10: evolved math rule, new "Float" variable, share/reuse rulesets (copy/paste), new inputs & events, etc. GM 0.11: new "Team" variable, connectors, etc.
Last updated
Was this helpful?
The Game Rules system empowers builders to:
Build logic more efficiently for greater game performance
Design new gameplays and compelling mechanics: Tower Defense, Horror / Backrooms, Resource Management, Cooking Simulator, Survival, and more!
Enhance the functionality of object logic (behaviours and components)
Guide players better and add game polish
The Game Rules system is a visual scripting tool in the Gameplay menu.
It allows you to use and manipulate values such as numbers, text, time, and true/false values.
Create custom mechanics, or use predefined game mechanics called Presets:
Collect Points | Time Trial | Point Race | Combo | Hunger | Poison | Shop
Rules are a sequence of steps carried out from top to bottom that can be reused in your game.
They offer new possibilities, mechanics, and shortcuts to solve complex problems.
Game Rules will only receive a message from objects if the Broadcast Type is All or Rules.
To decrease a variable, use a negative number in the value change logic box.
Variables are the backbone of the Game Rules system. Almost every rule can or must work in combination with a variable.
They can be used to store information to build more complex logical systems and provide important information to players.
Variables are automatically created when you use a Preset in Game Rules (more information below) or if you paste a ruleset into a gridboard. You can also create any type of variable you want and change the variable used in a rule.
A variable can be renamed and its value can be changed, but it can not be modified to a different type or be applied differently.
Create the type of variable needed and how it will be applied, replace the old variable in a rule, and delete the old variable.
Rulesets are a way to visually organise a group of rules used for the same game mechanic.
Rules may be grouped into a Ruleset, but they still act independently when triggered:
The order in which rules are placed in a ruleset does not change the flow of logic.
A rule's message Out may trigger another rule in the same ruleset or in a different one.
Some rules may not send a message Out.
a rule may trigger another rule in a different gridboard.
Example
The Collect Points ruleset (a Preset) is a gameplay mechanic that includes a chain of two rules (shown in red below) and other rules that act independently of the others.
Presets are pre-built rulesets you add to a gridboard with a single click. This is a fast way to set up commonly used game mechanics and customise as needed.
When adding a Preset, all necessary variables and messages are automatically generated.
Presets are accessed with a button in the Island Menu on the left. Click on a Preset in the list to add it to a selected gridboard.
Customise messages sent/received, variables used, rule names, and more as needed.
Integrate the Preset to communicate with your object logic (behaviours and components) to activate the Preset's mechanics in your Experience.
Copy and paste Rulesets with CTRL
+C
and CTRL
+V
. Messages and variables are included!
Paste generated text into external sources like a notepad to share.
Paste into other Experiences to reuse your Ruleset!
A multiplayer Experience must be published to the map or shared to the gallery to view Ranking data during play or on the website.
NO DATE FILTER FOR GLOBAL RANKINGS... YET! Take a snapshot of global rankings at the end of your events for accurate data.
Numeric variables (Number, Decimal Number, Time) can be used to create player rankings.
Up to three variables can be used to sort player ranking data.
Sorting can be done in ascending or descending order per variable.
Victory/Defeat screen is triggered
Local Ranking screen appears
Global Ranking screen appears
Global Ranking data updates in real time as Local Ranking data is collected from play sessions.
Boards button - opens a menu to select a gridboard or add a new one to organize rulesets.
Rules Guide button - links to this documentation in the Creator Portal.
Rule Connectors toggle - see chains of logic with messages sent/received in a gridboard.
Island Menu - contains Presets, Rules, and Variables to build mechanics
Gridboard - a space to add rules from the Island Menu and organise them into Rulesets.
Rules Hierarchy dropdown (applies to the selected gridboard):
Trigger A rule is triggered by a message In. If a message with arguments is received, the argument value may be used in a rule's action.
Variable(s) A rule may use zero, one, or multiple stored values defined by name and type.
Action(s) An action to carry out (e.g., change a variable, compare values, display on the HUD, etc).
Message to Stop the Rule Some rules allow another message In to stop its actions.
Output An optional message Out may trigger another rule, object logic, or quest. A message with arguments may be sent for more complex logic or fewer rules.
Right click a Rule and use arrows to view details about each logic box.
Team Variable and
If a time variable will be included in the ranking, it must be started and paused/stopped before data validation and victory are triggered
Trigger a snapshot of variable data (send a validation message to Rules)
DEFINE Create Rulesets made of one or more Rules
A Rule carries out actions, which may use variables you define and values you enter
TRACK Changes to variables caused by Rule actions are stored for reuse Player variables (P) - track individual players Global variables (G) - track all players Team variables (T) - track teams (set in Spawn Point behavior)
RELAY Rules are trigged by messages In and send messages Out to communicate with:
other rules
behaviours and components (object logic)
quests (Objectives)
Global (G)
Synchronised values for all players
Example: All players earn a resource anyone can use.
Player (P)
Store each player's values based on their individual actions
Example: Each player earns different resources to use their own way.
Team (T)
Stores values based on the actions of members of each team
Example: Team members work together to earn a resource to gain a competitive edge over other teams.
Rule types:
Variable use, presets, and templates to learn more:
Click the magnify lenses (top right)
CTRL
+WASD
keys
CTRL
+Z
- Undo
CTRL
+Y
- Redo
CTRL
+ C
CTRL
+ V
Tip: Paste into a notepad to save/share (JSON format).
Pasting into an Experience generates included variables and messages.
Player Perspective Enter an area. A timer appears as a door opens, indicating limited time to enter. Re-enter the area to start a timer again.
Logic Flow of the Timer Rule
Trigger - When the player enters an area and is detected, a message is sent to the Rule.
Variable - A time variable will be used to store the timer.
Actions - The timer is displayed and starts to count down.
Output - When the timer reaches 0, a message is sent to close the door. The timer can be reused if triggered.
Whole numbers for counting resources, scores, etc.
Non-whole numbers for more precise calculations (currency, using division, etc).
Display short text in banners or HUD slots (status, location, player name/level, etc).
Timers and stopwatches that can be stopped, paused, and resumed.
Set a state to manage logic, with potential to create if/else structures.
Add a Rule - To a new ruleset
Click on a rule in the Rules list
- To an existing ruleset
Select a ruleset to add it to, then click on a rule in the Rules list
Select a ruleset to reveal a small menu of buttons (top center)
Move a rule to a ruleset
Drag a rule from the gridboard or another ruleset into the desired ruleset with the ⠿ grabber at the top right of a rule
Experience creators may set up two types of ranking data for players to view:
Local Ranking - Current play session data
Global Ranking - All play session data
Store, modify, and reuse variables
Compare values
Generate random numbers
Create timers and stopwatches
Display information in the player's , popup windows, and banners
Trigger logic with key or mouse inputs and player entry/exit
OPEN GAME RULES Game Rules tab in the Gameplay menu
CLOSE GAME RULES Click the X (top right)
MAX/MIN WINDOW (top right)
Maximise
Minimise
ZOOM IN/OUT
CTRL
+ move scroll wheel
PAN GRID BOARD
Click and hold scroll wheel
UNDO/REDO
COPY/PASTE
Number - Integers (e.g., 255)
Decimal Number (Float e.g., 2.55)
Text - Short character strings
Time - Time values
True/False - Boolean (binary) values
Click the button next the the name of the ruleset
Rename, Duplicate, or Delete a ruleset