Jump to content
  • Advertisement
Sign in to follow this  
Cydriic

How to Build a 3D Open World

This topic is 1620 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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! 

Edited by Cydriic

Share this post


Link to post
Share on other sites
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"?

Share this post


Link to post
Share on other sites

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... 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!