First post, by Darkcrafter07
- Rank
- Newbie
Duke07 is perhaps my source port of Duke Nukem 3D for MS-DOS.
I came up with an idea to make this port accidentally after messing around original Duke Nukem 3D source code.
I'm a beginner at coding and after some more or less "successful" attempts to modify the original engine I realized it could be stacked all together.
I can't promise to work consistently on it as it's a hobby project. If that could help some people to have some fun - why not publish it?
Put Duke07.exe in a folder with Duke Nukem 3D Atomic Edition v1.4 or v1.5 is installed.
You may run it with a flag /nofpu like "Duke3D.exe /nofpu" to speed up rendering on
reall old and slow 386/486SX CPUs withot FPUs.
Features at the moment:
- y-sky parallax shearing based on player's look up/down and slopes if mouse aims off.
Player's height relative to the world is also tracked. Integer math only version turned on by default as floats are useless but the code without integer optimization is commented and included.
Must be done really wrong and is not very smooth.
- /nofpu command line parameter to speed up rendering on really old and slow 486 or even 386 CPUs without FPU.
At this moment I couldn't implement anything better than interleaved ticker dependent scanline alternation. In engine.c, basically only grouscan and drawalls functions are modified to handle different rendering paths. I can't modify this thing any further at the moment unfortunately.
- playanm function enhanced and now correctly removes played ANM files from the RAM (cache) via "suckcache(anim_t_internal);" command. Turns out, original Duke didn't do that at all because "free animation" command referenced to the one defined in animlib.c and it was commented out (disabled) for a good reason - it used John Carmack's zone.c hidden in "mact386.lib" memory handler which isn't compatible with Duke3D's cache1d.c system. All sounds are now stopped after animation is played.
- playanm_split function is present in the code, tested but unused. Can be used to split a large ANM file and play in one go, one after another and skipped by pressing Enter, Space or Escape just once. Messes up the palette a little-bit after the first animation was played. Unloads a played ANM file from RAM (cache) before playing another one in the sequence. Useful to play large anm files with as much lower RAM consumption as possible.
- animlib modifications to untie it from "mact386.lib" stuff with the same namespace. "_internal" suffix added to each of the functions.
- correct stop all sounds after a bonus screen ( finish level screen ).