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: Mine random generation?

Previous Thread :: Next Thread 
Smeers is online. Smeers
Joined: 14 Feb 2013
Total Posts: 797
24 Dec 2015 11:52 AM
I'm pretty new to any type of generation, so I'd like to start simple.

In this case, a mine.

I have a decent knowing of scripting, I am no master, but I don't know really how to make a randomly generated mine like seen in games like Epic Mining 2. I could easily handle the actual mining part, like mining the object or ore, but I can't randomly generate the parts.

I've tried to get help before but all I was told was 'use math.seed' so I was very confused and such...

Any help would be appreciated.
(even a freemodel that I can analyze, learn, and take apart.)
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
24 Dec 2015 11:54 AM
Well, if it confused you, you need to take a few steps back before you even think about scripting that. Take a look at this. http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting
Report Abuse
Daftcube is not online. Daftcube
Joined: 10 Jan 2010
Total Posts: 275
24 Dec 2015 11:59 AM
What you want to do is Procedural Generation.

I've done quite a bit of this. If you want to private message me about this, I'd be happy to help.
Report Abuse
Smeers is online. Smeers
Joined: 14 Feb 2013
Total Posts: 797
24 Dec 2015 12:00 PM
I was only confused because the only thing the person said was 'use math.seed', that was legitimately the only thing he replied with. I asked for further help and never got a reply back.

What would I even do with math.seed? That's all I was told.
Report Abuse
KapKing47 is not online. KapKing47
Joined: 09 Sep 2012
Total Posts: 5522
24 Dec 2015 12:11 PM
local materials = {}
local list = {
Iron = 75;
Gold = 5;
Silver = 20;
}
for i, v in next, list do
for j = 1, v do
materials[#materials + 1] = i
end
end

for x = 0, XLimit do
for y = 0, YLimit do
for z = 0, ZLimit do
--Create block that represents material
--In whatever way u want, just use materials[math.random(#materials)] to choose a random material, the chances that are set will work
end
end
end

"My Life is going Good... but..."
Report Abuse
Daftcube is not online. Daftcube
Joined: 10 Jan 2010
Total Posts: 275
24 Dec 2015 12:23 PM
About Math.Seed...

This is going to sound very backwards, but the random numbers from random number generation are not truly random! If you continue to pull numbers from math.random, you with eventually get similar and/or repeating numbers. This is because computers are too logical to make truly random numbers.

The random numbers are generated using an algorithm with an input parameter, 'seed.' The seed is a number used to scramble and generate random numbers. That means, a seed of 1 will give a certain order of random numbers while a seed of 2 will give a different order.

Hope I was of use.
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