compile 'com.jayfella:jme-world-pager:1.0'

As part of the world-generation theme I’m working on, I’ve released the first part - the world pager.

The library builds an infinite world around a Vector3f location using the noise settings you input. It comes with a demonstration using my FastNoise library.

The pager is fully multi-threaded and comes with a HeightMapMesh that calculates edge normals for seamless terrain.

Below is an example of how to run the example in the screenshot below. (Also available here)

package com.jayfella.jme.worldpager;

import com.jme3.light.AmbientLight;
import com.jme3.light.DirectionalLight;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.water.WaterFilter;

public class Main extends SimpleApplication {

    public static void main(String... args) {
        Main main = new Main();

    private AbstractWorldState world;

    public void simpleInitApp() {

        // set the sky to a nice blue
        viewPort.setBackgroundColor(new ColorRGBA(0.5f, 0.6f, 0.7f, 1.0f));

        // move about a bit quicker.

        // add some light
        DirectionalLight directionalLight = new DirectionalLight(new Vector3f(-1, -1, -1).normalizeLocal());

        rootNode.addLight(new AmbientLight(ColorRGBA.White.mult(0.2f)));

        // create our world.
        String worldName = "TestWorld";
        int seed = 123;
        int nThreads = 3;

        world = new BasicWorldState(worldName, seed, nThreads);

        // an an ocean.
        FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
        WaterFilter waterFilter = new WaterFilter(rootNode, directionalLight.getDirection());

    public void simpleUpdate(float tpf) {



The “how to” of it is in the file below. It shows where the noise is generated, how a grid is added and how to set the cell size for each chunk of terrain, how to set the view distance, etc.

As this is developed over the next few weeks I’ll be adding vegetation and collision systems - so you can create the worlds you may have seen in my tech demo videos.

As always, the source code is available on github.


That’s looking awesome. I’m liking the shoreline & water details.

I was working on similar about a year or two ago on a larger/distant scale (i.e. orbital/space distances). I’ve been considering reviving/rebuilding that project and OSing the improved version. Seeing this, I wonder if they could be integrated so it switches to world-pager once altitude gets low enough. In some ways it’d simplify things at the macro scale since I could drop the Bullet stuff. I was using background threads to dynamically initialize collision shape chunks w/Bullet at the bottom layer of the quadtree… :crazy_face: which works well enough, but I’d rather try a simpler approach which is a little less resource intensive.

Are your plans for this to stay mostly “grounded” and just polish that up nicely (blend more ground textures, reduce popping, lod, etc.), or were you going to have it support seamless transitions to space eventually?


i think the transitioning from a sphere to a flat land is more difficult than it seems in my head. I’ll say “probably not” but there’s no reason why - it makes meshes from noise - it can be done. A six sided sphere and all that story. I can’t see why it wouldn’t work.

I think it helps if you’re making that game, too. I’ve never really focused a lot on space, though a lot of other people have.


Yeah, no doubt that one’s tough, but I’m just dumb enough to consider making an attempt at it. :rofl:

My old project (which I think I want to rebuild at least partially) was exactly what you describe - a 6 sided cube blown up into a sphere. I should try and get a decent video that doesn’t compress it to crap for a change…