user avatar
Amit Patel
@redblobgames
I explain algorithms and math with interactive web pages (incl. pathfinding, hexagons, procgen maps, voronoi). Wrote Solar Realms Elite; helped w/@rotmg_news
Silicon Valley CA & Seattle WA
Joined January 2012
Posts
  • Pinned
    user avatar
    I've posted to Stack Overflow, Reddit, Twitter instead of Quora, Pinterest, Facebook, because my posts are readable by anyone, not only logged in users. As site rules change, it changes my motivation to post. Also: I blog at simblob.blogspot.com ; it has RSS too
  • user avatar
    00:00
  • user avatar
    New blog post: Using flow field pathfinding on a voronoi procedurally generated map to simulate 20,000 traders moving around redblobgames.com/blog/2025-05-0…
    00:00
  • user avatar
    00:00
  • user avatar
    #mapgen4 is finished! Paint your own mountains, oceans, and valleys. It will procedurally generate rivers and biomes based on wind, evaporation, and rainfall. Rendered in 3D to look like hand-painted 2D. redblobgames.com/maps/mapgen4/ #voronoi #procgen #maps #mapmaking #fantasymaps
  • user avatar
    Just for fun. The #mapgen4 code had much more potential than what the web page showed off, but a lot of it didn't fit the "interactively paint a map" goal for the web page.
    00:00
  • user avatar
    Albert Ford has written an interactive explanation of the recursive shadowcasting algorithm used in roguelike games. This is an algorithm I've been wanting to study for a while, but I never got around to it until this interactive article came along. albertford.com/shadowcasting/
  • user avatar
    One of my goals with #mapgen4 (2018) was to make the mountains look like I had drawn them by hand. It worked better than I imagined. Bonus: they're actually 3d shapes so they can be rotated. Sometimes I just stare at these procedurally generated mountains and smile 😄
    00:00
  • user avatar
    00:00
  • user avatar
    andersource.dev/2020/11/06/org… - how to make a Townscaper-style grid (@OskSta). Article from andersource.dev ; includes an interactive demo at the end.
  • user avatar
    There are *so many* interactive explorations of cool systems on complexity-explorables.org/explorables/ — from @DirkBrockmann
  • user avatar
    Little known trick: the <script> tag in html runs the code inside, and also hides it using css display:none. But I can change that to display:block, so that I can show sample code to the reader *and* also run it on the page to generate diagrams. (need to test across browsers)
  • user avatar
    Chris Cox sent me gitlab.com/chriscox/offgr… —a clever way to turn a square grid into an irregular rectangle grid. I didn't think this would be possible. Fun! Includes C++ code (MIT licensed). Might be useful for dungeon #procgen and other projects. redblobgames.com/x/2321-offgrid/
    00:00
  • user avatar
    I thought I knew how some code in my project should work; implemented an interactive diagram to find the constants. Implementing it showed me I didn't really know how it worked.😅 I've learned so much by making interactive versions of things over the years observablehq.com/@redblobgames/…
    00:00