Jump to content
  • Advertisement
Sign in to follow this  
platonman1

Game levels and zones

This topic is 4699 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

Hello everybody :) I have a question about handling of big levels... I think dividing the level in zones would be the best way to go... I would use this for an outdoor game, primary for heightmaps... And I don't want to have any loading time between zones... What is the best way when it comes to load a new zone ? Would compiling a display list each time this happens a good idea ? Or would it be too slow ? If anybody has another idea, please post here :) Thanks in advance ;)

Share this post


Link to post
Share on other sites
Advertisement
I believe what your talking about is a plausable case for paging/streaming. What you do is when you are near a loading point for the next zone, you load its resources, gradually. So, you'd load a few triangles into a buffer every frame, until its completed loading. This usually brings a minimal performence hit.

Share this post


Link to post
Share on other sites
I'm asking if, when I have to load a new zone, compiling a new display list is fast enough, so the user doesn't notice the switching to the new zone... So... OpenGL related :)

Share this post


Link to post
Share on other sites
Ooooo hehe.

I suppose it would depend on how much you had to load and how fast their machine is. Also, would it just show them the new zone when everything loads or would it fade into existance as it loads? All those are important factors.

Share this post


Link to post
Share on other sites
Hi again :)

I think splitting my global heightmap in zones of 1024x1024 sub-heightmaps would be a good choice... That would make 1Mb to load every time the user approaches a new zone... And I thought scaling this sub-heightmaps by some factor on the X and Z axis so that the user thinks it's bigger...Something like 16.0f...

And I would like that the user doesn't have the feeling of changing zone... Like in World of Warcraft for example...

Thanks for your time :)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It's just an idea, but this might be a really nice alternative:

http://www.cognigraph.com/ROAM_homepage/

maybe this way you don't have to cut up your levels :)

Share this post


Link to post
Share on other sites
I think You should use threads to handle this kind of situation. "Main" thread handle all game logics and rendering and an other thread (let's call it "loader") get orders from "main" thread to load (why not save ??) terrain data. So when "main" thread detect you need to load a new portion of the map it fires "loader" thread to get it from disk. "Main" is responsible to send terrain data to OpenGL via Vertex Bufer Objects.

There's an article in some of the GPU Gems (sorry can't remember which one because I don't have them right now).

Share this post


Link to post
Share on other sites
Thanks for help :)

I'll try all this, and if I can get it to work properly, I'll of course post a demo so everybody can see how I did it ;)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You could have a sliding window of 'zones' that are in memory and get loaded at a leading edge and get unloaded at a trailing edge. The zones can be much smaller than 1k x 1k and a seperate file thread could be used to load them in the background. The distance to the edge would be far enough to be well out of the players interaction range and by using haze/fog at that distance the popping in of loaded zones could be obscured

Im doing this with 15x15 zone window grid of 16x16 quad heightmap zones (I also have alot of interactive objects in the scenery as well as active objects that get loaded with each 'zone'.) The player is in the center of that 15x15 array of zones and when the center zone edge is crossed, the entire array shifts and a new edge is requested for loading. I also have multiple LODs with the most distant having a simplified 4x4 mesh per area (at a distance where the loss of resolution isnt noticable). You might think the mesh dimmensions are pretty small at 16x16 (17x17 vertices) but that is only a basic surface that alot more detail sits on.
I may up them to 32x32 if needed in future.

More complicated mesh objects (like buildings/tunnels) are loaded seperately and sit on the basic heightmap areas.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!