How do you make Veins Of Ore with Arrays?

Get help using Construct 2

Post » Sat Nov 09, 2013 10:31 pm

Whatsup everyone

i was wondering how to make viens or pockets of ore for my sandbox game all while keeping my generation random.
I figured out how to make a complete random world through the use of arrays but i would like ti implement some type of ores or something for the player to dig for.
Is it possible to do? and if so how complicated would it be?
my game is a sidescroller if that helps.Thank you guysRookieDev2013-11-09 22:59:21
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sat Nov 09, 2013 11:05 pm

Ore Veins Here's a small thingy I've been working on with world generation + ores. Right now there's a whole bunch of other stuff in there, if you need me to strip it apart I can do so. The ore generation takes place on the event sheet "World Gen" from events 3-19EncryptedCow2013-11-09 23:05:56
B
46
S
14
G
7
Posts: 603
Reputation: 8,106

Post » Sat Nov 09, 2013 11:36 pm

@EncryptedCow awesome stuff man! i will check this out right now,I have learned quite a bit from you and a bunch of other developers that lurk these forums,Thank you EncryptedCow
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sun Nov 10, 2013 1:11 am

@EncryptedCow

what is clamp doing in this exspession?
clamp(dirtpatchx + choose(-floor(random(5)), floor(random(5))), 0, arr_mapdata.Width - 1)

im not sure what the uses are for clamp,this is the first or second time i seen it used.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sun Nov 10, 2013 6:04 am

Clamp will prevent the value from going below the lower bound (second parameter, 0) or above the upper bound (third parameter, arr_mapdata.Width - 1). I just do that to prevent it from trying to place any ores outside of the array. EncryptedCow2013-11-10 06:06:52
B
46
S
14
G
7
Posts: 603
Reputation: 8,106

Post » Sun Nov 10, 2013 9:37 pm

@EncryptedCow

Can you please disect this code. Not only for him but for me aswell.
I dont understand alot of what you have in there.
Im basically looking for this also.
B
9
S
5
Posts: 126
Reputation: 1,295

Post » Sun Nov 10, 2013 9:48 pm

@TheNewGuy sure thing, give me maybe 10-30 minutes and I'll have it up
B
46
S
14
G
7
Posts: 603
Reputation: 8,106

Post » Sun Nov 10, 2013 10:14 pm

Cool beans!

Thank you friend, there are close to no tutorials showing you how to do things like this.
I seen your youtube videos before @EncryptedCow you should keep making them!
Alot of people on youtube are not very good with construct.
thank you for making this availibleto the public.
B
9
S
5
Posts: 126
Reputation: 1,295

Post » Sun Nov 10, 2013 10:52 pm

@TheNewGuy Stripped down and commented, enjoy EncryptedCow2013-11-10 22:53:20
B
46
S
14
G
7
Posts: 603
Reputation: 8,106

Post » Mon Nov 11, 2013 11:50 am

@EncryptedCow

This is amazing! i didnt know you stripped it down to the bare minimum.
This is pretty epic and runs very smooth.
You should Try making some Minecraft or Terraria style water to go along with this.
There is very few Tutorials on that.
Im actually looking up cellular automata at the moment and i have to say its pretty impressive.
Awesome work!!
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Next

Return to How do I....?

Who is online

Users browsing this forum: Shenkai the ssj and 26 guests