warpstorm said:
And for things like trees, units, etc, I'm sure they do. This was just me not thinking before typing since I've used Gamebryo instancing myself.
Well, I'm not sure with what I see... BTW, it lags even more on map regions with trees. I don't think this is Gamebryo issue. This looks like Firaxis issue on using their interfaces.
Well, here comes more investigation. As I said above, 55Mb of index buffer data can be shrunk to just 2-3Mb. I think most of these are square grids representing tiles while vertex coordinates represent heights.
Amongst 200Mb of vertex data only 45-50mb are dupes, others are unique even on coordinates (leaving textures aside), and even on slide/rotation invariants, I tested. So we can't save more then 50Mb here.
Earlier I tried to redirect textures (~45Mb overally) to D3DPOOL_DEFAULT, thus removing their D3DPOOL_MANAGED copy in main memory, this gave another 45mb. With 128mb of video memory, around 60Mb of vertex data can also be pushed there (given Geforce3 and higher TnL enabled video card, Geforce2 can't store vertex data in video memory, not sure about gf4 mx, though they are TnL-enabled).
So, overally this will reduce memory usage to 150-200Mb. With my system this will be 450-500Mb. It still will swap, but it will become much more playable. Even with simple pushing textures to video memory playability increase was visible.
Probably I will be able to fight off a little more with my memory manager which I wrote through that hard week when I started.
Profiling is done, now time to code last findings on D3D.
One more thing: the game creates geometry data for tiles on-the-fly when you first time scroll to them, and it loads some more if there is some free memory. So, 650Mb is bare minimum just to show my core cities. With 1Gb system it will load some more tiles around. With small map it creates geometry for all tiles, and never swaps again.
Memet
Thank you for the info. This gives me some relief that my work won't last for 1-2 weeks until Firaxis releases own patch which fixes these things from inside. BTW, your English is very good... according to my Russian
![Smile :) :)](/data/assets/smilies/smile.gif)