RetroPCCupboard wrote on Yesterday, 19:41:
I am not sure what you mean when you say you are making an MSDOS port. The original game was MSDOS, so if you are editing that code are you not enhancing it rather than porting it? Or are you rewriting the code to work in a different compiler? Sorry if you said that earlier and I missed it.
A "source port" is largely a term for anything based of some sources, be it a fork for the same platform or another. Even though Duke07 can be considered a fork of the original game, it also can be called a "source port".
I used to think a lot on how software is written and had some really spicy discussions on doomworld. There are people telling quite interesting opinions on it and look back how we all enjoyed stuff then vs now.
This game is interested to work with from the technical stand point.
Once I stumbled across performance issues when mapping for Doom I started to learn on optimization techniques.
I said AI was used here but not too much, yet it allows to discover amazing details about the code, it's such a nice opportunity I had to compare codes of Doom, Duke3D, Quake, Descent and even Tomb Raider as these are disclosed, how things are working etc...
So one of the main problems of 90's 3D games were rendering optimization. All 4 games approached the subject differently.
Doom was the pioneer, the simplest and perhaps most efficient approach, raycast the scene, draw vertical spans (scanlines).
Duke3D went further - even though it introduced raycasted walls just like Doom, it took it further allowing for different texture colorations, scaling, flipping and coded in SIMD-alike approach (MMX, SSE and etc) when those instructions did not exist and worked on a 486. The latest version detects whether MMX instructions or other Pentiums 1, pro and 2 are present and applies a special optimization on TOP of that too. Duke3D also introduced vertical and horizontal sprites with varying transparencies, colors, angles, scales etc... but not just that - slopes. Slopes in Duke3D are drawn almost like perspective correct polygons 1/z fashion, just like quake but much faster as they set them up with entirely integer code and do inverse reciprocal multiplication on FPU which were becoming super-affordable with latest tech the 1996 game went out on (DX2-66, DX4-100, Pentiums), it was some sort of multithreading of 90's use both CPU and FPU to provide for crisper and smoother image. The bitter side of Duke3D is caching mechanism which I think adds some bit of lags but the game may play animation which makes it more "alive".
Doom, Duke and Descent would run and play on a 486-66MHz machines while Quake wouldn't, even on a DX4-100 it remained largely unplayable because it was coded specifically for 586. It was supposed to do a similar "multithreading" stuff similar to Duke3D but using FPU way more almost everywhere. The best optimization they did is that "d_subdiv16" that allows to increase performance by 10% when on, so division only occurs each 16th pixel of the screen and rest are interpolated. 586's FPU was really fast and float divisions were finished almost immediately and mixed to the integers but on a 486 it introduced stalls, so it had to wait while it was finished, making it slower. It supported CD music but didn't support general midi and opl which I think is a major disatvantage, didn't play animations too.
Descent texture mapper used an entirely integer approach doing perspective correct 1/z with sub-pixel shifting. It's just like quake but for earlier computers (386SX, 486SX), still works faster than Quake even on Pentiums. Descent also did real-time lighting and supported polygons with transparent textures (masked). All sorts of music playback, 6 degrees of freedom, turn arounds is nice, considering that it runs of shit.
There was another interesting game called "Terminal Velocity" - similar to Descent but taking place in big open worlds and in PCem it runs and plays quite nicely on a 486SX2-66 and as soon as there are no source codes we can't find this out very soon. But in 640x400 I can recognize similar "wavish" artifacts on steep surfaces just like those I see in Duke3D on slopes, maybe as soon as it's also the title released by 3D Realms they used something similar to Duke? This thing needs to get reverse engineered.
The summ of that is how much these guys could pull out from the hardware of the time.