Sign in to follow this  

Creating Open World

Recommended Posts

Hi, I like to work on own games, but with own engines. Or better I like to create those engines for games :D I am working on Xcode, with C++ and OpenGL. My question is, How can I efficiently store the data of a hole open world with all objects, persons and so on in it.

I mean, I could imagine that the world is split in certain areas, and you load only near by areas. But if every map has also a few hundred objects on it, with maybe buildings, cities, ... that would be a hole buch of loading, than when I image it is a flat area, so I could actually see pretty far, than I must have really big areas with a lot more objects on it, than maybe AI that is calculated the hole time for those areas. 

 

And than second thing, let's say I am able to change the world, like in Minecraft, remove certain parts of the world and add it some where else. I must save and load this again to that area. Is there a nice and good way to load, save and store such worlds, for an open world. 

 

I would just write everything to an textfile. And store each area in a Textfile. When loading an area, I would create an 2D array, store all informations in that, build out of that array an Vertexbuffer, load it on to the GPU and render the hole area. But that don't seem to be good.

Share this post


Link to post
Share on other sites

Highly agree with Tangletail's reply.  Keep it simple.  Also point 4 slayemin's reply.  I did something similar for Castle World for example.  I split the world into AABB cells.  Each cell has a terrain mesh and game objects.  Start with the cell that the camera point is in, and recursively traverse neighbor cells.  Collide their bound boxes with the camera's view frustum to see if they are visible.  Then for that cell, draw the terrain mesh and all objects whose bound boxes intersect that cell.  This information is cached of course.  It works and it is very fast.   This is just an example.  There is no one solution.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this