> Hi PixelRebirth Sorry for asking this after so much time but, I've saw your example about how to use it in a platform game like terraria and I didn't understand (I'm new to this concept)
>
> noisejs.simplex2(loopindex("x"), loopindex("y")) < 0.25
> While 0.25? What does this expression means?That this noise value will take place in that specific x and y coordinates?
>
> while temp = -1?
>
> etc
>
> Basically i didn't understand any of the values you put, what impact it does at the map generation and the conditions to destroy the blocks.
>
> Thanks!
>
Well, i don't think he wants non-math geniuses to use this. He also did some things like 50+50 rather than just typing 100. Seems like he is trying to trip up non-math people.
This is a really common thing people do on StackOverflow.com to make so people dont just copy and paste code.
You can do the same thing to any expression, Eg: X=100-100+50-50+90-90. You can do this rather than say just say X=0.
If you look at the original example, you can see that the second number of 50 is being multiplied with a noise expression. So simply putting 100 there doesn't do the same at all. I did it to get the complete range of 0-100% opacity, since the plugin returns values from -1 to 1.
Certainly not trying to trip anyone up, I'm not "math people" either. <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">
— I probably should have put more comments in the second example. It was really just a quick and dirty one. I simply decided on a range that won't be drawing any tiles. That's the < -0.25 part. It's all pretty abitrary, therefore feel free to play around with the values to see how it affects things.
PixelRebirth Great plugin!
added 3 blocks and a water effect:
http://voxi3d.comule.com/simlexgenerate/
Just hit space to re-generate.
That was just 10 minutes of work, I cant wait until I have an entire afternoon to make a full fledged generator.
Excellent plugin! Very fast!
Thanks and nice work! This noise stuff sure is fun to play around with. The real credit belongs to the creators of the library though! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">