Skip to content

LeoMarques101/ProceduralCaveGeneration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Procedural Cave Generation

Open Tibia Procedural Cave Generation (Cellular Automata)

Exemple

This project is based on Sebastian Lague´s procedural cave generation tutorial.

To made this work:

  1. Put the 2 scripts files on the script folder
  2. Chose some place on your map to use for the map generation.
Exemple

from: (x=1500,y=300,z=7) to (x=1620,y=420,z=7)

Exemple

  1. Create the space where the player will appear
Exemple

from: (x=1555,y=355,z=7) to (x=1565,y=365,z=7)

Exemple

  1. Configure the levers aid (2301, 2302, 2303, 2304, 2305)
Exemple

from: (x=1555,y=355,z=7) to (x=1565,y=365,z=7)

Exemple

  1. Configure the script
Exemple
local MAPS = {
    [1] = {
        startX = 1500, startY = 300, startZ = 7,
        width = 120, height = 120,
        randonFillPercent = 50,
        roomTheresholdSize = 50,
        wallTheresholdSize = 100,
        playerSpawn ={x=55, y=55, size=10}, --start point x=1555, y=355
        map = {},
        remover_primeira_camada = true,
        style = Styles["Earth"]
    },
    [2] = {
        startX = 1500, startY = 300, startZ = 7,
        width = 120, height = 120,
        randonFillPercent = 52,
        roomTheresholdSize = 50,
        wallTheresholdSize = 100,
        playerSpawn ={x=55, y=55, size=10},
        map = {},
        remover_primeira_camada = true,
        style = Styles["Earth (stone border)"]
    },
    [3] = {
        startX = 1500, startY = 300, startZ = 7,
        width = 120, height = 120,
        randonFillPercent = 55,
        roomTheresholdSize = 20,
        wallTheresholdSize = 50,
        playerSpawn ={x=55, y=55, size=10},
        map = {},
        remover_primeira_camada = true,
        style = Styles["Rock Mountain"]
    },
    [4] = {
        startX = 1500, startY = 300, startZ = 7,
        width = 120, height = 120,
        randonFillPercent = 51,
        roomTheresholdSize = 20,
        wallTheresholdSize = 50,
        playerSpawn ={x=55, y=55, size=10},
        map = {},

        remover_primeira_camada = true,
        style = Styles["Earth Mountain"]
    },
    [5] = {
        startX = 1500, startY = 300, startZ = 7,
        width = 120, height = 120,
        randonFillPercent = 52,
        roomTheresholdSize = 50,
        wallTheresholdSize = 100,
        playerSpawn ={x=55, y=55, size=10},
        map = {},
        remover_primeira_camada = true,
        style = Styles["Darkest Mud (lava)"]
    },
}

Todo List:

  • Monster spawn script
  • Beautify the cave floor (diferent tiles, itens and etc..)
  • Improve the randomness of tiles

Improvements:

  • Possibility of multiple floors
  • More complex generations (islands and etc.)

Credtis:

About

Open Tibia Procedural Cave Generation (Cellular Automata)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages