"Infinite" Terrain


is there an implementation available which can load “infinite” terrains? I mean if your camera is at position (x,y) only one map is loaded but if the camera moves to the border of the terrain, the “next terrain” level is loaded so that you can move continuously?




I’m pretty sure this is on the TerraMonkey to-do list, though I don’t know if it’s complete yet. @Sploreg should have all the finer details.

Infinite terrain is not only creating an infinite amount of tiles but also keeping the actual location vectors of the elements low so you dont hit the float limits. This means “resetting” the objects to zero after some while or gradually moving the terrain under the player. You could implement such a system with the current terrain already.

I once wrote a Wanderland class for jme2. Since I’m not using any special features other than arrays it should be possible to port it to jme3.


It not generated or anything. You create a square array of 3*3 (or more) floor nodes (nodes can be quads, loaded models, terrains, whatever). Then you call wanderland.update() in the simpleupdate() loop and that makes certain that 9 of the floor nodes are always around the camera location. The further away floor nodes (10th and higher) are detached.

It’s not optimized beyond that, so don’t go loading 16 Quake maps or something, that won’t work… :smiley: