Some semi-random thoughts on terrain generation
Anyone who likes my big oak tree? Smile
[Image: ded71e0994.jpg]
Reply
Thanks given by:
Its right, but a little "blocky" (yes, in Minecraft) and its shape seems square.
Reply
Thanks given by:
It's not that bad:
[spoiler]
[Image: 05e88bb974.jpg]
[Image: cc815c2761.jpg]
[Image: 9e071d9553.jpg]
[Image: 541039d686.jpg]
[Image: 68d736dda4.jpg]
[/spoiler]
Reply
Thanks given by:
I think it's weird. The central trunk should be higher, after all it's the dominant apex.
Reply
Thanks given by:
Then how about this:
[Image: 156c5f05ce.jpg]
[Image: d7521e7149.jpg]
Reply
Thanks given by:
The branches seem a little too long. I'll adjust it.
Reply
Thanks given by:
I uploaded my first implementation to github.
Reply
Thanks given by:
Interesting. Why the floating-point directions, can't you work with regular ints?
Reply
Thanks given by:
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
Reply
Thanks given by:
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.
Reply
Thanks given by:




Users browsing this thread: 26 Guest(s)