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.