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.
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
- Architecture - High-level system architecture and design patterns
- Data Model - Data structures, objects, and relationships
- Generation Process - How maps are generated step-by-step
Reference Documentation
- Modules Reference - Detailed documentation of all modules
- Features and UI - Complete feature list and UI capabilities
- Getting Started - Quick start guide for developers
Additional Resources
- GitHub Repository - Source code
- Discord Community - Join the community
- Reddit Community - Share your maps
- Trello Board - Development progress
- Patreon - Support the project
Quick Overview
How It Works
The generator creates maps through a multi-stage process:
- Grid Generation - Creates a Voronoi diagram from jittered points
- Terrain Creation - Generates heightmap using templates or images
- Climate Simulation - Calculates temperature and precipitation
- Water Features - Generates rivers and lakes based on elevation
- Biomes - Assigns vegetation types based on climate
- Civilization - Places cultures, states, and settlements
- Infrastructure - Creates roads and trade routes
- 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 datapack- 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:
- Read the Data Model documentation
- Review the Architecture guide
- Start with minor changes to familiarize yourself with the codebase
- Check existing issues and discussions
Getting Help
- Bug Reports - Use GitHub Issues or Discord #bugs channel
- Questions - Ask on Discord or Reddit
- Performance Issues - See Performance Tips
- Private Inquiries - Email: azgaar.fmg@yandex.by
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
This project was inspired by:
- Martin O'Leary's Generating fantasy maps
- Amit Patel's Polygonal Map Generation for Games
- Scott Turner's Here Dragons Abound