Fantasy-Map-Generator/wiki/Home.md
Claude 779e3d03b3
Add comprehensive wiki documentation
Created extensive wiki documentation covering all aspects of the Fantasy Map Generator:

- Home.md: Wiki homepage with overview and navigation
- Getting-Started.md: Complete beginner's guide for users and developers
- Architecture.md: System architecture, design patterns, and technology stack
- Data-Model.md: Detailed data structures and relationships
- Generation-Process.md: Step-by-step map generation pipeline
- Modules-Reference.md: Documentation for all 20+ modules
- Features-and-UI.md: Complete feature list and UI guide
- README.md: Wiki directory overview

The documentation includes:
- High-level architecture and design patterns
- Detailed data structures with typed arrays
- 17-stage generation pipeline with algorithms
- All core modules (generators, renderers, UI, I/O)
- 41+ UI editors and features
- Code examples and usage patterns
- Developer setup and contribution guidelines
- User tutorials and quick start guides

This wiki provides comprehensive documentation for both users wanting to create maps and developers wanting to understand or contribute to the codebase.
2025-11-04 21:37:18 +00:00

4.9 KiB

Fantasy Map Generator Wiki

Welcome to the Fantasy Map Generator documentation! This wiki provides comprehensive information about how the generator works, its architecture, and how to use and contribute to the project.

What is Fantasy Map Generator?

Azgaar's Fantasy Map Generator is a free web application that helps fantasy writers, game masters, and cartographers create and edit fantasy maps. It uses procedural generation to create realistic-looking maps with terrain, water features, climates, civilizations, and much more.

Live Application: azgaar.github.io/Fantasy-Map-Generator

Key Features

  • Procedural Terrain Generation - Realistic heightmaps, mountains, hills, and valleys
  • Water Simulation - Rivers flow naturally based on elevation, lakes form in depressions
  • Climate System - Temperature and precipitation affect biome distribution
  • Civilization Generation - Cultures, states, religions, towns, and political boundaries
  • Extensive Customization - 41+ specialized editors for every aspect of the map
  • Export Options - Save/load maps, export to various formats
  • Procedural Naming - Realistic place names using Markov chains
  • Coat of Arms - Procedurally generated heraldry for states

Documentation Structure

This wiki is organized into the following sections:

Core Concepts

Reference Documentation

Additional Resources

Quick Overview

How It Works

The generator creates maps through a multi-stage process:

  1. Grid Generation - Creates a Voronoi diagram from jittered points
  2. Terrain Creation - Generates heightmap using templates or images
  3. Climate Simulation - Calculates temperature and precipitation
  4. Water Features - Generates rivers and lakes based on elevation
  5. Biomes - Assigns vegetation types based on climate
  6. Civilization - Places cultures, states, and settlements
  7. Infrastructure - Creates roads and trade routes
  8. Rendering - Draws all elements to an SVG canvas

Technology Stack

  • Pure JavaScript - No build system required
  • D3.js - Data visualization and SVG manipulation
  • Delaunator - Fast Delaunay triangulation
  • jQuery/jQuery UI - UI components and interactions
  • SVG - Vector graphics rendering
  • Typed Arrays - Efficient data storage

Data Model Overview

The generator maintains two main data structures:

  • grid - Initial Voronoi graph (~10,000 cells) with terrain and climate data
  • pack - Packed graph with civilizations, settlements, and derived features

All map data is stored in these objects, enabling save/load functionality and full editability.

Contributing

Pull requests are highly welcomed! Before contributing:

  1. Read the Data Model documentation
  2. Review the Architecture guide
  3. Start with minor changes to familiarize yourself with the codebase
  4. Check existing issues and discussions

Getting Help

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

This project was inspired by: