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.
NEW GAME MAKER 0.12 INFO COMING SOON! The new release has a lot of amazing features, some of which impact the details on this page. Check back soon for an update, and in the meantime you can see a summary of all the updates in the Changelog.
About
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
Variable use, presets, and templates to learn more:
The Game Rules System
🆕 Using Multiple Gridboards and Game Rules
What is it?
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.
🔃 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
What Can I Make?
Create custom mechanics, or use predefined game mechanics called Presets:
Collect Points | Time Trial | Point Race | Combo | Hunger | Poison | Shop
How Does it Work?
The Game Rules system defines, tracks, and relays an Experience's global mechanics.
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)
MULTIPLAYER GAMES
Use a combination of player variables (P), global variables (G), and team variables (T) depending on how you want Rulesets to be triggered, variables to be tracked, and information to be displayed in your game mechanics.
The Game Rules Window

1️⃣ Boards button - opens a menu to select a gridboard or add a new one to organize rulesets.
2️⃣ Rules Guide button - links to this documentation in the Creator Portal.
3️⃣ Rule Connectors toggle - see chains of logic with messages sent/received in a gridboard.
4️⃣ Island Menu - contains Presets, Rules, and Variables to build mechanics
5️⃣ Gridboard - a space to add rules from the Island Menu and organise them into Rulesets.
6️⃣ Rules Hierarchy dropdown (applies to the selected gridboard):
view and duplicate rules
focus on (go to) a rule or ruleset
enable/disable debugging for one or more rules or rulesets
Controls
✅ 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
Click the magnify lenses (top right)
CTRL+ 🖱️move scroll wheel
↕️↔️ PAN GRID BOARD
Click and hold 🖱️ scroll wheel
CTRL+WASDkeys
↩️↪️ UNDO/REDO
CTRL+Z- UndoCTRL+Y- Redo
📋➕ COPY/PASTE
CTRL+CCTRL+VTip: Paste into a notepad to save/share (JSON format). Pasting into an Experience generates included variables and messages.
Using Multiple Gridboards
Game Maker 0.11 introduces multiple gridboards to organize rulesets.
Add gridboard or category - Add button
Select a gridboard - double click its name
Rename/move - right click
Delete - trash icon (press
CTRL+Zto undo)deleting a gridboard removes all of its rules
deleting a category removes all of its gridboards and rules
Close Boards panel - click the X in the top right

Rules
RulesRules 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.
Rule Types
Click a rule type to expand the list of options. Click on a rule in the list to add it to a gridboard.

Logic boxes highlighted in red require more information to make the rule active.
A Rule's Logical Flow
Logic boxes break down Rules into simple steps executed from top to bottom:
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.

EXAMPLE
Timer Rule
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.
Trigger a Rule
A rule is triggered by a message received. This can be done in many ways. Here are just a few ideas:
Collect, destroy, spawn, or interact with objects
Use a Message Broadcaster to send messages repeatedly with a delay between
Use Timed Events to send a message in a sequence a sequence of events
Use an outgoing message sent from a rule to trigger a different rule
Variables
Variables🆕 Team Variable and Multiplayer Use Cases for Variables
What Are Variables?
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.
Create or Repurpose
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.
Variable Types
Currently the following types of variables are available:
🔢 Number - Integers (e.g., 255)
Whole numbers for counting resources, scores, etc.
🧮 Decimal Number (Float e.g., 2.55)
Non-whole numbers for more precise calculations (currency, using division, etc).
🔤 Text - Short character strings
Display short text in banners or HUD slots (status, location, player name/level, etc).
⏱️ Time - Time values
Timers and stopwatches that can be stopped, paused, and resumed.
☯️ True/False - Boolean (binary) values
Set a state to manage logic, with potential to create if/else structures.
How Variables are Applied
A variable can be applied three ways: global, player, or team.

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.
Player & Team Variable Data
Player interaction is required to trigger changes to a player or team variable.
Player Source
To modify a variable for the correct player or team during play, an interaction from a player must trigger a message that will then include player source data.
Examples:
detection by a Speaker or Trigger Volume
answering a question via Asker
pressing a Button
and more
Variables Window
The Variables window lists all variables in the Experience. Each will have a tag of either G, P, or T to show whether they are global, player, or team variables.
In this area new variables can be added and existing ones can be removed or edited. The list shows the variables' names, whether they are global, player, or team variables, and type (number, decimal number, time, true/false and text).
Enter the name for internal use in the Name* field. You will create a custom name to appear in the player's HUD, or Heads-Up Display, in the rule.

Rules
To use a variable in a rule, add the rule and click Select Variable (if a variable is not selected yet, the logic box will be red and the rule will not be active).

The Variables window will open on the left. Check the box next to the variable you want to use.

For a Team variable, you can choose Triggering Team or a specific team name (which is created via Spawn Point behavior).

Rulesets
Rulesets are a way to visually organise a group of rules used for the same game mechanic.
How Rules Act in a Ruleset
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.

Managing Rules and Rulesets
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
Click the ➕ button next the the name of the ruleset
Rename, Duplicate, or Delete a ruleset

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
Move a Ruleset to a Different Gridboard
Use CTRL+C to copy a ruleset and CTRL+V to paste a ruleset into a different gridboard. Then delete the ruleset from the old gridboard.
Presets
PresetsPresets 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.
Add then Integrate
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.

STEP-BY-STEP EXAMPLE: APPLY A PRESET
Visit the Game Rules Guide's Collect Points page for a full step-by-step example of how to apply a Preset to your Experience logic.
Integrate a Preset with Your Experience
Check Variables Included
Review variables created with your Preset to make sure they are player (P) for individual players, global (G) for all players, or team (T) for teams, depending on how you want them to apply.
Set up Messages to Trigger the Rules Included
Modify messages sent by objects or messages required in the preset's rules to ensure they will communicate as expected.
There are multiple ways to send a message. Here are a few examples:
Collect, destroy, spawn, or interact with objects
Use a Message Broadcaster to send messages repeatedly with a delay between
Use Timed Events to send a message in a sequence a sequence of events
Use an outgoing message in another Rule to trigger a different one
Debug
If your mechanic isn't working as expected, you can debug specific rules or rulesets.
Export and Import Rulesets
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!

🆕 Multiplayer Ranking

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
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.
How Ranking is Determined
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.
How Ranking Data is Displayed
Game Client / Game Maker Gallery
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.

Global Ranking
Automatically displays on the Experience Page in a Ranking tab
Can be reset when updating the Experience, or at any time
Data updates in real time
Displays up to 100 top players based on criteria set in Game Maker
For the first version of this feature, there is no date filter to view rankings.
If you are running a contest that requires Global Ranking data, visit your Experience Page and take a "snapshot" of data at the right day/time for fair and accurate data.
Ranking Settings
Set a Message to validate data
Add up to three numeric variables to determine player rank
Primary
Secondary (tie breaker if Primary data is the same)
Tertiary (tie breaker if Primary and Secondary data is the same)
Use controls to customise settings further
Controls

Ranking button - Open Ranking screen
Ranking screen
Message to validate data - The message you enter here must be sent to Rules to capture variable data before victory/defeat triggered
Add a variable - If the plus sign does not appear, you need to create a number, decimal, or time variable to add
Remove a variable
Variable title - Click to edit how it will appear on Rankings screens and the Experience Page
Sort variable values - Ascending or descending
Create a Global Ranking - Display Ranking data for all play sessions on the Experience Page and at the end of each game session
Trigger a Ranking
(Optional) Time Variables
⏸️ If a time variable will be included in the ranking, it must be started and paused/stopped before data validation and victory are triggered
(Required) All Use Cases
📸 Trigger a snapshot of variable data (send a validation message to Rules)
Trigger a Victory or Defeat component to end the game, revealing the ranking screen
Examples
Example: Timed Race
To accurately collect each player's time data in a race with a global timer:
Create a global time variable, trigger at the start of the race
Create a player time variable, trigger with player interaction/detection to receive a player source
At race start: Trigger the global time variable to begin
When a player crosses the finish line: Pause the local variable and overwrite the value with a Set Time Value rule, using the global time variable's value in the rule
Example: Zombie Apocalypse Survival Game
A survival game may have Ranking set up in many ways depending on the goals of the game:
Medium difficulty survival
Primary variable: Survival time (descending)
High difficulty survival
Primary variable: Number of player deaths (ascending)
Secondary variable: Best survival time (descending)
Save the world
Primary variable: People rescued
Secondary variable: Zombie kills
Last updated
Was this helpful?




