Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / terrain reloading and controlling memory usage

Author
Message
action 9000
16
Years of Service
User Offline
Joined: 27th May 2008
Location: Alberta, Canada
Posted: 25th Mar 2009 02:26 Edited at: 26th Mar 2009 02:34
Hi!

I've just been looking at some of the numbers for my project.

I'm using advanced terrain in DarkGDK, which, as we've seen, lacks a Delete/Destroy Terrain command.

I have two major concerns that I'm wondering how people have been dealing with; namely:
1) RAM/memory usage

2) Starting a new game without exitting the program and putting the terrain back without being able to remove, unload, reload, etc. the terrain.
[EDIT] problem #2 has been resolved.

I've noticed that with each terrain I add, it increases the RAM usage of the exe by about 25-30MB, according to Windows Task Manager (XP). This is with a 256x256 heightmap, a 256x256 top texture and a 512x512 detail texture.

I was planning on having this section of the world being built out of 9 terrains, but we'll also be expanding into other regions, which will ideally be visible at the same time. Even these 9 terrains become 270MB of RAM and this is only a tiny section of what I'm picturing for our project. By the time we get to 50 terrains, we'll be up to 1.5GB of RAM just for our maps and getting scary-close to the 2GB limit imposed on us by the win32 environment.

Without a way to delete or manage the terrains that are loaded, I need an alternative plan: aka, reduce the terrain filesize, I imagine. Why does 30MB seem like a lot of space for a terrain to be taking up in RAM? Is this typical? Can something be done about it? Would it make more sense to use, say, a 1024x1024 heightmap and built this region on 1 terrain instead of 9? Would that save more RAM? The concept of using a 1024 heightmap scares me.

Anywho, I'm just really worried about RAM consumption, for stability in a larger project and for system requirements (which I'm trying to keep fairly low).

If anyone has any comments regarding memory usage or management with terrains in DarkGDK, that would be awesome!

Login to post a reply

Server time is: 2024-09-30 21:34:55
Your offset time is: 2024-09-30 21:34:55