> For the complete documentation index, see [llms.txt](https://help.craftsmanplus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.craftsmanplus.com/play/layers/game-mechanics.md).

# Game Mechanics

Add a ready-made game to a scene, customize its art and rules, and use Progression triggers to decide what happens when the player wins or loses.

A Game Mechanic is a complete, ready-made game you drop into a scene. Match 3, Memory, Item Catcher, an endless runner: the rules, scoring, and input handling are built in. You supply the art and tune the settings, and the game plays the same in Preview and in the exported playable.

Every game tracks its own **Score**, and most also track **Moves** or **Health**. You decide what those numbers mean with [Progression](/play/settings/progression.md) triggers: go to the end card when Score reaches 100, show a retry scene when Moves drops to 0.

### Adding a Game

Click the **+** button to open the **Add Layer** menu and choose **Game**, or press the **`A`** hotkey. The **Game Mechanic Library** opens with every game available on your account. Select one and click **Add**. The game is added to your current scene and named after the game you picked.

{% hint style="info" %}
A scene can hold one game. If the current scene already has one, PLAY shows an **Only 1 Game Per Scene** message instead of adding another. Games can't be added to the Global scene.
{% endhint %}

### Customizing the Game's Layers

Every game is built from child layers: the cards in Memory, the falling items in Item Catcher, the character and obstacles in Endless Runner. To change them, click **Edit** on the game in the Layers panel, or double-click the game on the artboard.

In edit mode you can select any child layer and:

* **Swap its asset** to use your own art.
* **Move and resize it** with the Transform controls.
* **Add an idle animation** to items, special items, hazards, slice effects, and the Platformer character.

Child layers have their interactions set by the game, so the Interactions section is read-only. You can't add new layers inside a game. When a setting reduces the number of items a game uses, the extra child layers are hidden rather than deleted, so your art is still there if you raise the number again.

### The Properties Panel

With a game selected, the right panel has two tabs.

The **Game** tab holds the settings specific to that game: layout, speed, animations, special items, and so on. Each game's page lists every setting and its default. Some settings only appear when a related toggle is on. For example, **Collectible Density** only shows when **Collectible Item** is on.

The **Properties** tab holds the settings every game shares:

* **Transform** sets the game's position and size on the artboard. The game's play area fills this box.
* **Autoplay** is in the **Game Mechanic** section. When it's on, the game is live and the player can play it. When it's off, the game renders but ignores all input. Turning Autoplay on also turns on Autoplay for the scene.
* **Progression** holds the game's Triggers and Variables. See below.
* **Timeline** sets when the game layer starts and ends in the scene.
* **Animations** adds Enter and Exit animations.

### Game Progression

The **Progression** section on a game works like the project-level [Progression](/play/settings/progression.md) section, with two tabs.

**Triggers** is where you decide what the game's outcomes do. Click **+** to add a trigger, pick one of the game's counters, set a condition, and choose an action. Triggers on a game can only watch that game's own counters:

* **Score** counts up as the player earns points.
* **Moves** counts down as the player uses up attempts, and stops at 0. Only in games with limited moves.
* **Health** counts down when the player gets hit or misses, and stops at 0. Only in games with health.

The conditions are the same as project triggers: **Reaches**, **Drops to**, **Equals**, and **Every**. See [Triggers](/play/settings/progression/triggers.md) for how each one fires.

**Variables** lists the values that control the game's scoring, like **Starting Score**, **Score Per Match**, or **Starting Moves**. You can edit each value, but you can't add, remove, or rename them. Changing a **Starting** value also changes where the matching counter begins.

{% hint style="warning" %}
A game never ends on its own. Running out of moves or health doesn't stop play, and finishing a puzzle doesn't move to the next scene. Add a trigger for every outcome you want: a win trigger on Score, and a lose trigger on Moves or Health.
{% endhint %}

A typical setup for a game with moves:

* **Score Reaches 100**, action starts your end card scene.
* **Moves Drops to 0**, action starts your try-again scene.

### Using Game Counters Elsewhere

A game's counters are available outside the game while its scene is playing:

* [**Progress Bar**](/play/layers/components/progress-bar.md) and [**Progress Text**](/play/layers/components/progress-text.md) can track Score, Moves, or Health. They're listed under the game's name in the **Track** dropdown.
* [**Conditionals**](/play/settings/progression/conditionals.md) list them in the **Game** group of **Available Variables**, titled with the game's name.

An **Update Progression** action fired from a game trigger changes your project variables. The game's own counters only change through play.

{% hint style="info" %}
The **On Finish** action in the game's **Timeline** section fires when the game layer reaches its end time in the scene. It isn't connected to winning or losing. Use Progression triggers for game outcomes.
{% endhint %}

### Game Library

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><strong>Wipe Away</strong></h4></td><td>Drag to erase a front image and reveal what's behind it.</td><td><a href="/play/layers/game-mechanics/wipe-away.md">Wipe Away</a></td></tr><tr><td><h4><strong>Slide To Reveal</strong></h4></td><td>Drag a slider across to uncover a hidden image. Great for before and after.</td><td><a href="/play/layers/game-mechanics/slide-to-reveal.md">Slide To Reveal</a></td></tr><tr><td><h4><strong>Slide Puzzle</strong></h4></td><td>Slide shuffled tiles back into place to rebuild an image.</td><td><a href="/play/layers/game-mechanics/slide-puzzle.md">Slide Puzzle</a></td></tr><tr><td><h4><strong>Memory</strong></h4></td><td>Flip cards two at a time to find every matching pair.</td><td><a href="/play/layers/game-mechanics/memory.md">Memory</a></td></tr><tr><td><h4><strong>Match 3</strong></h4></td><td>Swap neighboring items to line up three or more, with optional special tiles.</td><td><a href="/play/layers/game-mechanics/match-3.md">Match 3</a></td></tr><tr><td><h4><strong>Item Catcher</strong></h4></td><td>Move a catcher left and right to catch falling items.</td><td><a href="/play/layers/game-mechanics/item-catcher.md">Item Catcher</a></td></tr><tr><td><h4><strong>Item Slicer</strong></h4></td><td>Swipe to slice items as they fly across the screen, and avoid the hazards.</td><td><a href="/play/layers/game-mechanics/item-slicer.md">Item Slicer</a></td></tr><tr><td><h4><strong>Endless Runner</strong></h4></td><td>Swipe between three lanes to dodge obstacles and grab collectibles.</td><td><a href="/play/layers/game-mechanics/endless-runner.md">Endless Runner</a></td></tr><tr><td><h4><strong>Platformer</strong></h4></td><td>Tap to jump over obstacles and land on platforms in a side-scrolling run.</td><td><a href="/play/layers/game-mechanics/platformer.md">Platformer</a></td></tr></tbody></table>

{% hint style="success" %}
Don't see the game you want? Describe it to INTELLIGENCE and it can build a custom game mechanic for you in a Code Layer. See [Feature Generation](/intelligence/specialties/feature-generation.md).
{% endhint %}

{% hint style="info" %}
The games in your library are managed by CRAFTSMAN+, so the names and the set of games you see may differ slightly from this list.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.craftsmanplus.com/play/layers/game-mechanics.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
