How do you make Veins Of Ore with Arrays?

0 favourites
  • 10 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • 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 guys

  • 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-19

  • 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

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • TheNewGuy sure thing, give me maybe 10-30 minutes and I'll have it up

  • 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.

  • TheNewGuy Stripped down and commented, enjoy <img src="smileys/smiley4.gif" border="0" align="middle">

  • 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!!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)