Sunday, 9 March 2008
I just stumbled upon this doom port yesterday. It's not the fact that Doom is ported from C to Pascal language which impressed me but what is more interesting is the software engine and it's features/tricks.
First of all there is something I had in my mind trying with some doom source port but someone else did it before I even started. How would doom look like with bilinear filtering on walls and floor/ceiling and how feasable is this with software rendering. I have even seen how the walls would like if interpolation is done in 1D over the vertical wall columns (which is the initial interpolation on wall columns I was thinking trying to code and never did :). For some reason, when you select the highres texture packs the interpolation on walls is 1D while it's only proper 2D with the original textures. Also with the highres packs the port doesn't filter the floor/ceiling texture which makes the highres texture mode much faster than the one with the original textures where everything in the screen has true bilinear filtering. I don't know why this happens and if I could also change some setting to see how the highres textures look with 2D filtering (but with 1D they also look great not very close enough) but that's still great because the game is faster with the good textures.
In my PC in 1024*768 I only get 10-15fps with ultra detail while 20-25 with the highres textures whose options don't filter everything i the detail the lowres textures are filtered. In 640*480 or 800*600 it's more playable. Except from the cases where some lightning effects suddenly drop the frame rate. Maybe I should uncheck these ones from the options. There is also support for 32bit color and more smooth shading on Z (light diminishing) which feature I don't think I have seen in some other ports I play frequently (at least in Zdoom I don't get anything more than 8bit mode).
The most interesting feature is the so called true 3d emulation technique. I haven't heard of this before. It's a very unique and interesting technique to solve the wall shearing that happens in Doom when the player looks up and down. Because doom does not render textures but scales vertical lines of a bitmap, to look up and down the makers of various ports shifted the Y positions of the columns according to their distance. This resulted in a rather distorded view (which also makes me motion sick and that's why I never play doom with the mouse view :P). What mr. Jim Valavanis do here is if I understood correctly, a post processing of the already rendered frame buffer, taking each horizontal line of the screen and scaling it on X according to... what? That's what I wondered. To the Z of some collumn in the center? To the total average Z from each column? Of course that Z is altered on Y depending the angle of the view, but some walls far away wouldn't have to be scaled as much as the walls near the place I think. Here a whole line of the frame buffer is scaled (according to Z of some selected column pixel in this line? Or the average of all?). If you go to some corner and try to look up down you will see there is something wrong here. But the idea is a very interesting solution and I haven't heard of something like that before!
I would never expect to see software bilinear filtering in games. It's a bit rare anyways. Especially for Doom in Delphi :)
You can find more info and downloads in delphidoom website. I suggest you first have the Doom1/Doom2 commercial WADs and download the big package with highres textures and MP3 music. If you wish to see the tricks explained here in software run the launcher and uncheck the OpenGL support (Someone would joke that this makes the software tricks useless anymore, full true 3D perspective, bilinear and lightning at 200fps in 1024*768 with the help of the GPU :) But what I find interesting is the software part :P))