D2X-XL Worklog
Notes on features and problems from the development of D2X-XL, newest first.
Memory Requirements |
|
After having had contact with a few people having problems with the memory requirements of D2X-XL, I have taken some time to do a few measurements of D2X-XL's memory consumption. For the menu system, I have turned on the new menu style and fast menus, and for in-game tests I have been using Descent 2:Counterstrike Level 1. Here are the results:
Most interesting is the small increase from medium to high texture quality. I found hires textures still looking very good with high texture quality (256x256), and the measurement confirms that the decrease in memory consumption when using medium texture quality (128x128) isn't worth the loss in visual quality. Highest texture quality on the other hand is not so much better that it would justify the massively increased memory requirements. Memory consumption of hires models proved to be pretty hefty, so I introduced a new command line switch '-model_quality [0..3]' with the possible values of 0 - 3 corresponding to the texture sizes given above (0: 64x64). Again, decreasing model texture size to 256x256 results in a massive decrease of memory consumption at the cost of a hardly (if at all) noteable loss of visual quality. D2X-XL will reduce texture sizes on the fly when loading a level, which will increase the already significant longer load times. If you utilize the new texture cache feature (command line switch: '-cache_textures 0|1'), D2X-XL will store the reduced size hires textures in your textures and models folders, increasing loading speed significantly for these textures and quality settings in the future. Using high texture quality for hires textures and models therefore seems like the best tradeoff between visual quality, memory consumption and loading speed. Improving the texture management of D2X-XL brought another 25% decrease of memory consumption. Examining the texture handling of D2X revealed that all textures were treated as having an alpha channel (transparency), even if they didn't (the corresponding OpenGL texture format is GL_RGBA). This wasn't much of a problem in the original D2X, as it was only using the basic 64x64 Descent 2 textures, but with hires textures it really hurt. Simply removing the alpha channel from these textures (OpenGL: GL_RGB) brought this tremendous effect. Adding a switch that allows to decrease the maximum level size ('-max_segments <size>') D2X-XL will handle helped to halve the static memory requirements of D2X-XL. Another small optimization - mostly helping load times - was to remove the alpha channels from all hires textures that didn't need one (there were quite a few). |


