Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Guide · OtherFree

Red Blob Games

Interactive, visual explanations of the maths and algorithms behind games by Amit Patel: A* pathfinding, hexagonal grids, map generation from noise, visibility and more. You can drag things around and watch the algorithm respond, which makes hard ideas click. Free, with no signup and no ads.

Format

Guide

Topic

Other

Provider

Amit Patel

Level

Intermediate

Access

Free

What it is

Red Blob Games is Amit Patel's site of interactive tutorials on game-related algorithms and maths. He has been helping people make games since 1990, according to the site, and every article is free with no signup and no ads. The accompanying code is open source under permissive licences.

Well-known articles include:

  • Introduction to A*: breadth-first search, Dijkstra's algorithm and A*, with diagrams you can change.
  • Hexagonal Grids: the standard reference for hex coordinates, distances, lines and rotation.
  • Making maps with noise: procedural terrain from noise functions.
  • 2D visibility: line of sight and lighting in 2D.
  • Pages on grids, graphs, Voronoi diagrams and Delaunay triangulation.

Is it worth it?

Yes, when your game needs one of these topics. The interactive diagrams are the fastest way to understand pathfinding or hex grids properly rather than copying code you do not understand. The A* and hex grid pages are recommended in game development communities year after year.

When to use it in the roadmap

In the maths and feel stage, and whenever you build enemies that need to find a path, a strategy game on a hex map, or procedural levels. Engines include navigation systems for 3D, but knowing how pathfinding works helps you debug them and write your own for grid-based games.

Time and prerequisites

Each article is an hour or two of reading and experimenting. Basic programming and school-level maths are enough.

Free vs paid

Free.

Common questions

Are there code samples? Yes, most articles include implementation notes, and code in several languages is linked.

Is it only for 2D? Mostly 2D and grid based, which is where the ideas are clearest; the same algorithms apply in 3D.

A good way to study an article

Read the article once while playing with every diagram. Then close it and write the algorithm in your own engine for a tiny test scene, such as a grid of walls and a character that walks to where you click. Come back to the article only when you are stuck. This turns an enjoyable read into a skill you can use in a jam or explain in a studio technical round.

algorithmscomputer sciencefree course

Ready to start?

Opens on Amit Patel in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "Red Blob Games". Only Tauseef reads this.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.