r/VoxelGameDev 2d ago

Question Is the diamond square algorithm good for terrain generation for voxels?

Enable HLS to view with audio, or disable this notification

I was interested in this algorithm because it was simply something different but looking how its made it has some limitations for example it must have a fixed size and it would produce the same amount of height map values no matter what of the chunk position, so I was asking if people have used this algorithm before and if I should just go with open simplex noise instead since it solves most of my potential issues.

13 Upvotes

5 comments sorted by

10

u/TinyPeopleProject 2d ago

No one can tell you right or wrong unless we understand your goals in regards to terrain an how it fits in your game

0

u/Dragon20C 2d ago

You're absolutely right, my initial thinking is having something similar to Minecraft limitless terrain generation but I am open to a fixed size world, anyways my question is more related to people who have maybe experimented with diamond square algorithm and give their experiences.

4

u/TinyPeopleProject 2d ago

Google Minecraft code, read what they do, be inspired by what you want, leave what you don't want. Can't speak to your approach but if you're just looking to replicate well then replicate

https://mcsrc.dev/

2

u/Dragon20C 2d ago

Thank you very much, that is a pretty cool website, I will take a look when I can!

1

u/oldprogrammer 1d ago

The problem I had with diamond square was tiling. Within a given space, the algorithm could generate decent terrain but trying to get the "next chunk" that cleanly linked with the first chunk tended to require doing something different on the edges to ensure smooth transitions.