🔹Game Rules

GAME MAKER 0.10 UPDATE

This documentation is being updated with the following:

  • Export and Import Rules with CTRL+C and CTRL+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):

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).

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.

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.

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!

Last updated

Logo

Copyright © 2012- 2023 The Sandbox. All Rights Reserved.