🔹Game Rules
GAME MAKER 0.10 UPDATE
This documentation is being updated with the following:
Export and Import Rules with
CTRL
+C
andCTRL
+V
More advanced Math rule replaces Add/Subtract Number, Multiply Number, and Add/Subtract Time rules
New rules expand creative possiblities: Key Input, Mouse Input, OnPlayerEntry, OnPlayerExit, Send Message, Set Player Name
HUD enhanced with icons, slot sizes, dynamic show/hide, improved Banner and Popup
New float variable for decimals
GAME MAKER 0.9 NEW FEATURE Create new types of gameplay and design complex logic more efficiently with Game Rules!
Game Rules Resources
Full documentation on how every rule works
Documentation of useful rulesets/Presets
The Game Rules System
What is it?
The Game Rules system is a visual scripting tool located in the Gameplay menu.
It allows you to easily use and manipulate values such as numbers, text, time, and true/false values for your gameplay design needs:
🔃 Store, modify, and reuse variables
⚖️ Compare values
🎲 Generate random numbers
⏱️ Create timers and stopwatches
ℹ️ Display information in the player's , popup windows, and banners
What Can I Make?
You can create custom mechanics from scratch or use predefined game mechanics called Presets, which is detailed more below. The following Presets are currently available (more will be added in the future):
![](https://docs.sandbox.game/~gitbook/image?url=https%3A%2F%2F331512196-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F83PS3g9zpWmq73xzlwFn%252Fuploads%252FUXQrakpdynIJNscT2Ymx%252FHordeMode.gif%3Falt%3Dmedia%26token%3Da4938419-7bab-4bc4-92ff-c41104997192&width=768&dpr=4&quality=100&sign=7e49db74&sv=1)
Rules
![](https://docs.sandbox.game/~gitbook/image?url=https%3A%2F%2F331512196-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F83PS3g9zpWmq73xzlwFn%252Fuploads%252FPAoet4rPdfcmDVq6mxct%252Fimage.png%3Falt%3Dmedia%26token%3D09940638-d3de-41af-8246-82aada04aa3c&width=300&dpr=4&quality=100&sign=d270ecd2&sv=1)
Rules are a sequence of steps carried out from top to bottom, which can communicate with other rules or object logic (behaviours and components).
Any message sent to the Game Rules system needs to be broadcast to All receivers or explicitly to Rules.
To decrease a variable, use a negative number in the value change logic box.
Rule types currently include: Math, Time, Comparison, Change Variable Values, and Game Screen. Click a Rule type to expand the list of options.
Some Rules offer new possibilities and mechanics, while others offer shortcuts to solve complex problems.
REUSE RULES
Rules reset once they are completed or stopped, so they can be used again.
When you click on a Rule in the Rules list, it is added to the grid board (in a new Ruleset).
![](https://docs.sandbox.game/~gitbook/image?url=https%3A%2F%2F331512196-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F83PS3g9zpWmq73xzlwFn%252Fuploads%252FjuGAcOFEBgK0eWZ90ArZ%252Fimage.png%3Falt%3Dmedia%26token%3D05d9f6f1-3d79-4e05-8b1d-6ede17cfb01b&width=768&dpr=4&quality=100&sign=83be172d&sv=1)
Variables
![](https://docs.sandbox.game/~gitbook/image?url=https%3A%2F%2F331512196-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F83PS3g9zpWmq73xzlwFn%252Fuploads%252FsOwdeEBDHxkgn00zS9O4%252Fimage.png%3Falt%3Dmedia%26token%3Dbbfeb93a-c8ce-49b8-b68b-7c14fe39ed35&width=300&dpr=4&quality=100&sign=79cbe6e7&sv=1)
What Are Variables?
Variables are the backbone of the Game Rules system. Almost every Rule can or has to work in combination with a variable.
They can be used to store information like scores or text, timers can be used to trigger delayed events, and boolean variables offer a new way to build more complex logical systems.
Boolean variables store a binary value generally depicted as true or false. The boolean variable in the Gameplay Rules is called “true/false” variable.
Variables are automatically created when you use a Preset in Game Rules (more information below), but you can customise your Experience mechanics to use any variables you like.
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.
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.
![](https://docs.sandbox.game/~gitbook/image?url=https%3A%2F%2F331512196-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F83PS3g9zpWmq73xzlwFn%252Fuploads%252Fg9jBQ9S21L5ICgDDGqHp%252Fimage.png%3Falt%3Dmedia%26token%3Db235238c-6124-4b00-bb69-c7d5b10a4032&width=768&dpr=4&quality=100&sign=54f89ff6&sv=1)
Presets
![](https://docs.sandbox.game/~gitbook/image?url=https%3A%2F%2F331512196-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F83PS3g9zpWmq73xzlwFn%252Fuploads%252FVPbZ1ggAARWvUypYIrgP%252Fimage.png%3Falt%3Dmedia%26token%3Dc782fbc0-86ba-4a23-a21c-172e2b3ed033&width=300&dpr=4&quality=100&sign=4dfbfde5&sv=1)
Presets are pre-built Rulesets you add to your grid board with a single click 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 the grid board.
You can now customise it and set up or modify existing object logic (behaviours and components) so it will work when players interact with those objects and trigger messages to be sent.
![](https://docs.sandbox.game/~gitbook/image?url=https%3A%2F%2F331512196-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F83PS3g9zpWmq73xzlwFn%252Fuploads%252Fn0S8TYZ11TBzbGt7iR23%252Fimage.png%3Falt%3Dmedia%26token%3Dc359beec-d907-4cdc-a48b-6965defc808c&width=768&dpr=4&quality=100&sign=188fe6c9&sv=1)
Export and Import Rulesets
Copy and paste Rulesets with CTRL
+C
and CTRL
+V
. Messages and variables included!
Paste generated text into external sources like a notepad to share.
Paste into other Experiences to reuse your Ruleset!
![](https://docs.sandbox.game/~gitbook/image?url=https%3A%2F%2F331512196-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F83PS3g9zpWmq73xzlwFn%252Fuploads%252F94prWv9PZxjqfKKvtY4d%252FGM%2520Rules%2520Export%2520Import%2520sm%2520opt.gif%3Falt%3Dmedia%26token%3D45766112-2e70-4ab2-b29f-ada38701de60&width=768&dpr=4&quality=100&sign=b216e783&sv=1)
Last updated