<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Amit's Site - Latest Comments in Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://blobs.disqus.com/</link><description>Amit's game programming and other pages</description><atom:link href="https://blobs.disqus.com/polygonal_map_generation/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sun, 22 Feb 2026 10:49:11 -0000</lastBuildDate><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-6841243507</link><description>&lt;p&gt;Thx&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Jesus</dc:creator><pubDate>Sun, 22 Feb 2026 10:49:11 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-6536507949</link><description>&lt;p&gt;Thanks! The initial version, mapgen1, is described on  &lt;a href="https://www.redblobgames.com/maps/terrain-from-noise/" rel="nofollow noopener" target="_blank" title="https://www.redblobgames.com/maps/terrain-from-noise/"&gt;https://www.redblobgames.co...&lt;/a&gt;  and took approximately one day to implement the map generator and one day to integrate it into the rest of the game. This page is for mapgen2, which took a bit longer. But how long, it depends on how you count.&lt;/p&gt;&lt;p&gt;First, we worked on the rest of the game features using a single map from mapgen1. Then we ran a public playtest ("early access") for many months and collected feedback from hundreds of players. That included things like where they went, whether they went where they wanted to go, how easy it was to find the things they were looking for, how they behaved in different parts of the map, etc. We used a single map instead of procedurally generating new maps during those six months because having feedback for a map that only gets used one wasn't as useful as getting lots of feedback for the same map.&lt;/p&gt;&lt;p&gt;We also made a list of what we wanted for the &lt;i&gt;game design&lt;/i&gt;. This included wanting players to start separate from each other, but join into larger and larger groups as they leveled up; wanting players to have a way to traverse the map at the same monster level and also to be able to advance when they leveled up; wanting a variety of monster types as they explored; and many other game design goals.&lt;/p&gt;&lt;p&gt;Putting together the list of player behavior on the initial map and our design goals for the game, I explored different map designs and settled on &lt;i&gt;islands&lt;/i&gt; with only one or two peaks. This might have taken a month; I am not sure. To make the variety of monsters, I decided to make a variety of biomes as you walked along "same level" paths. And also needed a way to make those paths. To make a way to level up, I decided to make river systems that started from a central point. I'm guessing this part took another month or so to develop the algorithms for mountains, biome variety, rivers, roads, etc.&lt;/p&gt;&lt;p&gt;We then put this into the early access playtest and iterated some more, maybe another month of iteration.&lt;/p&gt;&lt;p&gt;The biggest part of this was collecting the playtest data and our design goals. That made the map a &lt;i&gt;really&lt;/i&gt; good fit for that specific game. It wasn't a great fit for other games, and for other games I start again with mapgen1, write the game play, put it through playtests, and see what works well and what works badly with mapgen1. Then I can figure out how to change the mapgen1 algorithms into something that's good for that specific game.&lt;/p&gt;&lt;p&gt;Edit: from start to finish, probably 2 days for mapgen1 and 7 months to turn mapgen1 into mapgen2. But if I were doing it again, it could go faster, maybe 3 months of player feedback and 1 month to implement. I think of this page as a collection of &lt;i&gt;possible&lt;/i&gt; algorithms to add into mapgen1, and I pick and choose from not only these algorithms but also other algorithms when I'm making a new map generator.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">amitp</dc:creator><pubDate>Mon, 26 Aug 2024 20:12:53 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-6535937304</link><description>&lt;p&gt;I wanted to start doing something with procedural terrain generation and I think I found the exact article to help me to begin working! :) Absolutely amazing project. How long did all of this take to develop?&lt;/p&gt;&lt;p&gt;Edit: I just saw you mentioned your projects normally take ~1-3 months, so I assume this one took roughly the same amount of time.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel</dc:creator><pubDate>Mon, 26 Aug 2024 04:16:48 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-6265816511</link><description>&lt;p&gt;It seems to be broken. I will update the link to &lt;a href="https://github.com/stegu/perlin-noise/blob/master/simplexnoise.pdf" rel="nofollow noopener" target="_blank" title="https://github.com/stegu/perlin-noise/blob/master/simplexnoise.pdf"&gt;https://github.com/stegu/pe...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">amitp</dc:creator><pubDate>Mon, 28 Aug 2023 22:18:35 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-6265147849</link><description>&lt;p&gt;the pdf for simplex is not opening, anyone has it?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">IamTufa</dc:creator><pubDate>Mon, 28 Aug 2023 04:08:42 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-6191639815</link><description>&lt;p&gt;Hi IchabodRB, ahh, yes, I didn't talk about rendering in this article. Usually games have their own rendering, and that was true here as well. After we generated the maps, they got sent into the game which had its own renderer, not the one in the demo or screenshots.&lt;/p&gt;&lt;p&gt;In this case I rendered the Voronoi polygons by dividing them up into triangles. Each triangle was formed from the center of the polygon and two of its corners. I calculated the normal vector of that triangle (cross product of two of the sides) and used it for very simple lighting (dot product with the light vector). You can see the function here: &lt;a href="https://github.com/amitp/mapgen2/blob/master/mapgen2.as#L852" rel="nofollow noopener" target="_blank" title="https://github.com/amitp/mapgen2/blob/master/mapgen2.as#L852"&gt;https://github.com/amitp/ma...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">amitp</dc:creator><pubDate>Tue, 23 May 2023 13:00:38 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-6187406716</link><description>&lt;p&gt;Hello, Amit, thanks for your work, I really learned a lot from your articles and projects.&lt;/p&gt;&lt;p&gt;I was wondering if you could help me with somethink that appears in your images examples, but it's not described on the article. I wanted to add a bit of simple lightning to create some depth to the map image, like you do in your examples. Could you give me some pointers about how to do it? I'll greatly appreciate it, even if it's just some ideas about how to begin.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">IchabodRB</dc:creator><pubDate>Wed, 17 May 2023 16:51:01 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-6005402754</link><description>&lt;p&gt;The full generator was developed for a client (Wild Shadow Games / Realm of the Mad God), and includes elements specific to their game world. That included the specific monsters, buildings, and biomes they have in their game. The free version here is the parts of the generator that are generally useful for everyone. They graciously allowed me to share the non-game-specific parts of the map generator as open source.&lt;/p&gt;&lt;p&gt;Note that this was developed back in 2010 for a Flash game,  and browsers no longer support Flash, so you may not be able to run the original generator. I ported it to HTML5, which is available on &lt;a href="https://www.redblobgames.com/maps/mapgen2/" rel="nofollow noopener" target="_blank" title="https://www.redblobgames.com/maps/mapgen2/"&gt;https://www.redblobgames.co...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">amitp</dc:creator><pubDate>Thu, 06 Oct 2022 14:57:55 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-6005358252</link><description>&lt;p&gt;when will this be a fully working generator?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Joe Biden</dc:creator><pubDate>Thu, 06 Oct 2022 14:10:36 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-5869354703</link><description>&lt;p&gt;In this project (from 2010) I assigned them water/land *first*, before calculating elevation. You can use noise if you want but you can use sine waves or use any shape you want. When using noise, I used it only to see &amp;gt;0 vs &amp;lt;0, and then threw away the rest, so I'm not using it for elevation.&lt;/p&gt;&lt;p&gt;First it's water/land for voronoi corners, and then second use that to assign water/land for the voronoi polygons.&lt;/p&gt;&lt;p&gt;The elevation comes afterwards. But for this project I did *not* use perlin noise for elevations. I think if you do that, you might get some inconsistencies, as you point out.&lt;/p&gt;&lt;p&gt;I think there are different sets of rules for how  you can set coast, as long as they keep the map consistent. In other projects I've used different rules. So feel free to pick something that works for you! :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">amitp</dc:creator><pubDate>Thu, 26 May 2022 20:29:00 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-5868726904</link><description>&lt;p&gt;Hello again, smol question, you said:&lt;/p&gt;&lt;p&gt;Assign water/land to the corners by setting Corner.water based on the IslandFunction.&lt;/p&gt;&lt;p&gt;These are vornoi corners correct? Going by the article for how to code vornoi, these haven't been assigend an elevation yet. I just plugged those points into the same perlin algorithm to generate elevations for those too, is this correct?&lt;/p&gt;&lt;p&gt;"Assign water/land to the polygons by setting Center.water if some fraction of the corners have water set"&lt;/p&gt;&lt;p&gt;So this would mean areas above sea-level can be set as water, which confuses me due to:&lt;/p&gt;&lt;p&gt;"Set Center.ocean for any polygon connected to the borders of the map through water polygons. If Center.water is set but .ocean is not, then it’s a lake."&lt;/p&gt;&lt;p&gt;So edge land is a water polygon and is thus an ocean, therefore:&lt;/p&gt;&lt;p&gt;"Set Center.coast if the polygon is land but has an ocean border."&lt;/p&gt;&lt;p&gt;Would this mean water-land isn't a coast since its set as ocean by my understanding, thus it's adjacent land is coast? And is this intentional?&lt;/p&gt;&lt;p&gt;My original thinking was water-land would be the coast but after running my algorithm based on these rules I found water-land being oceans, and after reading the rules I feel this is implied but i don't see why.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sami Rahim</dc:creator><pubDate>Thu, 26 May 2022 09:12:55 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-5078651186</link><description>&lt;p&gt;The way the elevation is constructed, there are no "local minima" which means if you follow the slope downwards you will always reach the ocean. The rivers follow the slope, even if there is a lake in the middle, so they will always reach the ocean.&lt;/p&gt;&lt;p&gt;Real landscapes do have local minima, and you can have "endorheic lakes" where rivers flow in but no rivers flow out, but this was a game, and I simplified the landscape to eliminate this tricky situation.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">amitp</dc:creator><pubDate>Sun, 20 Sep 2020 18:55:11 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-5078357316</link><description>&lt;p&gt;Something I can't seem to figure out is how rivers do not get terminate in lakes?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">vijet1</dc:creator><pubDate>Sun, 20 Sep 2020 14:25:04 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-4525372007</link><description>&lt;p&gt;I'm new to PCG techniques and being confused finding paths to go, big thanks for your detailed tutorial post.!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ZacharyJude</dc:creator><pubDate>Wed, 03 Jul 2019 05:21:14 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-3892691848</link><description>&lt;p&gt;(1) It was the easiest thing to implement, and (2) for the game we were working on, we wanted a larger beach to serve as a "beginner" area where new players would learn how to fight monsters. This is not necessarily what you would want in other projects.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">amitp</dc:creator><pubDate>Wed, 09 May 2018 09:28:35 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-3890681142</link><description>&lt;p&gt;Why did you decide to make beach biomes take an entire polygon rather than just the edge between land and sea?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">VarangianBard</dc:creator><pubDate>Tue, 08 May 2018 01:33:01 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-3867770541</link><description>&lt;p&gt;Sorry for the (very) late reply! Thanks a lot, very interesting stuff!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Beriol</dc:creator><pubDate>Mon, 23 Apr 2018 05:19:07 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-3850252786</link><description>&lt;p&gt;I've mostly made "volcanic island" style maps where the mountains are in the middle. The height is based on the distance to the coastline (not perlin noise). Continents usually form very differently, with continental mountain ranges often as lines along plate boundaries. You might take a look at &lt;a href="https://www.reddit.com/r/proceduralgeneration/comments/85o9zt/video_guide_to_plate_tectonics/" rel="nofollow noopener" target="_blank" title="https://www.reddit.com/r/proceduralgeneration/comments/85o9zt/video_guide_to_plate_tectonics/"&gt;https://www.reddit.com/r/pr...&lt;/a&gt; and &lt;a href="https://github.com/davidson16807/tectonics.js/tree/master/research" rel="nofollow noopener" target="_blank" title="https://github.com/davidson16807/tectonics.js/tree/master/research"&gt;https://github.com/davidson...&lt;/a&gt; . I want to try this someday but just haven't had a chance.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">amitp</dc:creator><pubDate>Wed, 11 Apr 2018 12:34:27 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-3844902208</link><description>&lt;p&gt;First of all, huge thanks for all your blog posts! Really, they're a HUGE help. Now to my actual question: I wanted to use these techniques for generating a 3D continent, but I'm unsure how to derive a "nice" height for the voronoi polygon, without ending up with (for example) boring perlin noise based hills and mountains (or something like that).&lt;/p&gt;&lt;p&gt;I've stumbled on this blog (&lt;a href="http://procworld.blogspot.it/2016/05/terrain-synthesis.html)" rel="nofollow noopener" target="_blank" title="http://procworld.blogspot.it/2016/05/terrain-synthesis.html)"&gt;http://procworld.blogspot.i...&lt;/a&gt; from the creator of VoxelFarm, in which he talks about a system which is very similar to your own work, meaning that he starts from a voronoi based shape and creates the map, which he then converts somehow to a continent (a big one! 1 pixel is equal to 2km for him), with even a cool neural network based generation of the elevation based on images.&lt;/p&gt;&lt;p&gt;I was wondering how could I make something like this in general. Do you have any tips or any links you could point me to? I wasn't able to find anything that might help me!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Beriol</dc:creator><pubDate>Sun, 08 Apr 2018 12:09:15 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-3830571697</link><description>&lt;p&gt;This is really awesome! Looking for ways to use things like this for board game design :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Endymian</dc:creator><pubDate>Thu, 29 Mar 2018 17:31:33 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-3671844674</link><description>&lt;p&gt;The dot selection algorithm is separate from the map generation, so if  you plug in your own dot selection algorithm (see generateRandom in &lt;a href="http://Map.as" rel="nofollow noopener" target="_blank" title="Map.as"&gt;Map.as&lt;/a&gt; for the function you'd need to replace) you can arrange them any way you want. But it also sounds like you're not trying to generate maps, in which case most of this project isn't going to be useful to you, and you probably could use a delaunay or voronoi library directly without map generation.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">amitp</dc:creator><pubDate>Wed, 20 Dec 2017 18:50:05 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-3671386542</link><description>&lt;p&gt;I wanted to use this for destruction; is there anyway that I could make it so the dots clump closer to the point of impact on that item?&lt;br&gt;edit: please note that these objects would probably be hollow&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Link773</dc:creator><pubDate>Wed, 20 Dec 2017 14:08:16 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-3605236880</link><description>&lt;p&gt;There are also several C# versions in the Source Code section of the page: &lt;a href="http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#source" rel="nofollow noopener" target="_blank" title="http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#source"&gt;http://www-cs-students.stan...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">amitp</dc:creator><pubDate>Tue, 07 Nov 2017 16:44:41 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-3604863915</link><description>&lt;p&gt;Care to share your C# port of this?  I'm porting the JS from &lt;a href="http://mewo2.com/notes/terrain/" rel="nofollow noopener" target="_blank" title="http://mewo2.com/notes/terrain/"&gt;http://mewo2.com/notes/terr...&lt;/a&gt; now, but it's largely based on this one...Plus this is more of what I'm looking for.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Spot</dc:creator><pubDate>Tue, 07 Nov 2017 12:59:20 -0000</pubDate></item><item><title>Re: Polygonal Map Generation for Gamesfrom Red Blob Games</title><link>http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/#comment-3591823254</link><description>&lt;p&gt;Sure, see the first paragraph — this project was for a tile-based game. You can rasterize polygons into tile maps. :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">amitp</dc:creator><pubDate>Mon, 30 Oct 2017 12:20:57 -0000</pubDate></item></channel></rss>