Ever spend days trying to find a solution to a certain problem of to find the cause of the problem isn't what you thought? This afternoon I finally tried to find the bottleneck that's been causing me to get ~5FPS. So I commented to thing rendering, no change. Commented out wall rendering, a slight boost from 5 to 10FPS. Comment out planes and the HUD, now NOTHING is begin drawn and I'm still only getting ~20FPS on most levels.
Seeing that levels with a huge number of monsters obliterates the framerate, but levels with few monsters( like D2 map 01 and 07 ) are OK leads to the problem. Each monster has about 30 animations, each animation has a timer, do the math. Commenting out thing loading altogether proves this since the FPS jumps to around 400.
I have a solution and we shall see if I can the FPS back to normal
The day wasn't a complete waste though. First I added in support for transparent walls. My method basically consists of:
Device.RenderState.AlphaTestEnable = true;
Device.RenderState.AlphaFunction = Direct3D.Compare.Greater;
This seems to do the trick:
Second I fixed a few more texturing issues. For some reason I added in upper and middle wall animations, but not lower, how retarded. I also fixed some issues with normal(not unpegged) upper textures.
Thanks to the new texture fixes I can now show off Plutonia MAP30: