A system that generates random, unique terrain based on specific rules. Each type of tile has a set of other tiles that can't spawn near it. Using this information, tiles check others nearby to see what they can't be (and therefore, how many they can be). Then, tiles with the least options pick a random type they can be and become that. These options are weighted, so for example water is more likely to spawn than sand or dirt. Because some tiles can't generate next to other tiles, sometimes it becomes impossible for a tile to be occupied. This doesn't happen often, but the good news is it doesn't really cause any problems. Instructions on how to make your own tiles are on a comment (looks like a sticky note) at the top. Tiles like Mushrooms, Trees, or Palm Trees which can only spawn near a small number of other tiles means that oftentimes large areas will spawn with a specific theme. Just like real life!
Inspired by Icoso's video "I Generated Infinite Worlds (for silly little guys)" on YouTube, which used a similar system. My very best projects - https://scratch.mit.edu/studios/51632474/