Jump to content

Question about large (4096x4096) terrain


Wolfsong
 Share

Recommended Posts

Hello!

 

So, I'm working on early design work of a project. The game is an action-adventure, in the spirit of games like Zelda: Ocarina of Time/Twilight Princess, Beyond Good and Evil, etc.

 

What I'd like to do with the world design, is to have a single massive "hub" area, from which smaller areas, like dungeons, cities, towns, and such, will connect. I'd like the main "hub world" portion to be as large and seamless as possible.

 

I've done some tests on a 4096x4096 terrain map, based on a mock-up heightmap exported from L3DT. I can say, definitively, that even with things like lakes, mountains and other obstructions subtracting explorable space from it, there will be more than enough world to make this feasible, while fitting the different areas/regions/environments the player will travel through. Setting the move speed to 1.5 for "walk" and "6" for the run multipler (just so I could move around a lot faster when I wanted) I was wandering around the map I put together for a good 60 minutes, and it just never ended. I loved it.

 

Anyway! Before I get my hopes up and begin designing, I want to make sure of something. Obviously the heightmap is LoD'd, and the texturing is dynamic, so I shouldn't run into issues there. However, I'm concerned about assets. Because the map has to cover a wide variety of environments and biomes (forest, plains, desert, swamp, canyon, etc. etc), and each will require unique "asset kits", would this become an issue? Does Leadwerks load in all assets available in a given "map" at once, or might they be streamed in as they're required, and then "dumped" from memory when they're not? If not natively, I imagine such functionality could be coded in.

 

Or, would it be best to separate the world into discrete, separate maps for each region? I'd like to keep loading screens to a minimum, used only when entering a dungeon, a city/town, etc.. but if a single large map isn't feasible, then that's just how it is.

 

I'd just like to know ahead of time before I begin designing the world map, so I know how to lay the areas out with regard to how they connect (is it seamless, or would there be distinct locations where the player changes maps, etc).

 

Sorry for the wall of text, and thank you in advance for any feedback!

Link to comment
Share on other sites

No, there is no streaming. It's a feature I really want too. You can't implement this yourself because it requires specific OpenGL functions to accomplish. You will have to break up your maps, but you can keep a pool of objects in VRAM so you won't have to load from scratch each time you enter a new region, but anything new will have to be loaded, and anything not new will be unloaded.

Link to comment
Share on other sites

Awww, well that's a bummer. But see, that's why I asked before committing myself to that. Well, maybe I can break things up by major regions then, and still keep somewhat larger areas where appropriate.

 

Will just have to set up distant landmarks (mountains, etc) set up way off beyond the immediate zone to give that sense of continuity, and to give players a reference of where they are and which way to go.

 

Thanks for the info!

Link to comment
Share on other sites

You can also have multiple Worlds loaded and activate one of them at a time. I have some similar goals and had to figure out a way to do this so I could keep my hub area in memory while loading only what was needed for a dungeon / interior. Exiting an interior is almost instant since it just has to unload the assets for the interior map and reactivate the outer world which is already fully loaded.

  • Upvote 1
Link to comment
Share on other sites

That's an interesting approach, blueapples.

 

So basically, the main/hub area is always loaded, and only the area you're entering (dungeon, town, etc) is loaded on demand, then unloaded when you exit. That's an interesting approach. How large is your hub area, though? If I were intending to have a smaller size hub area (like, 2048x2048, maybe), I think that'd be more feasible.

 

Perhaps with the 4096x4096 setup, it can be set up where its's broken up in to "regions", and then as you move within a certain distance of a region, it'll start loading in the assets for it. Similarly, once you move beyond the distance of another region, it begins to unload them. Further, regions can have sub-regions - like a marshy area within a larger forest, etc. I wonder if something like that could work.

 

Hmm.. This is all programmerly stuff which I have no idea about. I was trying to get into programming, but I think I'm firmly rooted in the design/creative realm. I'd rather work with a programmer who already knows what they're doing when it gets to that stuff.

Link to comment
Share on other sites

You can't really start loading assets when you get within a range (that's how streaming is usually used) without causing some sort of noticable lag, but unloading assets should be pretty much instantaneous. There's a command to load a world, but it doesn't work in the background. That being said, one user got it somewhat working, but I haven't really heard much about it. Either way, it's impossible right now to send the models to the GPU in the background (streaming).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...