I wonder who will be the first to get 1,000,000 views :-O
'Tis the season to pimp some sweet new artwork...
Too bad I don't have any great new in-game screens or artwork to show in this post [ just scrooolllll down the last few entries ].
This image of the game's Vulcan Minigun will have to do. Click on the picture to watch the classic Predator scene staring Jesse "Future Gov." Ventura along-side Arnold "Future Governator" Schwartzzeneggeraaaaa;hdddfffff...go on. Click it.
Mini-gun's Model Specs -
On a similar note, my characters have > 40MB of texture data each. To load all game textures @ their highest resolution would require ~4GB of RAM.
I devised a Texture LOD / caching system to handle the situation.
Basically, before, I was maintaining 3 directories High/Low/Medium, hand re-sizing the source 2048x2048 character, vehicle, environment, weapons, etc...that was a major pain.
I have come up with a ~250 line solution using windows find structures and the fantastic DevIL library. I esentially have my source 2.5GB directory "LOD1", and use FindFirstFile()/FindNextFile(), DevIL and some ShellExecute() commands. I kick off the process by running the game's .exe with a -Generate_Texture_LOD cmdline parm. It's all done as a pre-process to running/releasing a build, I generate 4 other directories which hold 0.5, 0.25, 0.125, 0.0625 scaled versions of the source texture. It takes about 3-4 minutes to re-size all the textures [ they are mixed, tga, bmp, jpg...some with alpha channel ].
This results in a memory usage of ~2.5GB down to about ~10MB.
@ the start of the game, I un-cache all texutures [ load the LOD5 version, which is trivial and takes 0.01 seconds or similar negligible ]. On-demand in the game I load all needed textures @ the user's selected texture resolution. So only needed textures are loaded into RAM. I also un-cache textures that are unused after X seconds. I could extend it further by using D3DXTEXTURE9::SetLOD() calls [ which would only give me control over the video RAM, it would still be loaded into regular RAM ] and determining the screen size & texel ratio and manage the loaded texture LODs that way.
I also have a hard ceiling on the number of texture loads per frame, so there are now no real "locking load times" that screw up multiplayer on slow machines as the game/netcode loops are never getting hit in that situation.
Anyways it was a pretty basic setup and I'm quite happy with the results, obviously the memory usage has gone down nicely. On average ~200MB in the lower texture resolutions [ 512x512, etc.], which is cool and keeps me <1GB RAM use @ Low, 1.5GB at Medium, and highest is about 4GB of RAM usage [ie: 2048^2 color/normal/specular for everything thing ].
But yea, still cranking on other parts of the game, stay tuned for an update soon with some good stuff.
Happy Holidays & Merry Christmas!
::drunk christmas weekend emoticon::