Implementation Shattered Planes

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
For lakes be sure to check out how PolyWorld does it, including the tiny trickles they send out to the ocean :)

I think TTA had lakes at one point, may have been before the world turned into a near endless hillside :D
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
PR - I think @Josharias is going to rework it and submit a new one soon :)

Proposal - congratulations! I assigned you to the GSOC issue on GitHub I think that whole thing originated with - proposal is a fair bit fancier than the issue, although there's an old forum link with some more info in, you've probably already seen it :)
 

Cpt. Crispy Crunchy

Member
Contributor
Quick update: Performance was increased tremendously and has achieved perlin world gen speed! This was achieved with Josharias method of getting noise values on batch. Thanks for the tipp @Josharias :)
Unfortunately that means I have to access the getRelativeWorldIndex method of the SurfaceHeightFacet which is protected by default. Making a new SurfaceHeightFacet leads also to problems as the playerspawner needs that and other things of core which the module depends on.
Would it be possible to make that public? I see no further problems with that but maybe I've overlooked something.
The ShatteredPlanes patch is currently in the test branch -> https://github.com/Terasology/ShatteredPlanes/tree/test
but you would need to add
Code:
    public int getWorldIndex(BaseVector2i pos) {
        return getWorldIndex(pos.x(),pos.y());
    }
to the SurfaceHeightFacet to test it.
I'll make an Issue out of that for further discussion.
 

Josharias

Conjurer of Grimoires
Contributor
World
SpecOps
It seems to me a good idea to change the getRelativeIndex(...) and getWorldIndex(...) protected methods in both BaseFacet2D and BaseFacet3D to public. Making an array of noise seems to be the only path to performance, so having these methods available seems like the only way to go. I havent gone looking, but is there some sort of utility class that this would fit in? instead of baking it into the facet classes.
 
Top