# π§ Tiled Terrain Quick Reference
## Corner-Based Terrain Notation
Tiled uporablja **4-corner system** za definiranje terrain transitions.
### Format Notation
```
terrain="TopLeft,TopRight,BottomLeft,BottomRight"
```
Vsaka pozicija ima Ε‘tevilko terrajna (0, 1, 2...) ali je prazna (,) Δe ni terrain.
---
## π Visual Guide - 3x3 Terrain Pattern
```
βββββββββββ¬ββββββββββ¬ββββββββββ
β TL β T β TR β
β ,,,0 β ,,0,0 β ,,0, β
βββββββββββΌββββββββββΌββββββββββ€
β L β CENTER β R β
β ,0,,0 β 0,0,0,0 β 0,,,0 β
βββββββββββΌββββββββββΌββββββββββ€
β BL β B β BR β
β ,0,, β 0,0,, β 0,,, β
βββββββββββ΄ββββββββββ΄ββββββββββ
Legend:
TL = Top-Left T = Top TR = Top-Right
L = Left C = Center R = Right
BL = Bottom-Left B = Bottom BR = Bottom-Right
```
---
## π¨ Examples: Terrain ID "0"
| Tile Type | Terrain Value | Visual | Description |
|-----------|---------------|--------|-------------|
| **Top-Left Corner** | `,,,0` | `β£` | Only bottom-right corner belongs to terrain |
| **Top Edge** | `,,0,0` | `β` | Bottom two corners belong to terrain |
| **Top-Right Corner** | `,,0,` | `β’` | Only bottom-left corner belongs to terrain |
| **Left Edge** | `,0,,0` | `β` | Right two corners belong to terrain |
| **Center (FILL)** | `0,0,0,0` | `β` | All four corners belong to terrain |
| **Right Edge** | `0,,,0` | `β` | Left two corners belong to terrain |
| **Bottom-Left Corner** | `,0,,` | `β€` | Only top-right corner belongs to terrain |
| **Bottom Edge** | `0,0,,` | `β` | Top two corners belong to terrain |
| **Bottom-Right Corner** | `0,,,` | `β₯` | Only top-left corner belongs to terrain |
---
## π Inner Corners (Advanced)
Za kompleksne oblike potrebujeΕ‘ "inner corners":
| Tile Type | Terrain Value | Visual | Description |
|-----------|---------------|--------|-------------|
| **Inner Top-Left** | `0,,0,0` | Konkaven kot | Missing top-right corner |
| **Inner Top-Right** | `0,0,0,` | Konkaven kot | Missing bottom-right corner |
| **Inner Bottom-Left** | `,0,0,0` | Konkaven kot | Missing top-left corner |
| **Inner Bottom-Right** | `0,0,,0` | Konkaven kot | Missing bottom-left corner |
---
## π Multi-Terrain Example
### Grass (0) in Dirt (1)
```xml
```
---
## π― Pro Tips
1. **Empty = Non-terrain**: Prazno (,) pomeni "ta kot ni del terrajna"
2. **Terrain 0 = First**: Prvi terrain je vedno ID 0, drugi je 1, itd.
3. **Symmetry**: Pazi na simetrijo - `,,0,0` (top edge) NI enako kot `0,0,,` (bottom edge)
4. **Testing**: Uporabi Fill Tool v Tiled-u za test terrain transitions
---
## π§ Wang Sets (Alternative)
Za **connected structures** (ograje, cevi):
```xml
```
**Wang ID Format** (Edge-based):
```
wangid="Top,Top,Right,Right,Bottom,Bottom,Left,Left"
```
Vsaka pozicija: `0` = no edge, `1` = edge exists
---
## π Learning Path
1. β
ZaΔni s preprostimi 3x3 terrain patterns
2. β
Preizkusi Terrain Brush v Tiled-u
3. β
Dodaj inner corners za kompleksne oblike
4. β
Eksperimentiraj z multi-terrain transitions
5. β
Preidi na Wang Sets za connected structures
---
**Happy Terrain Painting!** π¨