7.4 KiB
☕ TONIGHT'S TILED SESSION - QUICK START
Session Time: ~2 hours
Goal: Build 8×8 demo map ready for Phaser.js
Coffee: Recommended! ☕
⚡ SUPER QUICK CHECKLIST
🚀 STEP 1: OPEN TILED (2 min)
# Check if installed
which tiled
# If not installed:
brew install tiled
# Launch
tiled &
🗺️ STEP 2: CREATE MAP (5 min)
In Tiled:
File → New → New Map- Settings:
- Orientation:
Orthogonal - Tile layer format:
CSV - Map size:
8 × 8tiles - Tile size:
64 × 64pixels
- Orientation:
Save As...→/Users/davidkotnik/repos/novafarma/maps/demo_micro_farm.tmx
✅ You have: Empty 512×512px map
🎨 STEP 3: ADD TERRAIN TILESET (10 min)
Map → New Tileset...- Name:
terrain_demo - Type:
Collection of Images - Click
+to add tiles:- Browse to:
/Users/davidkotnik/repos/novafarma/assets/images/demo/terrain/ - Select:
grass_tile_styleA.pngdirt_tile_styleA.pngtilled_dry_styleA.pngtilled_watered_styleA.png
- Browse to:
- Save tileset:
/Users/davidkotnik/repos/novafarma/maps/tilesets/terrain_demo.tsx
✅ You have: Terrain tileset with 4 tiles
🌾 STEP 4: ADD CROPS TILESET (10 min)
Map → New Tileset...- Name:
crops_demo - Add tiles from:
/Users/davidkotnik/repos/novafarma/assets/images/demo/crops/wheat_stage0_styleA.pngthroughwheat_stage4_styleA.png
- Save:
/Users/davidkotnik/repos/novafarma/maps/tilesets/crops_demo.tsx
✅ You have: 5 wheat growth stages
🏕️ STEP 5: ADD OBJECTS TILESET (10 min)
Map → New Tileset...- Name:
objects_demo - Add from various folders:
buildings/tent_styleA.pngenvironment/campfire_styleA.pngenvironment/dead_tree_styleA.pngenvironment/rock_styleA.png
- Save:
/Users/davidkotnik/repos/novafarma/maps/tilesets/objects_demo.tsx
✅ You have: Buildings & decorations ready
📚 STEP 6: CREATE LAYERS (5 min)
In Layers panel (bottom-right), create these layers:
Right-click → Add Layer → choose type:
- "Collision" (Object Layer)
- "Spawns" (Object Layer)
- "Decorations" (Object Layer)
- "Buildings" (Object Layer)
- "Crops" (Tile Layer)
- "Tilled Soil" (Tile Layer)
- "Base Terrain" (Tile Layer) ← START HERE!
✅ You have: 7 organized layers
🌱 STEP 7: PAINT GRASS (10 min)
- Select layer:
Base Terrain(click on it in Layers panel) - Select tile: Click
grass_tile_styleAin Tilesets panel - Tool: Press
G(Bucket Fill) - Click map: Fill entire 8×8 with grass
Optional: Paint a few dirt_tile_styleA for variety
✅ You have: Green grassy world!
🟫 STEP 8: PAINT TILLED SOIL (10 min)
- Select layer:
Tilled Soil - Select tile:
tilled_dry_styleA - Tool: Press
B(Brush) - Paint 2×2 patch:
- Row 1, Columns 1-2
- Row 2, Columns 1-2
Coordinates in pixels: (64,64) to (192,192)
✅ You have: Farmable area!
⛺ STEP 9: PLACE TENT (10 min)
- Select layer:
Buildings(Object Layer!) - Tool: Press
T(Insert Tile) - Select tile: Click
tent_styleAin objects tileset - Click on map at position Column 6, Row 1
- Pixel position: (384, 64)
- Right-click tent → Object Properties:
- Name:
tent - Type:
building - Add custom property:
- Name:
collision - Type:
bool - Value:
true
- Name:
- Name:
✅ You have: Player's base tent!
🔥 STEP 10: PLACE DECORATIONS (15 min)
Select layer: Decorations
Place these (with Insert Tile tool, press T):
-
Campfire at (6,5) - pixel (384, 320)
- Type:
decoration
- Type:
-
Dead tree at (0,0) - pixel (0, 0)
- Type:
decoration
- Type:
-
Rock at (4,0) - pixel (256, 0)
- Type:
decoration
- Type:
✅ You have: Atmospheric details!
👤 STEP 11: ADD KAI SPAWN (10 min)
- Select layer:
Spawns - Tool: Press
R(Insert Rectangle) - Draw: 32×32 box at position (2, 5)
- Pixel: (128, 320) width=32, height=32
- Object Properties:
- Name:
kai_spawn - Type:
player - Add custom property:
- Name:
facing - Type:
string - Value:
south
- Name:
- Name:
✅ You have: Player spawn point!
🧟 STEP 12: ADD ZOMBIE SPAWN (10 min)
- Select layer:
Spawns - Tool: Press
R(Rectangle) - Draw: 32×32 box at (4, 4)
- Pixel: (256, 256)
- Properties:
- Name:
zombie_1 - Type:
npc_zombie - Custom:
- Name:
ai - Type:
string - Value:
idle_dig_loop
- Name:
- Name:
✅ You have: Zombie NPC spawn!
🚧 STEP 13: ADD COLLISION (15 min)
- Select layer:
Collision - Tool: Press
R(Rectangle) - Draw collision boxes around:
- Tent: 64×64 box at tent position (6,1)
- Tree: 48×64 box at tree position (0,0)
- Rock: 40×32 box at rock position (4,0)
- For each: Set Type =
collision
✅ You have: Collision system!
💾 STEP 14: SAVE & EXPORT (10 min)
-
Save map:
Ctrl+SorFile → Save -
Export JSON:
File → Export As...- Format:
JSON map files (*.json) - Save to:
/Users/davidkotnik/repos/novafarma/maps/demo_micro_farm.json
-
Verify:
ls -lh maps/demo_micro_farm.* # Should see both .tmx and .json
✅ YOU'RE DONE! 🎉
🎯 FINAL CHECKLIST
- Maps folder has
demo_micro_farm.tmx - Maps folder has
demo_micro_farm.json - Tilesets folder has 3 .tsx files
- Map has 7 layers
- Grass fills entire map
- 2×2 tilled soil at (1,1)
- Tent at (6,1)
- Decorations placed (campfire, tree, rock)
- Kai spawn at (2,5)
- Zombie spawn at (4,4)
- Collision boxes created
IF ALL CHECKED: Map ready for Phaser.js! 🚀
📸 WHAT IT SHOULD LOOK LIKE:
0 1 2 3 4 5 6 7
0 [🌳][🌱][🌱][🌱][🪨][🌱][🌱][🌱]
1 [🌱][🟫][🟫][🌱][🌱][🌱][⛺][🌱]
2 [🌱][🟫][🟫][🌱][🌱][🌱][🌱][🌱]
3 [🌱][🌱][🌱][🌱][🌱][🌱][🌱][🌱]
4 [🌱][🌱][🌱][🌱][🧟][🌱][🌱][🌱]
5 [🌱][🌱][👤][🌱][🌱][🌱][🔥][🌱]
6 [🌱][🌱][🌱][🌱][🌱][🌱][🌱][🌱]
7 [🌱][🌱][🌱][🌱][🌱][🌱][🌱][🌱]
⏱️ TIME BREAKDOWN
| Task | Time |
|---|---|
| Open Tiled | 2 min |
| Create map | 5 min |
| Add tilesets (3) | 30 min |
| Create layers | 5 min |
| Paint terrain | 10 min |
| Paint tilled soil | 10 min |
| Place buildings | 10 min |
| Place decorations | 15 min |
| Add spawns | 20 min |
| Add collision | 15 min |
| Save & export | 10 min |
| TOTAL | ~2 hours |
🆘 TROUBLESHOOTING
Can't find images?
- Make sure you browse to full path:
/Users/davidkotnik/repos/novafarma/assets/images/demo/...
Tiles not showing in tileset?
- Check if PNGs have transparency (they should!)
- Try re-adding the tile
Can't export JSON?
- Make sure
maps/folder exists - Try
File → Exportinstead ofExport As
Map looks wrong?
- Check layer order (Base Terrain at bottom!)
- Make sure correct layer is selected when painting
🚀 AFTER THIS SESSION:
Tomorrow you can:
- Open full implementation guide
- Start Phaser.js integration (Task 2)
- Load this map in game! (1 hour)
In 3 days:
- Full playable demo! 🎮
HAVE FUN BUILDING! ☕🗺️✨