# Help with Perlin Noise Procedural Generation

**URL:** <https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291>\
**Category:** Help\
**Created:** [November 7, 2025, 6:46pm UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291 "2025-11-07T18:46:56Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![MeatballDev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/meatballdev/32/28502_2.png) [@MeatballDev](https://forum.makecode.com/u/MeatballDev)\
**Post date:** [November 7, 2025, 6:46pm UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291/1 "2025-11-07T18:46:56Z")

</div>

So I have a Perlin Noise map but I want it to be able to convert to tilemap help

> **[Perlin Noise Terrain Gen](https://arcade.makecode.com/S51516-48541-40574-44914)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [November 8, 2025, 5:52pm UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291/2 "2025-11-08T17:52:45Z")

</div>

I’ve never used the perlin noise extension, but all of the “maps” are numbers, or in other words, arrays of arrays of numbers. Try to do some research and figure out how to turn those numbers into a tileMap

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [November 8, 2025, 5:58pm UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291/3 "2025-11-08T17:58:46Z")

</div>

Here is an example I made using my extension, `WoofWoofCodes/pxt-tilemapgen`

> **[Perlin Noise Terrain Gen](https://arcade.makecode.com/S72725-20840-27448-16975)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)\
**Post date:** [November 8, 2025, 6:09pm UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291/4 "2025-11-08T18:09:22Z")

</div>

[Here’s my fix!](https://arcade.makecode.com/S70423-71054-53431-74484) ✨  
I just looped over the 2D array and set each tile of the tilemap to the value in the array as a tile:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/a/3a8f64d12aa9ae150b4980329c78f35539c9f442.png)  
LMK if this works with your size of tilemap / any bugs come up!

---

<div class="post-metadata">

**Author:** ![MeatballDev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/meatballdev/32/28502_2.png) [@MeatballDev](https://forum.makecode.com/u/MeatballDev)\
**Post date:** [November 10, 2025, 6:23pm UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291/5 "2025-11-10T18:23:13Z")

</div>

[https://files.catbox.moe/jnzlq8.webm](https://files.catbox.moe/jnzlq8.webm)

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [November 11, 2025, 3:34am UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291/6 "2025-11-11T03:34:09Z")

</div>

I just guessed that the maximum number was 8 when I wrote the code. You’ll have to make a tile 9. Make sure to add it to the tilemap or it won’t end up in the list. Maybe make a tile 10 just in case? It might be super rare, but better to have it then to not have it.

 ![Screenshot 2025-11-10 at 3.27.48 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/5/35ae48c657c81a33699af1b59264902004974229.png)  
 ![Screenshot 2025-11-10 at 3.27.31 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/a/5a89ca5f701ec5d75187fe0a76f774e5e71baf08.png)

@YuHayate please create a new release of the noise extension to get rid of the code in main.ts. It’s correct on GitHub, but is still there when you import the extension.

---

<div class="post-metadata">

**Author:** ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)\
**Post date:** [November 11, 2025, 3:40am UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291/7 "2025-11-11T03:40:29Z")

</div>

Yeah, the background is sometimes set to that for me too! Any clue on what causes it?

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [November 11, 2025, 4:08am UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291/8 "2025-11-11T04:08:29Z")

</div>

It’s the noise generation extension. @YuHayate forgot to create a new release after removing that code from main.ts.

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [November 30, 2025, 10:04pm UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291/9 "2025-11-30T22:04:52Z")

</div>

uhhh  
woups

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [November 30, 2025, 10:05pm UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291/10 "2025-11-30T22:05:27Z")

</div>

um, so basicaly, youre trying to generate an image that is already complex to create, but also making it 13 larger then the screen, thats 3 062 500 pixels to generate perlin noise for, let alone, youre doing it 3 times, the reason why youre not getting an output is because its taking forever to generate the noise maps, ill see if i can optimize the program but for now i think a 200 by 200 noise map is big enough, and only has 76.5 times less pixels and is plenty of tiles large for any map, good luck

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [November 30, 2025, 10:05pm UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291/11 "2025-11-30T22:05:55Z")

</div>

The values in the arrays range from 0 to 1. After passing them through the **convert noise to image** function, the output produces numbers from 0 to 15. The reason you rarely see values above 8 or 9 is that the code was using a _product_ operation, which multiplies the corresponding values of the two arrays element-by-element. If you understand distribution curves, you’ll know that multiplying two numbers in the 0–1 range pushes most results toward the center of both ends, which explains why higher and lower values appear less frequently

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [November 30, 2025, 10:05pm UTC](https://forum.makecode.com/t/help-with-perlin-noise-procedural-generation/40291/12 "2025-11-30T22:05:59Z")

</div>

also, try playing with the values in the functions
