# Minecraft-esque 2d terrain gen test

**URL:** <https://forum.makecode.com/t/minecraft-esque-2d-terrain-gen-test/9519>\
**Category:** Help\
**Tags:** game\
**Created:** [August 3, 2021, 11:34pm UTC](https://forum.makecode.com/t/minecraft-esque-2d-terrain-gen-test/9519 "2021-08-03T23:34:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![omnisImperium](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/omnisimperium/32/2728_2.png) [@omnisImperium](https://forum.makecode.com/u/omnisImperium)\
**Post date:** [August 3, 2021, 11:34pm UTC](https://forum.makecode.com/t/minecraft-esque-2d-terrain-gen-test/9519/1 "2021-08-03T23:34:14Z")

</div>

Ello!

The following is a simple and stupid little program I’ve made that can make 1,162,261,467 different terrain / map things.

Link: [https://makecode.com/\_g50f499WXFqE](https://makecode.com/_g50f499WXFqE)

Any feedback and suggestions are appreciated.

P.S.: How do I fill in the blank space underneath the land with the brown dirt tile? Thanks.

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [August 4, 2021, 4:32pm UTC](https://forum.makecode.com/t/minecraft-esque-2d-terrain-gen-test/9519/2 "2021-08-04T16:32:55Z")

</div>

Cool project!

This project might help with the dirt:

> **[otherworldly](https://arcade.makecode.com/26191-92939-31671-36343)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Specifically this bit of code:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/a819f1ff23fb3d8daf351fc90473bdf37aa75471.png)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)\
**Post date:** [August 4, 2021, 5:54pm UTC](https://forum.makecode.com/t/minecraft-esque-2d-terrain-gen-test/9519/3 "2021-08-04T17:54:16Z")

</div>

Heyo! Nice idea you got there. So… I did what you asked for, but i also optimized your code a lot since there was a lot easier way of doing what you did. So here is the link and a screenshot of the code, now you can easily change the width or height of the tilemap and it will not break - it will acually fill the whole thing. Instead of using a sprite like you did, I opted for using a variable to signify the row and change that to create the tiles. And for how i did the thing where it fills the dirt below, I just loop through the grass tiles, and see how much space is left below. Then I just fill it all with dirt and voilla: terrain.  
If you have any questions or need further help just ask!

**Here is the link:** [https://arcade.makecode.com/57948-49763-62313-26000](https://arcade.makecode.com/57948-49763-62313-26000)

And here is how I did it:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/3/38b0224d45f314172a47a39a0278ce9d7fd16938.png)

---

<div class="post-metadata">

**Author:** ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)\
**Post date:** [August 4, 2021, 9:55pm UTC](https://forum.makecode.com/t/minecraft-esque-2d-terrain-gen-test/9519/4 "2021-08-04T21:55:25Z")

</div>

Here, I tidied up a little and made a player you can control so you can look around. Also made it so that all of the blocks are now walls and made the tilemap wider and taller

> **[Random Terrain #3](https://arcade.makecode.com/00739-00223-75676-86616)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Kiwiphoenix364](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kiwiphoenix364/32/14368_2.png) [@Kiwiphoenix364](https://forum.makecode.com/u/Kiwiphoenix364)\
**Post date:** [August 4, 2021, 11:24pm UTC](https://forum.makecode.com/t/minecraft-esque-2d-terrain-gen-test/9519/5 "2021-08-04T23:24:18Z")

</div>

Here’s my old [program](https://forum.makecode.com/t/ive-made-a-randomized-terrain-generator-similar-to-minecrafts/9289) (it takes like 3 mins to load lol)

---

<div class="post-metadata">

**Author:** ![DA\_PRO\_PLAYZ](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/da_pro_playz/32/19214_2.png) [@DA\_PRO\_PLAYZ](https://forum.makecode.com/u/DA_PRO_PLAYZ)\
**Post date:** [May 24, 2024, 4:12pm UTC](https://forum.makecode.com/t/minecraft-esque-2d-terrain-gen-test/9519/6 "2024-05-24T16:12:23Z")

</div>

cool!
