# Terrain generation

**URL:** <https://forum.makecode.com/t/terrain-generation/4194>\
**Category:** Show & Tell\
**Created:** [October 31, 2020, 1:41am UTC](https://forum.makecode.com/t/terrain-generation/4194 "2020-10-31T01:41:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![charliegregg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/charliegregg/32/2411_2.png) [@charliegregg](https://forum.makecode.com/u/charliegregg)\
**Post date:** [October 31, 2020, 1:41am UTC](https://forum.makecode.com/t/terrain-generation/4194/1 "2020-10-31T01:41:20Z")

</div>

> **[perlin](https://arcade.makecode.com/35175-52617-65067-37348)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Simple perlin noise used for terrain generation (See code for customisation)

Anyone got any ideas for perlin noise games/projects?

EDIT:

Perlin noise is a type of random number generation that smoothly transitions between -1 and 1. Given some number of coordinates (In this case 2) It will generate a random number. Here you can see this added to itself with bigger and bigger coordinates and smaller and smaller amplifiers creating this nice terrain look. I have marked the highest point in red.

Perlin noise also can take a seed for the hash function, here using a seed and varying it by 1 trillionth we can produce some fluid motions which almost look like continental plates moving!

Overall It’s pretty epic and simple (may hash function is so bad if someone could improve it that would be appreciated.)

EDIT2:

Why in the GIF is the red dot not always red???

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [October 31, 2020, 2:56am UTC](https://forum.makecode.com/t/terrain-generation/4194/2 "2020-10-31T02:56:54Z")

</div>

A Terreria-style game!

---

<div class="post-metadata">

**Author:** ![charliegregg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/charliegregg/32/2411_2.png) [@charliegregg](https://forum.makecode.com/u/charliegregg)\
**Post date:** [October 31, 2020, 2:58am UTC](https://forum.makecode.com/t/terrain-generation/4194/3 "2020-10-31T02:58:10Z")

</div>

I have made one here [https://makecode.com/\_14sYFWFjsbqj](https://makecode.com/_14sYFWFjsbqj)

if thats the right link

---

<div class="post-metadata">

**Author:** ![charliegregg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/charliegregg/32/2411_2.png) [@charliegregg](https://forum.makecode.com/u/charliegregg)\
**Post date:** [October 31, 2020, 3:02am UTC](https://forum.makecode.com/t/terrain-generation/4194/4 "2020-10-31T03:02:49Z")

</div>

Also heres another one that uses ALOT of noise

> **[Factory TD Game](https://arcade.makecode.com/48279-06048-62977-83301)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

(Extremely buggy)
