Table of Contents

Namespace StarterKit.MapModes

Classes

FarmDensityMapMode

STARTERKIT: Farm Density Map Mode

Demonstrates how to create a custom GAME-layer map mode that extends the ENGINE's GradientMapMode base class.

Shows farms built per province as a heatmap:

  • Cream/off-white = no farms (owned land)
  • Yellow/Orange = some farms
  • Dark orange = many farms (max density)

Architecture:

  • ENGINE provides mechanism (GradientMapMode, texture array)
  • GAME provides policy (farm data, gradient colors)
  • Mode switching is instant (just changes shader int)
TerrainCostMapMode

STARTERKIT: Terrain Movement Cost Map Mode

Visualizes terrain-based movement costs from terrain.json5. Demonstrates ENGINE-GAME separation for pathfinding costs.

Color scale:

  • Green = fast movement (cost 1.0, grasslands/plains)
  • Yellow = moderate (cost 1.1-1.3, desert/marsh/highlands)
  • Orange = slow (cost 1.4-1.5, hills/mountains/jungle)
  • Red = very slow (cost 1.6+, snow)
  • Blue = water (impassable for land units)

Architecture:

  • ENGINE provides TerrainData with MovementCost
  • GAME visualizes costs for player understanding