generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Terrain random generator script.

Previous Thread :: Next Thread 
56awesome56 is not online. 56awesome56
Joined: 01 May 2012
Total Posts: 261
27 Dec 2013 10:06 AM
In case anyone wants it:
loop = true
ids = {0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}
while loop == true do wait(.0001) for i = 1, 1000 do workspace.Terrain:SetCell(math.random(-50, 50), math.random(0, 40), math.random(-50, 50), ids[math.random(1, #ids)], "Solid", "X") end
if workspace.Terrain:CountCells() > 50000 then break end
end
Report Abuse
Fluffmiceter is not online. Fluffmiceter
Joined: 28 Jan 2012
Total Posts: 6931
27 Dec 2013 10:28 AM
Nobody *wants* this script. Instead, let's discuss about it..
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
27 Dec 2013 10:29 AM
Meh I don't like Roblox's terrain very much. Which is a pity because I would prefer the terrain to normal blocks for my project, but it doesn't look very nice, and the stuff you can do with it is very limiting when it comes to detail.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
27 Dec 2013 10:30 AM
That is ugly code.

Plus, it isn't *random*, it's pseudo random.

If you want proper terrain, you're better off looking for a perlin/simplex noise implementation.
Report Abuse
Fluffmiceter is not online. Fluffmiceter
Joined: 28 Jan 2012
Total Posts: 6931
27 Dec 2013 10:32 AM
Or you can stick to a simple and repeating pattern.
Report Abuse
56awesome56 is not online. 56awesome56
Joined: 01 May 2012
Total Posts: 261
27 Dec 2013 10:33 AM
I don't care if it is "ugly" it works, and I wanted to just make random terrain blocks around the map. This wasn't to simulate the built in plugin. And, the "math.random" works fine. And by the way, the id table is to make it so there is more empty space.
Report Abuse
56awesome56 is not online. 56awesome56
Joined: 01 May 2012
Total Posts: 261
27 Dec 2013 10:34 AM
The environment is not supposed to be realistic. By the way, I just learned how to use terrain 5 minutes before I posted this, so I don't know all the fancy methods you use.
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
27 Dec 2013 10:37 AM
What's the point in the loop variable?
This code looks like it would just create some random mess of blocks, with no actual ground terrain. In some cases it would probably look like a cube with random holes in it.
Report Abuse
VisualCSharp is not online. VisualCSharp
Joined: 23 Nov 2012
Total Posts: 225
27 Dec 2013 11:20 AM
What is this:

loop = true
while loop == true do

use while true do please
Report Abuse
Fluffmiceter is not online. Fluffmiceter
Joined: 28 Jan 2012
Total Posts: 6931
27 Dec 2013 11:25 AM
^ while wait() do

better
Report Abuse
CoolioTree is not online. CoolioTree
Joined: 26 Dec 2012
Total Posts: 2509
27 Dec 2013 11:26 AM
ugh inefficient code...

im dying...
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
27 Dec 2013 11:33 AM
@Fluff

The loop eventually breaks when the terrain's CountCells returns 50001. I think while true do is better. 100x40x100 is 40000, which leaves 10000 unchanged cells.
Report Abuse
TheNickmaster21 is not online. TheNickmaster21
Joined: 04 Oct 2008
Total Posts: 9490
27 Dec 2013 11:45 AM
This is better:

http://www.roblox.com/Basic-Hills-Terrain-Generation-place?id=12401166

However, it doesn't use Roblox terrain...
Report Abuse
CoolioTree is not online. CoolioTree
Joined: 26 Dec 2012
Total Posts: 2509
27 Dec 2013 11:47 AM
@thenickmaster

I love waves. Nice.
Report Abuse
56awesome56 is not online. 56awesome56
Joined: 01 May 2012
Total Posts: 261
27 Dec 2013 12:12 PM
@Visual
I originally had incorperated the loop part to break the loop but I realized I could use "break" and was too lazy to remove it.
Report Abuse
PhokiusV3 is not online. PhokiusV3
Joined: 07 May 2013
Total Posts: 805
27 Dec 2013 06:38 PM
Look in my Models section for a Map Generator I made for inspiration.
Report Abuse
amazingmoney5 is not online. amazingmoney5
Joined: 26 Apr 2011
Total Posts: 1082
27 Dec 2013 06:56 PM
"100x40x100 is 40000,"
no it's not
100 * 40 = 4000
4000 * 100 = 400000
Report Abuse
Decompiler is not online. Decompiler
Joined: 30 Aug 2012
Total Posts: 1453
27 Dec 2013 06:57 PM
My mistake. Don't ever put me in charge of a life-threatening situation involving multiplying numbers.
Report Abuse
amazingmoney5 is not online. amazingmoney5
Joined: 26 Apr 2011
Total Posts: 1082
27 Dec 2013 07:11 PM
ya
i dont like multiplying either
its (mostly) easy but i always lose track of the numbers (in my head that is, which i assume you did)
Report Abuse
TheNickmaster21 is not online. TheNickmaster21
Joined: 04 Oct 2008
Total Posts: 9490
27 Dec 2013 07:55 PM
@Coolio


Hmmm? The generation makes a tons of spheres and then adds them all together and normalizes the height.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image