Releases: Darkcrafter07/Duke07
Duke07 v0.24
v0.24 features (May 6, 2026):
- big 386 exe improvements;
- lots of scanlines alike artifacts fixed in resolutions different than
320x200, including portal rendering. Low detail (double low detail mode)
now works fine in D07LQ2X.EXE. Original viewscreen security cameras are
NOT fixed yet unfortunately; - 386 EXE bugfix: ceilscan_LQ2X and florscan_LQ2X functions now properly
render ceilings and floors if horizontal flat sprites are located there.
The older versions I did just didn't have proper SMC setup and a sprite
could override values in rendering causing those surfaces to rotate to
the same angle sprites are facing; - 386 EXE bug NOT fixed: drawsprite_LQ2X function still does NOT render
transluscent wall sprites like glasses, BE CAREFUL! - wrapper functions introduced to load both int/fpu slope rendering, also
eng386.c features way more of them to improve savegame stability but
that's experimental science yet;
Duke07 v0.23
v0.23 features (May 4, 2026):
- big sprite portal improvements:
- all portal sprites MUST have 384x384px dimensions in art files;
- portals are now shot-through by hitscans and projectiles, hitscans
are a subject to improve in the next release; - portals quality are now adjusted dynamicaly according to screen res:
192x192 for 320x200+, 384x384 for 640x400+, 512x512 for 800x600+; - portals now have more or less proper parallax inside so you can walk,
fly and jump around to see how the perspective changes almost as if they
were part of the map naturally; - teleportation code improved allowing you to stack them on top of each
other like building windows etc... - ONLY 8 portal pairs (e.g 16 portals tiles) are possible currently;
- monsters are still NOT teleported through portals - TODO;
- freezethrower projectile explodes on exit, you could try to increase
bounce amount in defs.con; - a.asm, alq2x.asm, alq3x.asm bug fix, replace "shr ebx, 32" to "shr ebx, 0
allowing to fix old bug that crashes the game with the portal code or on
big maps... - make "/nofpu" flag demo-savegame compatible with regular mode thanks to
new function "grouscan" that acts like a wrapper calling both
"grouscanfpu and grouscanint" and switching between them according to
"use_fpu" variable, so that it loads both functions in memory.
If "use_fpu" flag is set, it loads grouscanint and uses it for 1 ticks,
then swithces to grouscanfpu and vice versa, allowing for much better
demo-savegame memory footprint.
Duke07 v0.21b
v0.21 features (April 22, 2026):
-
first attempt to implement wall aligned sprite portals.
They're like 1-sided only but allow to connect any part of a map,
in any place, via sprite portal, forming a window passage. It was
developed really throughly to make sure they don't bog even systems
as old as 486SX too much and not cause errors and crashes.HOW to create them: select a tile #4096 (PORTAL0), put it anywhere in map,
make it flat (recommended) by placing a cursor at them and pressing "R",
you may align them to walls by pressing "O", hold shift and hold left
moust button and pull them slightly away from the wall so that it doesn't
get swolen by it. Then place a tile #621 (CAMERA1) in any place of a map
where you want this portal to show image from. Duplicate CAMERA1 and give
it a tile #5062 (PRTLTELEPDEST) - that's your teleport destination. The
engine makes both CAMERA1 and PRTLTELEPDEST that ARE LINKED to a portal
INVISIBLE.Give your portal a hitag that corresponds to a lotag of CAMERA1 and
PRTLTELEPDEST (yeah CAMERA1 and PRTLTELEPDEST are configured SAME WAY!).
For example, PORTAL(hitag:9970,lotag:0), CAMERA1(hitag:0,lotag9970),
PRTLTELEPDEST(hitag:0,lotag9970).
E.g, they're set just like security cameras and don't interfere with them
but make sure NOT to use a CAMERA1 sprite that is already connected to
any security camera. Get in 2D mode (NumPad ENTER), get cursor
over a sprite, press ALT+H to assign a hitag, enter a value, press reg-
-ular ENTER, then press ALT+T to assign a lotag, enter a value, press reg
-ular ENTER again.
At this time you can only create 1 PORTAL PAIR (PORTAL0 and PORTAL1), do
NOT use the same tile PORTAL0 for another side! Use PORTAL1 like that
PORTAL1(hitag:9971,lotag:0), CAMERA1(hitag:0,lotag9971),
PRTLTELEPDEST(hitag:0,lotag9971).Known limitations:
-
there's just ONE pair PORTAL0, PORTAL1, more to come;
-
low detail mode doesn't update picture in bottom left corner,
I don't know how to fix this yet. At least I could fix tilt! -
D07LQ2X still draws scanline tutti-frutti inside portals because
the asm routines are designed to draw 320x200 image, not 128x128.
The way to fix that would be externing "long ydim" in asm, load
that in a register and use instead of hardcoded "200" or whatever
value is there... -
parallax inside portals suck, it's a subject to improve.
-
PORTAL tiles MUST BE SQUARE dimensions like 128x128 (low quality),
192x192, 256x256 etc to work properly, there is NO way to fix that
because there is NO need to do that as you may still resize sprite
as you wish and it's not going to stretch contents inside. -
it's best to have the same sizes of sprites for one pair like
PORTAL0 and PORTAL1. In case it goes crazy, you'd delete and
create them again without copy pasting one another for best
stability.--- implementation details or how it works start ---
global.c
add new variables below "short camsprite":
short portalsprite0 = -1; short portalsprite1 = -1;
duke3d.h
extern those two new variables below "extern char env_music_fn[4][13];"
"extern short camsprite, portalsprite0, portalsprite1;"
actors.c:
for each PORTAL#x tile create a function that's gonna act like a trigger
to activate this particular PORTAL#x tile. movestandablesportal0(ID#128)
for PORTAL0 and movestandablesportal1(ID#129) for PORTAL1.
game.c
include "portals.c" file before displayrooms function, modify it as well
in order to call particular portal drawing functions as se40codeportal#x
and se40_DrawPortal#x and restore screen after them. Make a function
before "short spawn" - startspriteportal and call movestandablesportal0,
movestandablesportal1 inside. Modify function "domovethings" in order
to call "startspriteportal" function after "movefta();" call.
Modify function "short spawn" in order to include "PORTAL0 and PORTAL1"
actors to be included in this line "if( PN != SPEAKER && PN != LETTER..."
Place new cases on the new line like if(PN!=PORTAL0&&PN!=PORTAL1 etc),
if not done, portals are not going to activate drawing automatically.
In the same function "short spawn" extend T temp_data from 6 to 12...
like "T1=T2=T3=T4=T5=T6=T7=T8=T9=T10=T11=T12=0;" In the same function,
add "case PORTAL0, case PORTAL1" before or after "case VIEWSCREEN".
Modify "case CAMERA1-CAMERA4-CAMERAPOLE" to identify cameras linked to
portals and hide them. Also add "case PRTLTELEPDEST" to hide them too.
portals.c contains code to draw portals to their respectve tiles.
you can add it right in game.c before "displayrooms" but it was decided
to put them out in a separate file for an ease of coding. Make sure that
if you changed portals.c, you must delete "game.obj" before recompile,
otherwise the changes are not going to become.
sector.c. Modify function "void checksectors", the very beginning
of that function contains a code of portals to teleport player in 3D
space. That means it will not teleport you if you jump above it (made
specially to allow for better 3D like windows and doors place on facade
of multistory buildings). That makes it possible to stack many different
portals in the same X,Y space but different height so you can have
PORTAL0-1 pair on story #3 and PORTAL2-3 pair on story #4 for example
(I didn't implement more than 1 pair though). Make sure that this version
only teleports from a CENTER of a sprite, so that's a disatvantage I'm
looking forward to fix...
names.h, soundefs.h, user.con include new cases PORTAL0 4960,
PORTAL1 4961, PRTLTELEPDEST 5062.
engine.c, eng386.c. Modify "drawsprite and drawsprite_LQ2X" functs
in order to depict texture contents on flats sprites like parascan does
to floors and ceilings "parallax textures" but inside a trapezoid frame,
also known as a "wall aligned flat sprite". I'd like to do the same to
ground aligned sprites so that we could have holes in floors, ceilings.
--- implementation details or how it works finish --- -
Duke07 v0.20
Here comes my first Duke07 release for GitHub, v0.20 and the changelog is pretty long since the original game was modified:
===========================================================================
v0.20 features (April 11, 2026):
-
first, initial GitHub upload, forked from "videogamepreservation" archive
https://github.com/videogamepreservation/dukenukem3d; -
more stable and a bit faster integer slopes due to increased reciptables
size and newton-raphons krecip iterations instead of idiv to prevent
division by zero errors;
===========================================================================
v0.19 features (March 17, 2026, 01:30AM): -
integer slopes optimization via adaptive step size (32px for closeup,
16px for medium distances, 8px for distant slopes);
===========================================================================
v0.18 features (March 17, 2026, 01:30AM): -
much better integer slopes for all the versions included;
===========================================================================
v0.17 features: -
"distance-slow" optimization. Turn on by /distslow command-line parameter
allows to speed-up rendering on big open areas by rendering distant
areas 8 times less often. Causes rendering artifacts since simple
"drawalls" modification in engine. Both regular and 386 version are
bundled with it.
===========================================================================
v0.16 features: -
further enhancements of low detail mode, especially "drawsprite" function
doesn't introduce unwanted bending to the farthest bounds of a sprite,
e.g. no more crooked-mirror effect. Depth sorting issues and infinitely
tall repeating on sprites are now fixed, thus "trasmach4" pixel
duplicating asm function is now on. Transparent wall sprites aren't yet
rendered. -
mact386.bin diagonal mouse movement slowdown fixed. File mact386.lib
was patched with "Build Engine Mouse Fix v1.1" exe tool. No more need
to patch it when exe's are built because the mact386.lib itself changed.
The tool is made by "CTPAX" (fear, RUS.):
CTPAX@MAIL.RU, ctpax-cheater.losthost.org
===========================================================================
v0.15 features: -
the original game comes with its own y-parallax scrolling defined as
"parallaxyscale" in engine.c in "parascan" function and premap.c
"setupbackdrop" function. Setting it to 65535 does the trick, thus
I set my approach parallax scroll speed to 0 to disable it. So we have
nice original smooth parallax effect and height tracking parallax
per player. Also, my approach wasn't properly reset per level so that
I added "g_skyycuroffs" variable, initialized it to 0 and assigned
all sky cases offsets in premap.c. Each time a level is loaded, the
offset resets to those defined in premap.c per "g_skyycuroffs" value. -
an attempt to implement LQ3X mode was made. It looks even worse and
there's no speed gain unlike LQ2X mode, thus not compiled. Set "pxlzefctr"
variable to "3" in eng386.c, run "MakeLQ3.bat".
===========================================================================
v0.14 features: -
further enhancements on LQ2X mode, a lot has been done but there's
a room for improvements. Now that it works just as fast as ingame low
detail mode it looks crisper and much faster when window size is shrunk.
Unfortunately, the old default ingame mode is ineffective on little
windows size because it always renders a larger 160x100 view and then
stretches up or down the rendered view onto 320x200 screen and does
double job which makes the game perform slower. -
correct "bswap" 386 asm instructions by Tronix, so mirrors are ok
-
the way to fill unprocessed fields in asm has been found and unlike
left (-1, -2 etc.) or right (+1, +2 etc.) writes, there's a need to know
screen width in pixels. It could be done by loading "_xdim" variable in
asm functions but it's out of scope for the moment and "320" constant is
hardcoded. Read ALQ2X.ASM for details. Enabling transmach4 pixel doubling
logic brings the light on "drawsprite_LQ2X" function issues in eng386.c.
There's a need to polish it further. -
flat vertical sprites with transparency don't render yet.
===========================================================================
v0.13 features: -
an attempt to compile the game entirely for 386 with all code
and assembly refactored to do so (mostly bswap instruction replaced and
a different compilation path). Also, all occurences of "Nice try" in
eng386.c were commented out (disabled). -
an attempt to implement low detail like it's done in Doom. Duke3D does it
by rendering a 160x100 tile and then stretching it up to 320x200 by using
the same drawing functions that high detail mode does. It's pretty
ineffective. Now we want to do it like in doom, e.g. call to process
stuff like walls, floors, ceilings, sprites and sky twice as less but
interpolate the unprocessed fields. Only walls and skies are done correct
yet (skies use wallscan function to draw). -
it looks bad yet
===========================================================================
v0.12 features: -
finally an "interpolated" way to do slopes with /nofpu flag.
Ken's unfinished "slopevlin2" approach now renamed to #0.
"slopevlin" duplicated and now is #2 approach, has its own
precision parameters, and most importantly, simulateneous pixel writes
to the sides, allowing to "interpolate" only those columns that were
requested in grouscan_nonfpu function in engine.c, frame parity removed
for a while but the file is still there if you will - engaltgs.c.
The a.asm changes:; we now add this thing above mov [ebp-1], al ; Pixel to the left - 1 ;the original line below: mov [ebp], al ; Center Pixel ; we now add this thing beneathmov [ebp+1], al ; Pixel to the right + 1
you can iterate more to fill in the gaps
===========================================================================
v0.11 features:
-
up to 768000 bytes MIDI playback.
-
up to 10 custom 4-tile 256px width panoramic skies (defined
in DEFS.CON). Make sure for the names SKYCUSTOM1-SKYCUSTOM10
to stay the same. If you use a tile #3840, make sure you have
3 more tiles space left in your art file, e.g. #3841,3842,3843
must be free to fit remainig 3 parts of your sky.
===========================================================================
v0.1 features: -
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 ).
===========================================================================