# Game Rules Guide

Creating content related to the [**Game Rules**](https://docs.sandbox.game/en/creator/game-maker/docs/game-rules) system can be found here, including variable use cases, templates, and presets.

## Multiplayer Use Cases for Variables

Try using some of these ideas alone or in combination to create complex gameplay using Game Rules.

**Number** (Integer)

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Global (G)</td><td><ul><li>Round / lap number</li><li>Resource counters <br>(cooperative item use)</li><li>Remaining finite resources (competitive item use)</li><li>World health / risk</li><li>Add global time (s)</li></ul></td></tr><tr><td>Team (T)</td><td><ul><li>Team score / flags captured</li><li>Rounds won</li><li>Pooled resource counter</li><li>Team health / risk</li><li>Remaining items to collect, destroy, etc for a team time (s)</li></ul></td></tr><tr><td>Player (P)</td><td><ul><li>Points earned / NPC kill count / individual flags captured (MVP)</li><li>Personal resource counter</li><li>Player health / risk (if managed by Rules)</li><li>Add player time (s)</li></ul></td></tr></tbody></table>

**Decimal Number** (Float)

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Global (G)</td><td><ul><li>Calculate bonuses</li></ul></td></tr><tr><td>Team (T)</td><td><ul><li>Calculate bonuses</li><li>Calculate team leveling (to offer perks for team growth)</li></ul></td></tr><tr><td>Player (P)</td><td><ul><li>Calculate bonuses</li><li>Calculate player leveling (to offer perks for player growth)</li></ul></td></tr></tbody></table>

**Text** (maximum: \~25 characters) - May display in banners and HUD slots

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Global (G)</td><td><ul><li>Mini game name</li><li>Round / phase name</li><li>Global instruction <br>(e.g., "Collect Coins</li></ul></td></tr><tr><td>Team (T)</td><td><ul><li>Code (can use with new Combination Code behavior)</li><li>Hints / warnings about other team(s)</li><li>Team status</li><li>Character class</li></ul></td></tr><tr><td>Player (P)</td><td><ul><li>Code (can use with new Combination Code behavior)</li><li>Secret role</li><li>Area name (player location)</li></ul></td></tr></tbody></table>

**Time**

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Global (G)</td><td><ul><li>Global game timer</li><li>Event countdown (e.g., enemy waves for PVE play)</li></ul></td></tr><tr><td>Team (T)</td><td><ul><li>Goal completion timer (team record)</li><li>Team timer (varied time games)</li><li>Event countdown (team only)</li><li>Cooldown timer (team)</li></ul></td></tr><tr><td>Player (P)</td><td><ul><li>Personal timer <br>(varied time games)</li><li>Personal best time (MVP)</li><li>Cooldown timer (player)</li></ul></td></tr></tbody></table>

**True/False**

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td>Global (G)</td><td><p>Trigger global logic on command or at game start if True</p><ul><li>Global game settings (difficulty level, high / low performance settings, etc)</li><li>Global task / event status</li></ul></td></tr><tr><td>Team (T)</td><td><p>Trigger team only logic on command if True</p><ul><li>Team role</li><li>Team task / event status</li></ul></td></tr><tr><td>Player (P)</td><td><p>Trigger player only logic on command if True</p><ul><li>Player role</li><li>Player task / event status</li><li>HUD preference (full, minimal)</li></ul></td></tr></tbody></table>

## Rules Templates

There are many Experiences in Game Maker's **Templates** tab that teach about using the Game Rules system or provide gameplay including rules that you can customise.

<div><figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FVG1zhVpv5QpfS1pHjdMK%2Fimage.png?alt=media&#x26;token=c6c6feaf-f4c3-4b24-81f6-ca10d682be77" alt=""><figcaption></figcaption></figure> <figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FocaJPW57LnJzTn73zM5d%2Fimage.png?alt=media&#x26;token=9c88ca11-e181-4d8c-b541-027d8e7a7fa9" alt=""><figcaption></figcaption></figure> <figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FIkfjFf9cisGEJ2m2QHgs%2Fimage.png?alt=media&#x26;token=e37d4cdc-f7cb-4625-9ca3-90f9040a0b2c" alt=""><figcaption></figcaption></figure></div>

<div><figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FJnWw7UArbrsJjb8HTVB2%2Fimage.png?alt=media&#x26;token=5e50bc12-8acb-4617-b920-68f3812881c9" alt=""><figcaption></figcaption></figure> <figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FBXK4l1M2FcFQyHujNjMX%2Fimage.png?alt=media&#x26;token=6fc5a420-77ea-4a7e-976f-3ddc72dae8f7" alt=""><figcaption></figcaption></figure> <figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FyYX6AT4CIPMSXrVgV3BJ%2Fimage.png?alt=media&#x26;token=149d42ba-54a8-477c-ad93-e1310beaba93" alt=""><figcaption></figcaption></figure></div>

<div><figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F8R8xPBfyOec9cI49Gzkz%2Fimage.png?alt=media&#x26;token=be9b78ea-6738-454a-b17f-3b6a063569cc" alt=""><figcaption></figcaption></figure> <figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FfpWaM0LSZO49fjPaaprE%2Fimage.png?alt=media&#x26;token=759329dc-ed52-4bb3-a1b9-70605b780ea0" alt=""><figcaption></figcaption></figure> <figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FHje2dukmy9Gy7xdLYXvn%2Fimage.png?alt=media&#x26;token=5fe3fb84-d464-4791-8d84-61863bf61a94" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FhBPDrPz9CPxdvYvjG0gU%2Fimage.png?alt=media&#x26;token=4d0c34fa-c606-4696-8631-350212ed9aa0" alt="" width="253"><figcaption></figcaption></figure></div>

## Presets

The following resources document Presets available in the [**Game Rules**](https://docs.sandbox.game/en/creator/game-maker/docs/game-rules) to set up gameplay mechanics more quickly.

<table data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th></tr></thead><tbody><tr><td><a href="game-rules-guide/point-race">point-race</a></td><td></td></tr><tr><td><a href="game-rules-guide/collect-points">collect-points</a></td><td></td></tr><tr><td><a href="game-rules-guide/time-trial">time-trial</a></td><td></td></tr><tr><td><a href="game-rules-guide/combo">combo</a></td><td></td></tr><tr><td><a href="game-rules-guide/hunger">hunger</a></td><td></td></tr><tr><td><a href="game-rules-guide/poison">poison</a></td><td></td></tr><tr><td><a href="game-rules-guide/shop">shop</a></td><td></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sandbox.game/en/creator/game-maker/creative-guides/game-rules-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
