So i am remaking minecraft, how could i make this generate more natural terrain, instead of just a superflat world?
Also, how can i make it generate in chunks, such as when the player nears a certain chunk that has yet to exist, it generates?
i want to know how to make this work.
heres my code:
local Times = 50
local BeginPos = Vector3.new(0, 0, 0)
local OffsetPos = 4
BeginPos = Vector3.new(BeginPos.X - ((Times / 2) * 4), 0, BeginPos.X - ((Times / 2) * 4))
for i = 1, Times do
BeginPos = BeginPos + Vector3.new(0, 0, OffsetPos)
for i = 1, Times do
local Block = game.ServerStorage.Blocks.Bedrock:Clone()
Block.Parent = workspace
Block.Position = BeginPos + Vector3.new(i * OffsetPos, 0, 0)
end
end
for i = 1, 3 do
local BeginPos = Vector3.new(0, 0, 0)
BeginPos = Vector3.new(BeginPos.X - ((Times / 2) * 4), i * 4, BeginPos.X - ((Times / 2) * 4))
for i = 1, Times do
BeginPos = BeginPos + Vector3.new(0, 0, OffsetPos)
for i = 1, Times do
local Block = game.ServerStorage.Blocks["Grass Block"]:Clone()
Block.Parent = workspace
Block.Position = BeginPos + Vector3.new(i * OffsetPos, 0, 0)
end
end
end