Heya coders! I was wondering how I would go about replicating the world generation presented in this video:
I tried to look for a way to go about procedural generation in the game I'm making and found this method, but...
I've found no methods about doing this type of generation, so I decided to ask the GMS forums since no one I asked knew how to do it, here's a rundown of the process:
Even if you don't know how to help me it would still really help if you'd share this topic to someone who might know how to help me.
Thank you for your time!
Ian--
I've found no methods about doing this type of generation, so I decided to ask the GMS forums since no one I asked knew how to do it, here's a rundown of the process:
- It selects a random source image.
- It creates a 2d array and sets all the "cells" to -1.
- It then "scans" each cell and separates them by biome.
- It sets the values to the value of the biome inside the 2d array according to the color of the pixels.
- It creates random nodes on the array, expands them to two "unit sizes" and deletes them.
- It loops through each unit surrounding a biome, for example, a desert biome and checks for certain conditions which is: "It has one or more neighbor unit with the desert biome"
- Each one of these pixels meeting this condition has a 1 in 3 chance of becoming an actual unit.
- Repeat this process one more time.
- Then it checks if any cell has 8 neighbors in all directions(that is vertically and cardinally) and deletes them.
- That's the biome generation done.
- Seed;
- Type;
- Biome Type;
- Exits (whether it's connected to any other rooms);
- State (whether it has been discovered or not);
- Clear (if it has been cleared);
- And special attributes for rare events and stuff.
Even if you don't know how to help me it would still really help if you'd share this topic to someone who might know how to help me.
Thank you for your time!
Ian--