|
| 21 May 2015 01:39 PM |
Hi! I'm not too good with math, but how do I make a script that can generate random terrain? If you can it would be great with a variable I can change to change the size of all blocks. PS: The terrain has to be blocky, like minecraft. |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:40 PM |
http://wiki.roblox.com/index.php?title=Math.noise#math.noise
|
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:40 PM |
| How would I use it to make a terrain generator? |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 21 May 2015 01:40 PM |
Perlin Noise Simplex Noise Plasma maps (Diamond-square algorithm) |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:41 PM |
| I wouldn't rely on Roblox's noise function. I don't trust it. I would just make my own. |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:41 PM |
| Can someone give me an example? |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:42 PM |
| I once made a small sized minecraftlike mapgenerator, and believe me: don't do it. Roblox engine couldn't take the amount of parts and it wasn't even that big... |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:42 PM |
| You can find tons of examples and tutorials on Perlin and/or Simplex noise online - just search it. |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:43 PM |
| I just want a simple example. |
|
|
| Report Abuse |
|
|
Intern33t
|
  |
| Joined: 19 Nov 2010 |
| Total Posts: 1530 |
|
|
| 21 May 2015 01:43 PM |
uhm
function part(pos) local p = Instance.new("Part") p.Size = Vector3.new(4, 4, 4) p.Position = pos end
for i = 1, 10 do for j = 1, 10 do part(Vector3.new(i, HEREYOUPUTYOURNOISETHINGY, j) end end
~ᵂʰᵒ ᵃʳᵉ ʸᵒᵘ ᵗᵒᵈᵃʸ﹖~ |
|
|
| Report Abuse |
|
|
Intern33t
|
  |
| Joined: 19 Nov 2010 |
| Total Posts: 1530 |
|
|
| 21 May 2015 01:44 PM |
Though change the maxvalues of i and j to 40 and change step to 4.
~ᵂʰᵒ ᵃʳᵉ ʸᵒᵘ ᵗᵒᵈᵃʸ﹖~ |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:44 PM |
^ Would just create parts and position them a random place.. |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:45 PM |
| That is not random. He said "PUT NOISE HERE", so put your noise algorithm there. |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:45 PM |
@Jarold
Why wouldn't I trust that noise gen? |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:45 PM |
Oh, so how do I do this? A working Noise Algorithm? |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:46 PM |
"A working Noise Algorithm?" math.noise |
|
|
| Report Abuse |
|
|
Intern33t
|
  |
| Joined: 19 Nov 2010 |
| Total Posts: 1530 |
|
|
| 21 May 2015 01:46 PM |
My thing is not really random, it creates a 40x40 carpet of bricks (and if you put the correct noise function you would get somewhat of an example)
~ᵂʰᵒ ᵃʳᵉ ʸᵒᵘ ᵗᵒᵈᵃʸ﹖~ |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 21 May 2015 01:47 PM |
| I wouldn't trust it because I don't know how to set a generation seed |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:47 PM |
| @eLuna Generation seeds would be cool! |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:48 PM |
| That's why I am going to make a module for noise functions. |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:48 PM |
| ^ how about you just shift the coordinates? |
|
|
| Report Abuse |
|
|
|
| 21 May 2015 01:49 PM |
Can someone make this code work with the math.noise?
function Part(Pos) local P = Instance.new("Part") P.Size = Vector3.new(4, 4, 4) P.Position = Pos end
for i = 1, 40, 4 do for j = 1, 40, 4 do Part(Vector3.new(i, NoiseThing, j) end end |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 21 May 2015 01:49 PM |
| I guess I could probably get a generation seed by using z and a random number in a range given seed as the randomseed, but eh... |
|
|
| Report Abuse |
|
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 21 May 2015 01:50 PM |
| Vector3.new(i,math.noise(i,j),j)*4 |
|
|
| Report Abuse |
|
|