Hi all!
I've tried to make Diamond Square Procedural Map Generation
Based on this video: https://www.youtube.com/watch?v=4GuAV1PnurU
Diamond Square Procedural Map Generation
Diamond Square Procedural Map Generation
- Attachments
-
- diamond-square-01.love
- (1.33 KiB) Downloaded 346 times
Re: Diamond Square Procedural Map Generation
The colored version:
Press W and S to change the resolution;
Press R to regenerate map on current resolution;
Press F11 for fullscreen;
Press K to make a lua file with current map as array with values [0 .. 255]. See folder %AppData%\LOVE
Press W and S to change the resolution;
Press R to regenerate map on current resolution;
Press F11 for fullscreen;
Press K to make a lua file with current map as array with values [0 .. 255]. See folder %AppData%\LOVE
- Attachments
-
- diamond-square-02.love
- (2.38 KiB) Downloaded 399 times
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Diamond Square Procedural Map Generation
Nice, is it possible for me to make this converted to grids for a map where a character can move on(for collisions and things)?
Re: Diamond Square Procedural Map Generation
Yes, right now here is float from 0 to 1, but if you press "k", it will be saved as as integers 0-255. It can be very easy changed to (for example) 16 levels. See also the link: https://www.youtube.com/watch?v=4GuAV1PnurUGunroar:Cannon() wrote: ↑Tue Jun 22, 2021 10:45 am Nice, is it possible for me to make this converted to grids for a map where a character can move on(for collisions and things)?
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Diamond Square Procedural Map Generation
So it's like Perlin/Simplex noise. Can it go on forever or only a defined size can be generated when you want it(good either way).
Does it have biomes? Can biomes be added if not.
Does it have biomes? Can biomes be added if not.
Re: Diamond Square Procedural Map Generation
You can add another square near the old one.Gunroar:Cannon() wrote: ↑Tue Jun 22, 2021 7:32 pm So it's like Perlin/Simplex noise. Can it go on forever or only a defined size can be generated when you want it(good either way).
Does it have biomes? Can biomes be added if not.
Smallest field is 3x3, the next one is 5x5, the next one is 17x17. Yeah, side = 2^N + 1.
But you can make sides just as a = 2^N + 1 and b = 2^M + 1 and it will be nice filled.
Biomes can be calculated as result of two different value (the hight is value too) maps.
Three maps (hight, temperature, humidity) can describe biomes very nice. High temperature and high humidity is tropical area, but high temperature and low humidity is a desert. If it's too high, then it's always cold and dry.
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Diamond Square Procedural Map Generation
Any code implementation of biomes?(if you're willing of course.)
And can I zoom out the map, to make it show a larger area in a smaller space (sacrificing resolution)?
And can I zoom out the map, to make it show a larger area in a smaller space (sacrificing resolution)?
Re: Diamond Square Procedural Map Generation
Wait, that's 2^2^N + 1, otherwise after 5x5 the next one would be 9x9.
Re: Diamond Square Procedural Map Generation
You are right, the field 5x9 is also possible.
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Diamond Square Procedural Map Generation
The map always seems incomplete, even at a high field.
I'm not familiar with this diamond-square, is there a possible way for me to show more of the map in a smaller area?
I'm not familiar with this diamond-square, is there a possible way for me to show more of the map in a smaller area?
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest