Basic noob feature question: streaming terrain


does jmonkey engine support streaming the terrain from a central server,

or are there any addons/features which support this feature?



we'd need to use our own network comm, which is running as a TCP connection. I need to look into the code for

a while, but first i need to check out JmonkeyEngine :slight_smile:

Can your addin stream both open terrain aswell and dungeon /doom like terrain?

Does jmonkey engine handle both equally good?

In Wurmonline everything is player built meaning nothing except the actual dirt and water is streamed as terrain. The rest is objects. For example houses, walls, hedges, signs, roads, pavements etc its all player made.

Mapspinner will allow you to stream terrain via RMI, the code is set to use the hard drive by default but modifying one line allows you to set up a RMI client/server scenario. Its very simple really.

many thanks for the prompt reply. I'll try that out and see where I get. Do you know if its possible to

stream infinite size maps, or are there limitations in the renderer / internal handling of terrain data

that would prevent this?

Thinking about a massive world. Or using jmonkeyengine for geodata applications and such.

Cool feature,…actually where is teh need for streaming terrain? Is there any? Normally I couldn't imagine something for static than a terrain. Neverthelles a cool feature. So let's say I would like to have something like a real REAL thick worm (like in Dune) I could transmit "subterrain"-movement via RMI?

Just wondering as I two hours ago created a new mapspinner terrain and thought! COOL, a worm is crawling under the earth…

mapspinner is really really cool…

Yea, I'm gonna have to check that out.

Well, the reason is we have currently a java based mmo which make use extensively of terrain streaming,

its called Wurm Online a sandbox mideval multiplayer sandbox, here:

Trying to short cut making alot of 3d features into the client and instead implementing something like JMonkeyEngine if it is at all feasible.

In wurmonline, you can terraform the terrain around you, make caves and underground hideouts etc, and

its all streamed from the server to the client. Everything in the game is player build.


Yeah,… wurmonline! Great… I played it in a beta beta alpha phase some years ago :smiley:

I had a real nice hut and during I was working on my house someone stole my

wheat (or whatever) Something that you could transform with some luck to cloth afterwards!

Too bad I couldn't get it back! only thing I could do was following the thief and use

"spit on …" :smiley:

I dont know about caves yet… but mapspinner will certainly allow you to stream the edited maps with a little modification, its a feature I've been considering for quite a while… Its as simple as implementing the ovservable interface in the rmi persistence methods, should I code that up and add it or do you think your team could do it and I could submit the code into the trunk?

Mapspinner does however support infinite terrains, as well as the abilaty to locally (using seeded perlins) generate any terrain that hasnt been edited yet, compression is also implemented to ensure cheap network transportation (youre looking at about 6kb per object), this idea sounds completely viable. I dont know if it would work better with something like jgn, but afaik rmi is widely used for larger servers anyway.

As for sub-terrain data like worms and volcanoes, it could be implemented as a form of editing, but the more network friendly way to do it would be to create a sort of 'affector' that flies around under the surface and 'bulges' the terrain via a vertex shader, the software lookups would also have to be affected by the object so a software method or two may need modification, if the bulge needs to be modifiable, its shape could be a uniform array or it could be loaded as a texture with modified uv's.

Its all relative, mapspinner does stream terrain data in the form of outdoors heightmaps, its goal is to eventually stream indoors environments too however it is still a long way off from doing that. It is possible to transmit your indoor scenegraphs via the network, even easy. But thats beyond the scope of this reply.

One problem that jME will hopefully have solved soon is spatial partitioning and culling. Currently scenegraphs are rendered as scenegraphs, wich in a lot of cases may slow down the game's framerate. There are several people working on improving this and as this support matures, I plan on growing the features of mapspinner to first include objects, then buildings, and also building interiors. This will all be streamed alongside the terrain blocks.

Oh thats abit surprising. I was under the impression that the engine supports occlusion culilng since its renderer is, according to the info pages on this site (, based on spatial partitioning which can exclude large chunks of the scene before rendering.

Edit: Just read more it seems only frustum culling is implemented…

Any built in occlusion mechanisms wouldnt work on your realtime world idea anyway since your data gets re-arranged so much, its a better idea to take some developing contributions like the cells-and-portals system and modify it to your needs anyway.