Hiding models

Blitz3D Forums/Blitz3D Programming/Hiding models

cash(Posted 2005) [#1]
I have created about 90% of my static first level. I still have to get all enemies and interactive itens included yet.

When it loads it uses 120Mb RAM.

On my PC its not an issue as I have 1.5Gb RAM but I think it may cause performance issues to some people.

So I was wondering whether this would work.

Suppose I break my level into smaller individual models and hide anything not immediateky required like rooms etc.

Would this conserve memory or not ? I am not able to test right now so its a theoretical question at the moment.

The only other thing I can think of is to load bits and unload bits as required, however this will cause a lot of recoding.


Ross C(Posted 2005) [#2]
First thing that strikes me, is how much Video RAM is you game taking up? Secondly, HideEntity will not reduce your memory requirement. The way i was going to do the 3d levels and stuff for my games, is to reuse certain meshes, and textures. It would be too wastefull to have every entity unique, with it's own different texture. Try and reuse meshes if you can.


Ross C(Posted 2005) [#3]
Also, see if you can get your texture sizes down a bit. reducing say your 1024x 1024 textures down to 512x512, will only require 1/4 of the memory space. You could also give the user an option to choose the texture quality. People with poorer machines, could choose smaller textures, taking up less memory.


cash(Posted 2005) [#4]
Thanks....I will let you know what happens


Danny(Posted 2005) [#5]
Cash, splitting up your level in seperate meshes as opposed to one large should also better optimise your FPS, since blitz (and your 3d card) will automatically hide objects that are not in view (check your polycount at runtime).


Storm8191(Posted 2005) [#6]
I think, if you still feel like reducing the size of your level in memory, simply free parts of the level, and be ready to load them later. Freeing the actual meshes and textures will free up more RAM for sure. It'll be complicated because you'll definately want to reload the parts of your level before your player sees them again, and you may want to do that gradually instead of pausing your game to reload data. But all this is just ideas to consider.


jfk EO-11110(Posted 2005) [#7]
Don't worry about duplicate textures. as long as they use the same flag, Blitz will automaticly optimize recognize redundant data and use instaces instead. The same goes for Sounds.
Yes, using 512 Textures is enough in most cases (esp. for tiling map textures) because even when you are very close to the wall (or whatever), the 512 Pixels are pretty close to your max horizontal screen resolution. 1024 Textures may be used for a few hi-q Characters only.

I think 120 Megs isn't a lot these days. Well, if your game is crap, then it's too much :)