Hmmm...
I am still not very happy with the seeding. I generally end up with 5-6 similar shapes with minor differing details.
Still, this is something I can optimize later. I am in a good place right now.
This is my hexagon map with heightmap.
Search found 103 matches
- Mon Aug 29, 2016 3:07 pm
- Forum: General
- Topic: How to add seed to Perlin noise?
- Replies: 14
- Views: 8852
- Mon Aug 29, 2016 1:21 pm
- Forum: General
- Topic: How to add seed to Perlin noise?
- Replies: 14
- Views: 8852
Re: How to add seed to Perlin noise?
oh well, you are way ahead of me on the curve. I just started playing with noise this week.
Best of luck to you and thanks again for helping me.
Best of luck to you and thanks again for helping me.
- Mon Aug 29, 2016 11:36 am
- Forum: General
- Topic: How to add seed to Perlin noise?
- Replies: 14
- Views: 8852
Re: How to add seed to Perlin noise?
this is perfect!
this gives me new shapes everytime. Thank you!
regarding using noise for audio, well thats kinda expected, isnt it?
this gives me new shapes everytime. Thank you!
regarding using noise for audio, well thats kinda expected, isnt it?
- Mon Aug 29, 2016 11:26 am
- Forum: General
- Topic: How to add seed to Perlin noise?
- Replies: 14
- Views: 8852
Re: How to add seed to Perlin noise?
I checked the love source. They use a c++ lib called noise1234 for the simplex noise generation. As such i dont think there is anyway the noise is affected by an internal love2d function for setRandomSeed. @zorg: I tried it. It seems to kill my island shape and just give a fuzzier regular shape. :( ...
- Mon Aug 29, 2016 10:18 am
- Forum: General
- Topic: How to add seed to Perlin noise?
- Replies: 14
- Views: 8852
Re: How to add seed to Perlin noise?
Thanks but i dont think random seed affects noise at all.
Randomseed is only for random function.
I tried using it in my algorithm but it seems to have to no effect on my map.
Can you share a snippet on how you use it?
Randomseed is only for random function.
I tried using it in my algorithm but it seems to have to no effect on my map.
Can you share a snippet on how you use it?
- Mon Aug 29, 2016 9:12 am
- Forum: General
- Topic: How to add seed to Perlin noise?
- Replies: 14
- Views: 8852
How to add seed to Perlin noise?
Hi I am trying some terrain generation using Redblob games articles as ref. For Perlin noise almost all resources on the net have some form of seed to change the noise output. However the inbuilt love noise doesnt allows me to add a seed in it. How can i add a seed value to change the noise output? ...
- Sat Aug 20, 2016 12:34 pm
- Forum: Support and Development
- Topic: Need help with my basic hex grid
- Replies: 2
- Views: 2051
Re: Need help with my basic hex grid
Hi pgimeno. Thanks for trying. I did manage to solve it by adding some offset to the algo. Stranegly no article talks about this. Mathematically also this doesnt makes much sense. My updated algo for pixel to hex is: function get_hex_id_from_point(x, y) rx = x - math.sqrt(3) * hex_size/2 ry = y - he...
- Thu Aug 18, 2016 4:58 am
- Forum: Support and Development
- Topic: Need help with my basic hex grid
- Replies: 2
- Views: 2051
Need help with my basic hex grid
Hi I was looking into hex grid using http://www.redblobgames.com/grids/hexagons/ for reference. My code is at https://github.com/rishavs/HexGridLove2d/ I am able to create a hex grid and assign a cubic coordinate to the hexes. However, I am not able to create a pixel to hex conversion. In my code i ...
- Thu Jul 28, 2016 7:13 pm
- Forum: General
- Topic: Dealing with floats
- Replies: 12
- Views: 5624
Re: Dealing with floats
my bad, posted the code while i was still playing with it. function equals( x, y ) if math.abs(x) >= 1000 and math.abs(y) >= 1000 then eps = 10 elseif math.abs(x) >= 100 and math.abs(y) >= 100 then eps = 5 elseif math.abs(x) >= 10 and math.abs(y) >= 10 then eps = 1 else eps = 0.1 end return math.abs...
- Thu Jul 28, 2016 10:40 am
- Forum: General
- Topic: Dealing with floats
- Replies: 12
- Views: 5624
Re: Dealing with floats
A quick update, I went with function equals( x, y, delta ) local comp = 0 if x >=1 and y >=1 then delta = 0.01 elseif x >=10 and y >=10 then delta = 0.1 elseif x>100 and y >= 100 then delta = 1 end return math.abs( x - y ) <= ( delta or 0.001 ) end instead. This allows me to tackle numbers like 196 ...