Minecraft-esque 2d terrain gen test


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

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.

1 Like

Cool project!

This project might help with the dirt:

Specifically this bit of code:

Hope this helps!

1 Like

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

And here is how I did it:

1 Like

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

1 Like

Here’s my old program (it takes like 3 mins to load lol)

1 Like