# Red Blob Games

from Amit Patel

Hi! I make interactive visual explanations of math and algorithms, using motivating examples from computer games.

### Learn

Introduction to A* and implementation guideAlso: Dijkstra’s Algorithm, Breadth First Search
Tower Defense pathfindingAlso: Breadth First Search, Dijkstra Maps, Flow Field pathfinding
Hexagonal grid reference and implementation guideAlso: non-orthogonal bases, relation to cubes
2D Visibility algorithmAlso: sweep algorithms
Intro to graph theoryAlso: how to represent grids as graphs
Probability for RPG DamageAlso: probability distributions, nonparametric distributions
Line drawingAlso: linear interpolation (lerp), supercover
Curved roadsAlso: Bezier curves, circular arcs, biarcs
Map generation from noise and noise function conceptsAlso: Simplex/Perlin Noise, signal processing
Polygonal Map Generation[1]Also: blue noise, Delaunay triangulation, Voronoi diagrams, water flow
Grid parts: tiles, edges, vertices for squares, hexagons, and triangles
Grid edges and tiles for square grids
Guide to Delaunator[4], a Delaunay+Voronoi library Also: mesh data structures, half-edges
Noisy edges out of straight lines Also: area-constrained noisy paths
Filled circles on a grid
All pairs shortest paths for map analysis
[5]

I’ve been curating game development articles since 1990[6], and my web site has been up since 1995. All of my articles are available for free, with no signup and no ads. The main audience is independent, student, and hobbyist software developers. I started experimenting with interactive explanations in 2004, but didn’t figure out until 2007   the style of interactive explanation I use now[7].

### Play

I make fun demos while learning new things and writing explanations:

Mapgen4 map generator lets you draw your own terrain
Procedural face generator (inspired by a Scott McCloud book)
Ellipse from lines (inspired by a 3blue1brown video)
Modulo multiplication (inspired by a Mathologer video)
Orbits of planets (inspired by a John Carlos Baez blog post)
Bacterial cell animation
Conveyor belt editor (inspired by Factorio)
Rounded cells and Chaikin Curves
Dyson hatching (inspired by a Watabou project)
Triangle patterns on a Delaunay mesh
Shape transitions (inspired by a Dave Bees Bombs project)

### Ponder

I also explore ideas sometimes without writing a full tutorial:

### Meta

I’m working on a series of pages that explain how to make interactive tutorials:

Accompanying code is open source, under either the MIT License[21] or the Apache v2 License[22]. Both allow use in commercial projects. Other projects are found at at github/amitp[23] and github/redblobgames[24]. My project ideas board[25] is public.