# Tilemap

## Creating a Tileset

<figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2FhV88A55EYeXi9AhtaKeB%2Ftileset_1.png?alt=media&#x26;token=a5f0c7cf-73ea-4d15-9b88-21e883a85e39" alt=""><figcaption><p>Working File.</p></figcaption></figure>

<figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2FqPnpTcgiiraZyK2PFsEy%2FWhere%20Tile%20Palette.png?alt=media&#x26;token=f9297d2b-e9c1-4ce9-a89f-fe39fe834964" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2FEpZ91GQVuSYgjyf55BRn%2FNew%20Tile%20Pallete.png?alt=media&#x26;token=6a032fcc-0b9c-497c-808d-cd13028251f8" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2F2XK8h6ol6hf9sfTnJpRC%2FDrag%20n%20Drop%20Tiles.png?alt=media&#x26;token=2afafb48-8d6e-4eb4-9a0d-d4ae771367a1" alt=""><figcaption></figcaption></figure>

After this, make sure to save the tiles to their own folder. It's gonna make a lot of files (one for each individual tile).

## Creating a Rule Tileset

To make the rule tileset, you need to not do the last step in the previous section.

This is how to do it: [https://learn.unity.com/tutorial/using-rule-tiles#](https://learn.unity.com/tutorial/using-rule-tiles)

<figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2FW5Ky6QLoPG9LpF18mMkP%2FWhere%20Rule%20Tile.png?alt=media&#x26;token=7c3c2d17-c52f-47c4-9c5d-5224c52c6918" alt=""><figcaption></figcaption></figure>

Drop the rule tile into the tile set. Then drag the sprites from the project folder into the inspect where the square says "Select."

<figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2F8SvxA387NyTfTDgCYkw6%2FTile%20Rule%20Works%20like%20this.png?alt=media&#x26;token=a326901c-4f17-4837-9042-cc919750d8d4" alt=""><figcaption></figcaption></figure>

An X is a hard edge. The Green arrow means it is continuous.&#x20;

<div><figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2Fh9rQ5CkI8CI2GW0piNvP%2FRule%20Tile%201.png?alt=media&#x26;token=02c458c6-2788-4f9c-96f5-a4dde26219a6" alt=""><figcaption></figcaption></figure> <figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2F61amaqVWAkxNyAKKYPo5%2FRule%20Tile%202.png?alt=media&#x26;token=8a517408-8f5c-4c4c-9696-c0c1da973768" alt=""><figcaption></figcaption></figure></div>

<figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2FQ7xHdZwiSLnTHpQnWBbO%2FTileMap%20Settings.png?alt=media&#x26;token=c6cc22ae-5954-45ef-bbbe-3eb9cfa40ba0" alt=""><figcaption></figcaption></figure>

## Creating an Animated Tileset

You'll need to create three different files in a different state of the animation.

<div><figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2FWy6fkTPzePTBuZ4r5Jyp%2Ftileset_1_water1a.png?alt=media&#x26;token=5463c797-e26e-4374-8ea5-3fcc17f78cca" alt=""><figcaption></figcaption></figure> <figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2FxJfsbCgVNsscxqgmoJx1%2Ftileset_1_water1b.png?alt=media&#x26;token=45981a46-1c2c-49ac-94a9-c2dd6d69e10c" alt=""><figcaption><p>Working File for animated water.</p></figcaption></figure> <figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2FX8nRgBfdDoJYQpU5xUog%2Ftileset_1_water1c.png?alt=media&#x26;token=3615f559-27f5-47cd-9aab-eda28ed07f86" alt=""><figcaption></figcaption></figure></div>

<figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2F7OfnMEDdXVmTd7rodOga%2FSet%20to%20Animation.png?alt=media&#x26;token=be34930e-92cc-451c-a0f0-cf2ab7bffe94" alt=""><figcaption></figcaption></figure>

For making an ice path, these are the specifics:

<figure><img src="https://2410317992-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuIWMObJSZIkZU4o3Yuje%2Fuploads%2F7Bpbhy44NOHLn8WqkjKL%2FTilemap%20Heirarchy.png?alt=media&#x26;token=d845f2db-2e4e-41c2-89e5-32c23f921772" alt=""><figcaption></figcaption></figure>

Yes, I'll have to make the colliders for the water not blocking sections by hand, but at least the player will be able to walk onto the water paths and the rule tiles can be used.
