Interactive Visual Explanations of Math and Algorithms
Hi! I make interactive visual explanations of math and algorithms, using motivating examples from computer games.
Learn | Introduction to A* implementation guide | |
Also: | Dijkstra’s Algorithm, Breadth First Search | |
Tower Defense pathfinding | ||
Also: | Breadth First Search, Dijkstra Maps, Flow Field pathfinding | |
Hexagonal grid reference implementation guide | ||
Also: | non-orthogonal bases, relation to cubes | |
2D Visibility algorithm | ||
Also: | sweep algorithms | |
Intro to graph theory | ||
Also: | how to represent grids as graphs | |
Probability for RPG Damage | ||
Also: | probability distributions, nonparametric distributions | |
Line drawing | ||
Also: | linear interpolation (lerp), supercover | |
Curved roads | ||
Also: | Bezier curves, circular arcs, biarcs | |
Map generation from noise noise function concepts | ||
Also: | Simplex/Perlin Noise, signal processing | |
Polygonal Map Generation implementation guide | ||
[1] | Also: blue noise, Delaunay triangulation, Voronoi diagrams, water flow | |
Pathfinding with A* | ||
[2] | Grid parts: tiles, edges, vertices for squares, hexagons, and triangles | |
Grid edges | tiles for square grids | |
Pathfinding with circular obstacles | ||
[3] | Also: bitangents | |
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 make fun demos while learning new things and writing explanations:
Mapgen4 | map generator draw your own terrain | |
Procedural face generator (inspired by a Scott McCloud book) | ||
Mapgen2 | map generator | |
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) | ||
Noisy edges | using shaders | |
Car blind spots [8] | ||
Bacterial cell | animation | |
Conveyor belt editor (inspired by Factorio) | ||
Tiling a sphere with diagonal squares | ||
Tiling a sphere with hexagons | ||
Tiling a sphere with Voronoi | ||
Tiling a cube with squares | ||
Tiling a sphere with squares | ||
Organic cave maps | ||
Rounded cells | Chaikin Curves | |
Dyson hatching (inspired by a Watabou project) | ||
Triangle patterns | on a Delaunay mesh | |
Shape transitions (inspired by a Dave Bees Bombs project) | ||
Reaction-diffusion |
I also explore ideas sometimes without writing a full guide:
I’m working on a series of pages that explain how to make interactive guides:
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.
I’ve been helping people make games since 1990. I wrote games earlier in life, with Solar Realms Elite [26] being the most well known [27], then worked on an environmental simulation game called BlobCity, then took a break for over a decade. The recent rise of indie, mobile, tablet, social, and web games have made me interested in game development again. My current passion is using interactivity on the web for learning, especially computer science and math. I’ve started with game development because it’s a rich source of interesting problems that can be explained visually. With modern web browsers, we can use explanations that don’t follow the formats used in magazines, technical papers, and books. We can combine learning by reading, learning by watching, learning by doing [28].
I previously worked with Root-1 [29] on educational games, Wild Shadow Studios [30] on Realm of the Mad God, Peter Norvig on interactive diagrams for Artifical Intelligence: A Modern Approach [31], Nonagon Games on A Chronicle of Misdeeds [32]. I’m currently working with Jetbolt Games [33] on Galactic Assault Squad [34].
If you’re in the Silicon Valley area want to chat in person, email me at redblobgames@gmail.com. I’m especially interested in algorithms related to maps, procedural generation, pathfinding, but love to chat about anything.