Open world game

Hello, I am making an open world game, and I need some advice in regards to the terrain. How would I make a large open world land mass? My initial instinct was to make one large terrain, but I quickly dismissed that as seeing there is probably size limitation and performance problems associated with it.

What I am think of is making many smaller land masses and connection them all, is there an effective way of doing this instead of just using “.setLocalTranslation”? If I were to use “.setLocalTranslation”, how would I know how many units to move each terrain? Also would I need to do anything special to be able to move between them?

Is there perhaps a simpler of more efficient way of doing this? Perhaps a 3rd party plug-in, or a plug-in that is already included with jMonkey? I am sorry if this seems like a really noob question, all my previews programming experience has been 2D games, and I just used a 2D array to make a large open world. This is my first time doing 3D programming so please bear with me.

Thanks in advance for any answers.

re: “large open world land mass”… when you say “large”, what exactly do you mean? We may think different things.

…because then you go on to mention large open worlds in 2D. From my perspective, if you never dealt with paging and such in 2D then the worlds really weren’t that large… but it’s all relative.

I’m guessing seeded endless terrain

Which is a great learning exercise with JME (though it already has an endless terrain generator built into it)

The basic idea is using a seeded noise function to always produce the same height info at any given point in space. From this, you generate a section of the height map, which you then use to generate a mesh for the tile in question.

And as @pspeed said you should investigate paging systems, because you certainly do not want to recreate a tile you just unloaded and GC’d when there is the potential of needing to use it seconds after it was unloaded.

So, here is you check list of things to learn if you want to take the “do it yourself” approach:

Custom meshes (Mesh.java)… there is a tutorial on this subject in the docs
Noise functions… so much info on the internutz.
Tiled terrain… how you put it all together, again lots of info on the internutz. Just search “endless terrain”
Paging systems… these are really easy to understand and implement.

If you don’t want to bother learning these thing, check out JME’s terrain system tutorial(s)

In my 2D open world game what I did was, I divided the world in to rows and column, and for each “scene” I had a txt file containing a 2D array containing numbers between 1 and 8 to represent textures., when the person reached the next scene it would just load the adjacent txt file. So if the person were to go for example to the edge of the screen I would just do row–. then I would load the corresponding txt file for that scene. And I just kept track of the player in int row and int column, Is that something like paging? I am not that good at programming, I just took a few classes at my school and did some online tutorials, most of my knowledge comes from figuring stuff out while working on side projects.

@EnduringInsanity said: In my 2D open world game what I did was, I divided the world in to rows and column, and for each "scene" I had a txt file containing a 2D array containing numbers between 1 and 8 to represent textures., when the person reached the next scene it would just load the adjacent txt file. So if the person were to go for example to the edge of the screen I would just do row--. then I would load the corresponding txt file for that scene. And I just kept track of the player in int row and int column, Is that something like paging? I am not that good at programming, I just took a few classes at my school and did some online tutorials, most of my knowledge comes from figuring stuff out while working on side projects.

Then the best thing you could do is go through all of JME’s tutorials. You’ll know just about everything you’ll need to for accomplishing what you’re looking to do.

I believe you can find them to the left of the screen: Docs > Tutorials & Docs

To answer your question on paging, in the case of terrain, you are loading tiles based on distance from a defined object (camera for first person style games). A paging system caches these objects and sorts them on frequency of use. It only removes an object from the cache when it reaches the bottom of the stack and a new object is added, giving you a pool of recently used tiles to pull from instead of recreating the tile each time it is used (which can be a rather expensive process).

I am not really not looking for endless terrain, I want my my map to be finite size. Also I don’t want to be randomly generated on every run, I want one map that is loaded every time, Is there way to create this through TerraMonkey? What tutorial should I go through that would cover something like this. I did all the basic tutorials already.

@EnduringInsanity said: I am not really not looking for endless terrain, I want my my map to be finite size. Also I don't want to be randomly generated on every run, I want one map that is loaded every time, Is there way to create this through TerraMonkey? What tutorial should I go through that would cover something like this. I did all the basic tutorials already.

You missed the point then. Read the description above again, it explains what a seeded noise function does.
If you don’t want it to be endless, set a limit in world coords as to how far from the center point a player can go. You then have a finite land.

I really need to re-suggest that you take the time to go through all the tutorials.
Once you finish that, start a new TestProject (one containing the tests provided by the JME devs) and run them, then review the code.

Everything you want (including the answers to your questions) is right there. Don’t get ahead of yourself until you at least have the basics down.

Everyone has had to go through them… and most of us still reference them so we don’t have to remember the things we don’t use frequently.