Improved Procedural Lavaland Generation
Posted: Sat May 18, 2019 12:05 am
This would be a more regulated procedural design method that lavaland could use, basically creating a macro-scale blueprint before that part where it lays down all the tunnels and lava. It would integrate the lavaland ruins into a more natural procedural environment, and create an interesting maze of lava rivers while ensuring you can always reach the far end of the map without crossing magma.
Start by chopping lavaland up (conceptually) into a 4x4 grid of 16 sectors, each approx. 64x64 tiles in size. Bottom left sector is still mining outpost, but necropolis/final boss zone is now the top right sector rather than taking up entire top edge of map. West and south edges of the base lavaland map remain a lava coastline of sorts.
STEP 1: Use a find-union process to link random sectors to random neighbors until the SW and NE corners are connected.
STEP 2: Choose one random possible path between SW and NE. All the links in chosen path are protected; the borders they cross will never have lava rivers placed along them. (This is to ensure there's always a route from the outpost to the necropolis that doesn't require crossing lava.)
STEP 3: Any unlinked borders are designated as lava (for now)
STEP 4: Populate each sector (except for the SW and NE ones) with a randomly chosen core. Cores are medium and large-sized lavaland ruins, possibly including new 'ruins' that are just interesting prebuilt cave formations. Allow each core to update the state of sector borders ("lava" to "linked" or vice versa) based on the core's preferences.
STEP 5: Now that final lava borders are determined, generate lava rivers along each one. To create a more natural-looking environment, start & end these lava rivers at intersect points that randomly deviate from the actual intersections of the sector grid.
STEP 6: For each side of a core that's flagged as "lava" AND has a matching lava border on that side of the sector, generate two more lava rivers from the corners of the sector to the relevant intersect point. Then take the resulting ring of lava rivers and fill the interior with lava as well, creating magma lakes.
[img]http://i.imgur.com/nmFeuoxl.jpg[/img]
STEP 7: Generate tunnels between the cores of any sector with a "linked" border.
STEP 8: Place the contents of the cores. Generate minerals, flora, mobs & some small lavaland ruins using the same procedural mechanisms currently in use.
Start by chopping lavaland up (conceptually) into a 4x4 grid of 16 sectors, each approx. 64x64 tiles in size. Bottom left sector is still mining outpost, but necropolis/final boss zone is now the top right sector rather than taking up entire top edge of map. West and south edges of the base lavaland map remain a lava coastline of sorts.
STEP 1: Use a find-union process to link random sectors to random neighbors until the SW and NE corners are connected.
Spoiler:
STEP 2: Choose one random possible path between SW and NE. All the links in chosen path are protected; the borders they cross will never have lava rivers placed along them. (This is to ensure there's always a route from the outpost to the necropolis that doesn't require crossing lava.)
Spoiler:
STEP 3: Any unlinked borders are designated as lava (for now)
STEP 4: Populate each sector (except for the SW and NE ones) with a randomly chosen core. Cores are medium and large-sized lavaland ruins, possibly including new 'ruins' that are just interesting prebuilt cave formations. Allow each core to update the state of sector borders ("lava" to "linked" or vice versa) based on the core's preferences.
Spoiler:
STEP 5: Now that final lava borders are determined, generate lava rivers along each one. To create a more natural-looking environment, start & end these lava rivers at intersect points that randomly deviate from the actual intersections of the sector grid.
Spoiler:
[img]http://i.imgur.com/nmFeuoxl.jpg[/img]
STEP 7: Generate tunnels between the cores of any sector with a "linked" border.
STEP 8: Place the contents of the cores. Generate minerals, flora, mobs & some small lavaland ruins using the same procedural mechanisms currently in use.