Red Blob Games

redblobgames.com · Personal blog · on HN since 2012

Amit Patel's site of interactive visual explanations of algorithms and math for game development, such as pathfinding, hex grids and noise.

What HN saysHN commenters praise it as some of the best explanations of pathfinding and noise, and call the hex grid guide a favorite and a model for interactive writing.
199HN people shared it
120linked it in comments
139stories submitted
5.4Kstory points
2 months agolast shared
2012people per year2026

Most-shared posts

  1. 1
    Hexagonal grids for games
    58 people · 2.1K points · first shared 2013 · 74 comments on HN
  2. 2
  3. 3
    Introduction to A*
    34 people · 1.2K points · first shared 2014 · 103 comments on HN
  4. 4
    Field of View with Interactive Real-time Examples (2012)
    13 people · 19 points · first shared 2012 · 1 comments on HN
  5. 5
    Making maps with noise functions (2022)
    9 people · 87 points · first shared 2015 · 5 comments on HN
  6. 6
    Pathfinding for Tower Defense
    5 people · 357 points · first shared 2014 · 63 comments on HN
  7. 7
    Making Of: Line Drawing Tutorial (2017)
    5 people · 47 points · first shared 2017 · 1 comments on HN
  8. 8
    Improving Heuristics
    5 people · 2 points · first shared 2024 · discussion on HN
  9. 9
    Curved Paths
    4 people · 8 points · first shared 2013 · 1 comments on HN
  10. 10
    Alternatives to Voronoi diagrams
    4 people · 4 points · first shared 2017 · discussion on HN
  11. 11
    Grid Parts and Relationships
    4 people · 3 points · first shared 2022 · discussion on HN
  12. 12
    Implementation of Hex Grids
    3 people · 174 points · first shared 2015 · 15 comments on HN
  13. 13
    Wraparound tile maps with sphere topology
    3 people · 91 points · first shared 2016 · 28 comments on HN
  14. 14
    Labels on Maps
    3 people · 5 points · first shared 2024 · discussion on HN
  15. 15
    Implementation of A* in python, C++ and C#
    3 people · 3 points · first shared 2022 · discussion on HN

What HN people wrote when they linked it

nylonstrung · 2026-08-17
Amit Patel's website is so good, some of the best explanations of concepts like pathfinding, perlin noise etc https://www.redblobgames.com/
cckolon · 2024-04-15
Outside the "basics", I've seen Newton's method come up again and again in my work. I also work on some map software and geometry (especially trig) has been really useful. For resources, I love this blog https://www.redblobgames.com/
darzu · 2022-10-19
For those looking for more interactive content like this, albeit with more of a game dev focus, I highly recommend https://www.redblobgames.com One of my favorite articles is this one on hex grids: https://www.redblobgames.com/grids/hexagons/ it blew my mind the first time I noticed that all the interactions and code change when you toggle between "flat topped" and "pointy topped".
mattdesl · 2021-06-17
It was coded with JavaScript + ThreeJS and built on top of a custom entity component system. Lots of different parts to the game, each receiving different treatments; eg the terrain is built from a mix of voronoi cells, layered simplex noise, and poisson disc sampling. I found Amit Patel’s blog to be a great resource for this: https://www.redblobgames.com/
maggit · 2018-02-02
Thank you, that's a nice compliment :) My inspiration for the format is Red Blob Games (https://www.redblobgames.com/), truly a marvel of interactive writing. (https://www.redblobgames.com/grids/hexagons/ is my all-time favorite)
supersonix · 2017-11-30
https://www.redblobgames.com/ has a great A* intro with visualizations and code. I highly recommend it.
Sharlin · 2017-06-09
Amit's pages in general [0][1] are an absolutely amazing and invaluable source of high-quality game programming information. [0] http://www.redblobgames.com/ [1] http://www-cs-students.stanford.edu/~amitp/gameprog.html
pixelHD · 2016-08-10
He's done great projects. http://www.redblobgames.com - he writes here too.
AceJohnny2 · 2015-08-20
Amit's articles are an awesome gamedev resource that get reposted from time to time (with good reason). Bookmark is recommended, the canonical link is: http://www.redblobgames.com/ Example of other topics of interest there: Hex Grid implementations, Why piecewise circles are better than bezier curves in generating curved roads, and a 2D visibility algorithm.
enjalot · 2014-07-29
the other visualizations on setosa.io are pretty great. There really aren't enough of these around if you ask me. another set of good tutorials that are at this level is Red Blob Games: http://www.redblobgames.com/ focused on games but introduces math/coding concepts very intuitively and in a practical manner.
nrjames · 2018-01-17
IMO, to start with AI, it's best to start as simple as possible so that you understand the algorithms that drive things that are accessible to tweak. If you are a gamer, think about the various AI routines that control pathfinding, resource collection, and strategy for computer players in strategy games. Some of the concepts of BFS and DFS build into Minimax strategies and other types of "simple" approaches to searching decision spaces/states for optimal approaches to problem solving. This gets into the development of heuristics for approximating outcomes. All of this is fantastic baseline for understanding more complex AI and machine learning algorithms. While it's easy to jump into ML or AI at a higher level, without the baseline understanding of the search algorithms and probability landscapes that are underpinnings to advanced work in these fields, you'll probably never feel like you understand what is going on. You can find some fun tutorials here: https://www.redblobgames.com The CS 188 "Intro to AI" class at Berkeley is excellent: http://ai.berkeley.edu/home.html It used to be on edx.org but I think a lawsuit about accessibility required them to remove it? Perhaps you can find it in the edX archives. Edit: looks like you can find the lecture videos and other resources on the Berkeley site: http://ai.berkeley.edu/lecture_videos.html
eru · 2026-08-20
Thanks for putting in the effort. You might also https://www.redblobgames.com/ and learn a lot from how they do their presentations.
Fraterkes · 2026-01-09
Hey, you've probably seen these already, but Redblobgames has a great series of posts about creating good labels for maps: https://www.redblobgames.com/blog/2024-08-20-labels-on-maps/ https://www.redblobgames.com/blog/2024-10-09-sdf-curved-text/ (There's a few others too)
Barrin92 · 2025-06-18
I remember one of the Advent of Code challenges had a hex grid puzzle on it, and Red Blob Games hex grid guide was so good the site got hugged to death because of it for a while. Used that later when I built a civ clone too, it's a fantastic resource. https://www.redblobgames.com/grids/hexagons/
h1fra · 2025-02-28
This blog is a gold mine. I have had this article (and others) in my bookmarks for 10years maybe: https://www.redblobgames.com/grids/hexagons/#map-storage https://www.redblobgames.com
pkstn · 2024-08-31
Planning to write blog post(s) about how i made the game, but basically the techniques i used are the following: - 2D ray tracing visibility algorithm (spolight): https://www.redblobgames.com/articles/visibility/ - Simplex noise procedural maps: https://www.redblobgames.com/maps/terrain-from-noise/ - WebGL2 rendering - Websockets with binary data - Deno - Hetzner dedicated servers - Docker Swarm Mode
zelphirkalt · 2024-08-26
I think the follow up games to HOMAM3 suffered a lot from focus on graphics and looks, opposed to investing more time into gameplay, map design, and computer opponents. They lost a lot of charm. Skeptical, whether yet another 3D graphics title will reach the heights of HOMAM3. Just too much effort spent on unimportant stuff. Maybe hire some good 2D artists. Big pet peeve also: A Heroes game without a hex grid battle field just feels wrong. Square logic is easier, but come on, get good developers and look at something like https://www.redblobgames.com/grids/hexagons/ and figure out the logic. It is not magic.
kevindamm · 2024-04-28
Ah, redblobgames! I remember their hexagonal coordinate system post from many years ago: https://www.redblobgames.com/grids/hexagons/ An excellent example of their more interactive posts and great for those interested in hex-grid rendering and navigating. edit: wow, over 10 years ago and the content has been updated but the look and feel is much as I remember it. This was before reactive systems took over the web, too, so the 'toggle selection here, see updates everywhere' was quite notable for the time. On the actual topic of the post.. I think flow fields easily get overshadowed by waypoints and other hierarchical approaches. Or, folded into the heuristic function for A*.
rented_mule · 2024-04-06
Someone I know has done some work to parameterize facial expressions: https://www.redblobgames.com/x/1845-face-generator/ He has a bunch of other interesting things like this, too: https://www.redblobgames.com/
mysterydip · 2024-01-01
Any time A* comes up, someone plugs this great resource: https://www.redblobgames.com/pathfinding/a-star/introduction.html
thomascgalvin · 2023-10-20
I smile a little bit every time someone links to Red Blob. This is just a wonderful, fascinating resource, the kind of thing the Internet was supposed to be for. I also love that this isn't just theory; there's an entire implementation guide[1] to all of the concepts discussed here. [1] https://www.redblobgames.com/grids/hexagons/implementation.html
dang · 2023-09-29
I've changed to that page from https://www.redblobgames.com/. Thanks! Obviously, many comments on the thread predate this change, but there's enough context here for readers to figure that out, and hopefully we can get a more specific discussion going.
amitp · 2023-09-29
This year I've mostly been updating existing pages in small ways (examples: [1] [2]). This week I've been fixing broken links, which isn't a good HN submission. I think the best candidate is https://www.redblobgames.com/making-of/draggable/ . It's from earlier this year and hasn't been posted to HN yet (I think). [1] https://simblob.blogspot.com/2023/04/explaining-hexagon-layout-class.h… [2] https://simblob.blogspot.com/2023/04/improving-mapgen4s-boundaries-par…
motbus3 · 2023-06-29
I know no magazines. But there is https://www.redblobgames.com/
panzagl · 2022-10-19
See the hex grid reference stuff here: https://www.redblobgames.com/ for basically everything you ever wanted to know about hex grids.
loupol · 2022-07-10
Cool article. An excellent resource for grids of all kinds is Red Blob Games' site. It's mentioned in the article, but only with a link leading to a somewhat empty page and not this very useful one : https://www.redblobgames.com/grids/parts/
spacetraveler11 · 2022-06-02
XBattle looks so cool, amazing that this game was made 30 years ago. Kind of similar to a game I had been working on (and might just get out of the dustbin to reactivate). Anyone looking to get started with hexagonal grids should check out [1] from Red Blob Games. Comprehensive tutorial on hex grids explaining coordinates, fields of vision, pathfinding and more. [1] https://www.redblobgames.com/grids/hexagons/
msmenardi · 2022-06-02
I also love hexes. Have you seen this guy's blog before? It's a treasure: https://www.redblobgames.com/grids/hexagons/
skeoh · 2022-01-27
Linked in the Further Reading section is the Red Blob Games article on Hexagonal Grids which is a fantastic resource and is definitely worth a read. https://www.redblobgames.com/grids/hexagons/

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close