I made a script that does what the 3d voxel script did, but without any blocks!
What this means:
- Less lag
- Bigger terrain (There still is a limit)
- More variety
Don't worry about the "choppy-ness" of the terrain. That just happens when the camera is far away. The terrain is actually smooth.
How did you do this in game? I thought terrain can only be generated in game
In your script you requested performance tips; here's a more efficient version:
local ms = 1500 -- Map size (limit before timeout is around 3000) local amp = 200 -- How high/low the terrain goes (this affects biomes) local scale = 150 -- How big the biomes are (the higher the bigger) local blockScale = 4 -- How blocky the terrain looks local waterLevel = -1 -- self explanatory local terrainThickness = 2 -- was 30 local waterThickness = 2 -- was 80 local seed = math.random(-10000, 10000) print(seed) local done = Instance.new("BoolValue") done.Name = "TerrainDone" done.Value = false done.Parent = workspace local v3 = Vector3.new local cf = CFrame.new local terrain = workspace.Terrain local size = v3(blockScale, terrainThickness, blockScale) local pauseEvery = 0.1 -- pause every this many seconds local nextPause = tick() + pauseEvery local stepped = game:GetService("RunService").Stepped local begin = tick() for x = -ms/2, ms/2 do if tick() >= nextPause then stepped:Wait() nextPause = tick() + pauseEvery end local px = blockScale * x for z = -ms/2, ms/2 do local pz = blockScale * z local height = (math.noise(x/scale, z/scale, seed) * amp) + waterLevel if height <= waterLevel then terrain:FillBlock(cf(v3(px, waterLevel - waterThickness/2, pz)), v3(size.X, waterThickness, size.Z), Enum.Material.Water) else local material = -- I encourage playing with the values after the "+" height < waterLevel + 4 and Enum.Material.Sand or height < waterLevel + 80 and Enum.Material.Grass or Enum.Material.Snow terrain:FillBlock(cf(v3(px, height, pz)), size, material) end end end print("Done in", math.floor((tick() - begin)*100)/100,"sec") done.Value = true
Looks like your connection to Scripting Helpers was lost, please wait while we try to reconnect.