Memory Reduction Issue With Level

I am seriously in some great danger here, I need to complete a level but I am having memory issues regarding RAM.

Does any one know how to do a “Pop In” technique were at a certain distance the level content begin to appear?

I did manage to optimize the game in general but this is not doing me any justice but a simple RAM reduction my goal is to use as little as 800MB of RAM as possible the current use is more than 1089MB of RAM.

It’s called Level of Detail, and there are millions of posts about it in this forum.

But that is only 1gb of ram. You can’t buy a laptop with less than 2gb (even netbooks), Windows 8 requires 4gb (according to the packet), my cheapish laptop has 8gb with 2gb graphics ram.
What makes you think that ram is limiting performance?

Doesn’t LOD require the textures and models be loaded into the ram? I thought it usually helped with the amount of faces the GPU has to draw. Unless the LOD streams data from storage, of course.

What you need is not LOD. With LOD you still need to keep the higher detail models, textures etc loaded in buffer and they reserve the RAM just as well as the lower detail models you display. Incorporating a LOD system actually adds the amount of RAM your program needs because you need to store both LOD models in buffer. LOD is mainly used/needed to improve framerate issues and to build large environments while keeping the rendered polycount low.

What you need is (more agressive) libload() and libfree() system where you load and unload content into RAM as you move through the levels and the content. You could call it view distance/frustum culling but it’s technically a bit different that depending on which things you consider in your loading/unloading algorithm. These systems are pretty complex to set up and require you to understand python and general programming, file paths and BGE environment when it comes to scenes and active and inactive objects.

But as stated the RAM usage doesn’t sound too bad and aiming to lower from 1000 to 800 is not going to be worth setting up a libload system other than for learning experience. Most up-to-date machines pack 4gb of RAM.

Hmm. Is it really not possible to build a LOD system that streams the data from harddrive when swapping models and not reservin them all in RAM?

Aren’t games already using streaming from hard drive for this instead of loading them all in RAM? I mean surely the swap wont be as “pretty” or instant but surely it would work?

Usually in LOD systems you keep the two loaded in RAM the whole time and insta-switch the HQ model when you are close enough to see the detail. The assets do share most of the information, nowadays even texture as the lower res “mipmaps” are generated and stored with the texture file as well. This of course mainly goes for most sophisticated and efficient engines.

HDD “streaming” does not really go well with LOD in this environment as the setup is weighted around maxing the eye candy, gameplay and draw distance. You don’t want to load the lowdef file for the distant characters and only start loading the detailed mesh and fancy maps as the character comes closer because often the files are big and the model is close before it’s done loading the mesh. Because of the HDD access speed variation he programmers/designers also can’t count on which model each player has visible at each point of the game which makes designing some aspects of the game more challenging. All the relevant animations and texture and mesh details would need to be there in low res version as well.

Some games like WoW directly load some character models from the HDD and this affects the gameplay often. On the other hand they can’t expect anyones RAM to keep all of it stored because of the “massive” part in MMO. As far as I can tell Blizzard has been developing their LOD algorithms for as long as they’ve been developing WoW.

But even for very content heavy games the trend is moving towards smooth LOD stepping and storing models in RAM now that 64-bit OS brought support to >4gb RAM and people have been doubling and even quadrupling their RAMs. “Pop-in” mechanics are viewed as something low-brow if not downright “bugs”.

But yeah, outlining a pop-in mechanics would be first to split up all your objects into separate .blend files. Then change your level design so that you design by placing empties around the map that represent the models. Then make a script that analyzes these “spawn nodes” and builds control nodes that change which objects are loaded, load the missing and unload everything else. (because in-game you don’t want to be making a distance check to every spawn node even once a second when you have a big world)

Once you get such system up and running you can use it for all objects, even terrain blocks.

Content streaming can work in conjunction with LOD. So you can unload content that mostlikely will not be required soon and load anything that might be visible in near future.

This is the difficulty … determine might be seen and what not.

Therefore content streaming is a sort-of lowest level of LOD.

Be aware dependent on the game model, you might still need to “simulate” unloaded content (e.g. travelling NPC, falling stones).

No I mean… I want the game to use no mare than just 800MB or maybe even 850MB my PC uses 4GB of DDR3 RAM at 1333 MHz so there is no issue there my goal is to make the game use no more than 800 - 850MB of RAM my

Well its because this is my issue the PC is fine it has 4GB of RAM but I want the game to use little RAM… mainly this is the true goal but everything in the level is loaded once the game begins in the original version its about higher than 1GB the Optimized version hardly dropped its not that im low on RAM its the fact of making a less Memory demanding game.

Exactly something like that is what I was kinda thinking but never figured out what it was called. Its something I never had a chance to master and I seen old 7th Generation consoles do this “PS3 and Xbox 360” I was mainly going to develop a game for Xbox 360 but immediately declined when I figured out how much RAM It has “512MB”.

The odd thing with old gen games was how they were able to fit all the content and semi medium textures in one place with such little RAM for example Bioshock Infinite

The fact you can fit something like this is absolutely amazing the Ambiance, Light Shafts, Texture Detail etc…

I own this game on my PC and when I went to Task Manager I saw Bioshock Infinite was using around 300MB of RAM and my guess was its simply a low poly game… it was my only guess because its in plain view the game is very sharp and low poly when it comes to 3D modeling but it manages to pull it off with style.

I how ever am a High Poly addict I want the perfections in certain places mostly in the main character.

Well how do you build the LOD system?

I how ever am a High Poly addict I want the perfections in certain places mostly in the main character.

Just so you know you will likely not have enough time to make a game of that detail level alone in any feasible timeframe. If you’re aiming for that I can tell you RAM is some of the least of your worries.

Well how do you build the LOD system?

I gave you the basic outline for content streaming system (it’s not LOD) that you need to lower RAM use. Like I said it’s likely pretty complex depending on where you come from and how familiar you are with programming. Start with trying to make one model from external .blend file appearing in your level where you want it. Then work how to remove it and add it again. Then start to make the script that adds and removes it as you come close or go away. Then depending on your object count generate control nodes that control the state of multiple objects at once.

Okay thank you bro!! this feels like something I can try to deal with.