How to Build a 3D Open World

Started by
3 comments, last by Cydriic 9 years, 9 months ago

Hi Everyone,

I'm building a big 3D Open World, but i'm not sure how I should go about it.

The engine i'm coding is DataDriven, and it reads from a File to know how many objects to create and of which class and where to place them in the world.

For now I can build as big as I want, but for performance issues, I build in a square area that spans from x: - 48 to x: 48 and from z: -48 to z: 48

I was thinking about separating my loaded scene in four (4) equal square zones , and from there once in a zone, already load the file for the second coming zone, so that view distance can keep up and so have a seamless kind of loading for zone transitions.

And so as you advance, you stop loading the first previously loaded file and keep the current one and also move on to the next one.

So In total you would be loading from two files (2) at the same time and so would be covering a zone that would span across two (2) adjacent squares of 96 coords in x and 96 coords in z.

But depending on where you're at in the zone you are actually walking in, the program would determine zone you are moving towards and zone load the appropriate file.

What do you guys think.

It's an open world a la Morrowind or Daggerfall.

Thanks guys!

Advertisement


was thinking about separating my loaded scene in four (4) equal square zones , and from there once in a zone, already load the file for the second coming zone, so that view distance can keep up and so have a seamless kind of loading for zone transitions.

Will your entire world just consist of 4 zones?


So In total you would be loading from two files (2) at the same time and so would be covering a zone that would span across two (2) adjacent squares of 96 coords in x and 96 coords in z.

What happens if the character is looking/walking "diagonally"?

Hey Phil t,

Thank for the reply, awesome questions.

1) No the world will be WAY more than 4 zones.

2) Good Question, we got a problem if he is moving in a diagonal direction.

I need to think of a way to solve this...

You need to load way more than 2 zones at a time. Most open world engines handle dozens of "chunks" at a time. You also don't ever want to immediatley unload a zone as soon as its goes out of the load distance since the player might step back and forth over the "boundary" of two chunks. You need separate "close enough to load" and "far enough to unload" distances (the former being smaller).

Basically, load all chunks within some radius of the player's location, and unload any chunks greater than another distance from the player.

Sean Middleditch – Game Systems Engineer – Join my team!

Hi Sean,

Yes, thanks for the info.

I think i'm going to move forward with loading a 9 zone 3x3 grid centered on the character, i'll start with that and optimize as I test.

Thank you so much guys!

This topic is closed to new replies.

Advertisement