Red Blob Games
Amit Patel’s site of interactive tutorials on hex grids, A* pathfinding and procedural map generation. Engine-agnostic and widely used as the reference by game developers, with code samples in several languages including C#.
- Mapgen4: procedural map generator
Painted-mountain map generator with rainfall, rivers and erosion, plus a write-up of how it works.
redblobgames.com · Jul 2018 - Resource placement on a map
Placing trees, ore and other resources with blue noise and spacing rules instead of pure random.
redblobgames.com · Sep 2017 - Mapgen2: procedural island map generator
Voronoi-based island generator with elevation, rivers, moisture and biomes, plus source code.
redblobgames.com · Sep 2017 - Making maps with noise functions
Turn noise into islands, biomes and terrain, with octaves, redistribution and moisture explained.
redblobgames.com · Jul 2015 - Implementation of Hex Grids (with Unity/C# code)
Copy-ready hex grid code in C# and other languages, covering storage, maps and rendering.
redblobgames.com · May 2015 - Introduction to the A* Algorithm
Interactive walkthrough from breadth-first search to Dijkstra to A*, with heuristics explained.
redblobgames.com · May 2014 - Implementation of A*
Python, C++ and C# implementations of A* with priority queues and path reconstruction.
redblobgames.com · May 2014 - Breadth First Search: multiple start points
Distance maps from many seed points, useful for influence maps, spawn rules and AI queries.
redblobgames.com · Apr 2014 - Grid pathfinding optimizations
Faster pathfinding on grids: jump points, hierarchical maps and other speed-ups, with their trade-offs.
redblobgames.com · Mar 2014 - Flow Field Pathfinding for Tower Defense
One search from the goal gives every unit its direction, ideal for crowds and tower defence.
redblobgames.com · Feb 2014 - Hexagonal Grids: coordinates, neighbours, distances and conversions
The reference guide to hex grids: coordinate systems, neighbours, distance, rotation, rings and pixel conversion.
redblobgames.com · Mar 2013 - Grids and Graphs
How to model a game map as a graph, and when grids, meshes or waypoints suit pathfinding.
redblobgames.com · Feb 2013