> 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/slide-puzzle.md).

# Slide Puzzle

A sliding tile puzzle. The player moves shuffled tiles into the empty space to rebuild an image.

Slide Puzzle cuts an image into a grid of tiles, removes one, and shuffles the rest. The player taps or swipes a tile next to the empty space to slide it in, working the tiles back into place to rebuild the image.

### Layers

* **Puzzle Image** is the image that gets cut into tiles. Swap it for your own art in edit mode. Its position, size, and rotation are set by the game.

### Game Settings

**Layout**

* **Tiles Layout** sets the grid size: **2x2**, **3x3**, **4x4**, or **5x5**. Default is **3x3**.
* **Tile Spacing** sets the gap between tiles, from **0** to **20**. Default is **5**.

**Outline**

* **Tile Outline** draws an outline around each tile. Default is **on**.
* **Outline Color** sets the outline color. Default is **#FFFFFF**.
* **Outline Thickness** sets the outline width, from **0.5** to **20**. Default is **1**.

**Shuffling**

* **Shuffle Animation** plays the shuffle when the game starts. Turn it off to start with the board already shuffled. Default is **on**.
* **Shuffle Amount** sets how many moves the shuffle makes, from **1** to **100**. Default is **20**. Higher values make a harder puzzle.

### Progression

| Variable            | Default | What it does                                            |
| ------------------- | ------- | ------------------------------------------------------- |
| **Starting Score**  | 0       | Added to the Score at all times.                        |
| **Score Per Match** | 12.5    | Points for each tile currently in its correct position. |
| **Starting Moves**  | 20      | The number of moves the player begins with.             |

Triggers can watch **Score** and **Moves**.

* **Score** is recalculated after every move from the tiles that are in the right place. Moving a correct tile out of position lowers the Score again.
* **Moves** drops by one each time a tile slides.

A 3x3 puzzle has 8 tiles, so the default 12.5 per tile adds up to 100 when the puzzle is solved. If you change **Tiles Layout**, change **Score Per Match** to keep a solved puzzle at 100:

| Tiles Layout | Tiles | Score Per Match for 100 |
| ------------ | ----- | ----------------------- |
| 2x2          | 3     | 33.34                   |
| 3x3          | 8     | 12.5                    |
| 4x4          | 15    | 6.67                    |
| 5x5          | 24    | 4.17                    |

**Example triggers:**

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

{% hint style="info" %}
The shuffle can leave some tiles in their correct positions, so the Score may start above your Starting Score.
{% 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/slide-puzzle.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.
