SIMPLE_MAPMAKER_GUIDE.md 2.8 KB

Simple MapMaker2 Setup Guide

This is a clean, simplified version of MapMaker2 without exploration/expansion systems. Just basic map generation with team placement on towns/villages.

Quick Setup

1. Replace Current MapMaker2

  • Disable or remove the complex MapMaker2 component
  • Add SimpleMapMaker2 component to your map GameObject

2. Setup SimpleTravelUI

  • Create a GameObject with SimpleTravelUI component
  • Assign a UIDocument component to it
  • The UI will be created programmatically (no UXML needed)

3. Setup Click Handling

  • Add SimpleMapClickHandler component to a GameObject
  • Assign references:
    • mapMaker: Your SimpleMapMaker2 component
    • travelUI: Your SimpleTravelUI component
    • mapCamera: Your map camera (or leave null for Camera.main)

4. Team Marker

  • Create a simple GameObject for the team marker (sphere, cube, etc.)
  • Name it "TeamMarker"
  • Or assign a prefab to SimpleMapMaker2.teamMarkerPrefab

How It Works

Map Generation

  • Creates a 100x100 map by default
  • Simple terrain: Grassland, Forest, Hills, Mountains
  • Basic road network (cross pattern)
  • Several towns and villages placed strategically

Team Placement

  • Team marker automatically placed on first town/village found
  • Use context menu "Move Team to Random Town" to relocate

Travel System

  • Click on any town or village to show travel UI
  • Simple travel interface shows destination and distance
  • Click "Travel" to instantly move team marker
  • No complex routing - just direct movement

Context Menu Options

SimpleMapMaker2

  • "Generate New Map": Creates new map with random seed
  • "Move Team to Random Town": Moves team to different settlement

SimpleMapClickHandler

  • "Test Click at Center": Test click functionality at map center

SimpleTravelUI

  • "Test Travel UI": Show travel UI with test data

Benefits of This Simple Version

No Coordinate Conversion Issues - Direct 1:1 map to world coordinates ✅ No Complex Exploration System - Just basic map and travel ✅ No Click-Through Problems - Simple UI without background blockers ✅ Easy to Understand - Clear, straightforward code ✅ Quick Setup - Minimal configuration required ✅ Reliable - No complex systems to break

Map Layout

The default map includes:

  • Towns at corners: (25,25), (75,25), (25,75), (75,75)
  • Center town at (50,50)
  • Villages at (30,60), (70,40)
  • Cross-shaped road network
  • Random terrain distribution

Customization

Map Size

Change mapSize in SimpleMapMaker2 (default: 100)

Settlements

Modify settlementPositions array in AddSettlements() method

Terrain

Adjust noise parameters in CreateBasicMapData() method

Team Marker

Assign custom prefab to teamMarkerPrefab field

This simple system provides a solid foundation that you can build upon incrementally.