Cuberite Forum

Full Version: Some semi-random thoughts on terrain generation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Anyone who likes my big oak tree? Smile
[Image: ded71e0994.jpg]
Its right, but a little "blocky" (yes, in Minecraft) and its shape seems square.
It's not that bad:
[spoiler]
[Image: 05e88bb974.jpg]
[Image: cc815c2761.jpg]
[Image: 9e071d9553.jpg]
[Image: 541039d686.jpg]
[Image: 68d736dda4.jpg]
[/spoiler]
I think it's weird. The central trunk should be higher, after all it's the dominant apex.
Then how about this:
[Image: 156c5f05ce.jpg]
[Image: d7521e7149.jpg]
The branches seem a little too long. I'll adjust it.
I uploaded my first implementation to github.
Interesting. Why the floating-point directions, can't you work with regular ints?
Because if I use ints I can't place a block on the same height:
Code:
---XX
XX---
instead of
Code:
----X
--X--
X----

(If that makes sense)

EDIT:
Now compare my code to the vanilla tree: https://gist.github.com/grum/62cfdec0537...-java-L145
Make the code lerp between startpoint and endpoint, then, you can have branches at any angle, and still keep int coords. Look up Bresenham algorithm if you need to.