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.
About
The Game Rules system empowers builders to:
Build logic more efficiently for greater game performance
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
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.
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+Z to 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
Connectors and Rules Hierarchy are unique to the selected gridboard. Rules on different gridboards communicate.
Connections
Toggle on connections to visualize how rules in a gridboard communicate with each other with their messages in and out. It's a helpful tool to quickly view how your rules logic will trigger.
Connections only apply to the selected gridboard, but rules on different gridboards will communicate with each other.
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.
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:
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 createif/else structures.
How Variables are Applied
Local variables have been renamed to player variables in Game Maker 0.11.
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.
In Game Maker 0.11, a player source is also needed to correctly trigger Objectives in multiplayer Experiences.
Behaviours, components, and the Send Message rule can broadcast a message to a specific team.
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
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 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
Make sure a message is being sent to rules through direct player interaction for player or team variables to be affected correctly with player source data.
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, Global Ranking data cannot be exported.
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
Secondary and Tertiary variables can also provide interesting information for players.
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
Change a variable's format (e.g., time as mm:ss) by editing it in the Variables screen.
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)
Examples
Example: Team Results & MVP
If you want to rank by team results and then by each player's data (e.g., highlight the MVP):
Primary: Team variable
Secondary: Player variable
Example: Timed Race
This is a workaround due to minor delays that may occur when messages are sent. Even with the same trigger (e.g., a Trigger Volume component), a player time variable will not start each player's value at the exact same time.
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)
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
Rules
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.
Variables
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
Presets
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
Trigger a Victory or Defeat component to end the game, revealing the ranking screen
🔃
⚖️
🎲
⏱️
ℹ️
⌨️
✅
❎
🔲
🔍
🖱️
↕️
↔️
🖱️
↩️
↪️
📋
➕
🔢
🧮
🔤
⏱️
☯️
➕
Game Rules in the Gameplay Menu. The Island Menu in the Game Rules window is highlighted on the left.
Example: Gridboards that may be useful to organize rules for a resource management game with enemy waves at night.
Rule connectors show where messages are sent and received in a gridboard
Shown: Math rule added to a new ruleset
Rule Info mode
Example: Collect Points ruleset (a Preset) - click to expand