Claim set · data/claims/duke3d.yaml

Duke Nukem 3D (3D Realms' source release, version 1.5)

Game: Duke Nukem 3D.

The Duke Nukem 3D source 3D Realms released on 2003-04-01 is version 1.5, the Atomic Edition: README.TXT calls it the "v1.5 CD Version" and "the complete source code for Duke Nukem 3D version 1.5", and the CON scripts in testdata/ call themselves part of "Duke Nukem 3D version 1.5 - Atomic Edition". duke3d/source-version

Value: 1.5

CodeDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · README.TXT#L2Duke Nukem 3D (v1.5 CD Version) Source Code Release - April 1, 2003Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · README.TXT#L11This is the complete source code for Duke Nukem 3D version 1.5, buildable as detailed in the next section.Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · testdata/USER.CON#L5This file is part of Duke Nukem 3D version 1.5 - Atomic EditionChecked by claude, 2026-10-22 — read README.TXT and the USER.CON header at the pinned commit

Every other claim here reads this code and these CON scripts. The 1.3D release and the console ports may differ wherever their code or scripts did.

Cited by: Duke Nukem 3D

Duke Nukem 3D schedules its timer with TS_ScheduleTask at a rate of TICRATE, 120, which the atlas reads as counts per second (the task manager's source isn't in the release), and faketimerhandler reads the player's input and queues one move every TICSPERFRAME counts, TICRATE/26, which integer division makes 4; domovethings runs once per queued move, so on that reading the game runs 30 tics a second (computed), where Doom runs 35. duke3d/tic-rate

About: Duke Nukem 3D Running

Value: 30 tics/s

CodeDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/DUKE3D.H#L92-L93#define TICRATE (120) #define TICSPERFRAME (TICRATE/26)Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAME.C#L106-L114void timerhandler() { totalclock++; } … TimerPtr = TS_ScheduleTask( timerhandler,TICRATE, 1, NULL );Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/TASK_MAN.H#L56task *TS_ScheduleTask( void ( *Function )( task * ), int rate,Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAME.C#L643-L652if ((totalclock < ototalclock+TICSPERFRAME) || (ready2send == 0)) return; ototalclock += TICSPERFRAME; … getinput(myconnectindex);Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAME.C#L659-L673if (movefifoend[myconnectindex]&(movesperpacket-1)) … movefifoend[myconnectindex]++; return; … movefifoend[myconnectindex]++;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAME.C#L7973-L7978while (movefifoend[myconnectindex]-movefifoplc > bufferjitter) … if( domovethings() ) return 1;DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/doomdef.h#L121-L122// State updates, number of tics / second. #define TICRATE 35Checked by claude, 2026-10-22 — read the defines, the timer setup, faketimerhandler's two paths (each queues one move), and the loop that runs domovethings per queued move; 120/26 is 4 in integer division, and 120/4 is 30

TICSPERFRAME also scales each tic's thrust in processinput (duke3d/thrust).

Cited by: Duke Nukem 3D

Duke Nukem 3D's pistol, shotgun, and chaingun are hitscan: shoot traces each shot with the Build engine's hitscan within the same call and spawns a SHOTSPARK1 sprite at the point hit, which carries the damage; the RPG instead spawns a rocket sprite with a velocity of 644. Doom's guns likewise trace a line with P_LineAttack in the tic they fire. duke3d/hitscan

About: Duke Nukem 3D Hitscan

CodeDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L481-L483case SHOTSPARK1: case SHOTGUN: case CHAINGUN:Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L546-L560hitscan(sx,sy,sz,sect, sintable[(sa+512)&2047], sintable[sa&2047], zvel<<6,&hitsect,&hitwall,&hitspr,&hitx,&hity,&hitz,CLIPMASK1); … k = EGS(hitsect,hitx,hity,hitz,SHOTSPARK1,-15,10,10,sa,0,0,i,4); sprite[k].extra = *actorscrptr[atwith];Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L796-L801case RPG: … vel = 644;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L843-L846j = EGS(sect, … sz-(1<<8),atwith,0,14,14,sa,vel,zvel,i,4);Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAME.C#L2994short EGS(short whatsect,long s_x,long s_y,long s_z,short s_pn,signed char s_s,signed char s_xr,signed char s_yr,short s_a,short s_ve,long s_zv,short s_ow,signed char s_ss)Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAME.C#L3021s->xvel = s_ve;DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/p_pspr.c#L625-L639P_GunShot … P_LineAttack (mo, angle, MISSILERANGE, bulletslope, damage);Checked by claude, 2026-10-22 — read shoot's case for the three guns through the spark it spawns, the RPG case to its EGS call, and EGS's signature and xvel line; Doom's P_GunShot

hitscan itself is Ken Silverman's engine code (ENGINE.OBJ in the release), so the atlas reads only its call.

Cited by: Duke Nukem 3D

Each shot a Duke Nukem 3D player fires from the pistol, shotgun, or chaingun carries the strength its actor declares in the CON script plus TRAND%6 (0 to 5): 6 to 11 for the pistol (SHOTSPARK1), 10 to 15 for each of the shotgun's 7 pellets, and 9 to 14 for the chaingun; a monster's shot carries the strength alone. Each bullet from Doom's pistol, chaingun, or shotgun deals 5, 10, or 15. duke3d/bullet-damage

About: Duke Nukem 3D Damage formula

Value
{
 "pistol": [
  6,
  11
 ],
 "shotgun": [
  10,
  15
 ],
 "chaingun": [
  9,
  14
 ]
}
CodeDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L557-L561if(p >= 0) { k = EGS(hitsect,hitx,hity,hitz,SHOTSPARK1,-15,10,10,sa,0,0,i,4); sprite[k].extra = *actorscrptr[atwith]; sprite[k].extra += (TRAND%6);Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L674-L675k = EGS(hitsect,hitx,hity,hitz,SHOTSPARK1,-15,24,24,sa,0,0,i,4); sprite[k].extra = *actorscrptr[atwith];Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAMEDEF.C#L849-L881scriptptr--; parsing_actor = scriptptr; … actorscrptr[*scriptptr] = parsing_actor; … *(parsing_actor+j) = *(scriptptr-1);Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · testdata/GAME.CON#L3165-L3166actor CHAINGUN CHAINGUN_WEAPON_STRENGTH enda actor SHOTGUN SHOTGUN_WEAPON_STRENGTH endaDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · testdata/GAME.CON#L3200actor SHOTSPARK1 PISTOL_WEAPON_STRENGTH WEAP2FRAMESDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · testdata/USER.CON#L148define PISTOL_WEAPON_STRENGTH 6Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · testdata/USER.CON#L163-L164define SHOTGUN_WEAPON_STRENGTH 10 define CHAINGUN_WEAPON_STRENGTH 9Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L3647-L3650case PISTOL_WEAPON: if( (*kb)==1) { shoot(pi,SHOTSPARK1);Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L3690-L3702case SHOTGUN_WEAPON: … if(*kb == 4) { shoot(pi,SHOTGUN); shoot(pi,SHOTGUN); shoot(pi,SHOTGUN); shoot(pi,SHOTGUN); shoot(pi,SHOTGUN); shoot(pi,SHOTGUN); shoot(pi,SHOTGUN);Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L3759shoot(pi,CHAINGUN);DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/p_pspr.c#L625-L639P_GunShot … damage = 5*(P_Random ()%3+1);Checked by claude, 2026-10-22 — read shoot's player and monster branches, how GAMEDEF stores an actor's first number (its strength) at the start of its script, the three actor lines in GAME.CON and the defines in USER.CON, and the weapon code that calls shoot (seven SHOTGUN calls on frame 4); Doom's P_GunShot

TRAND is krand(), the Build engine's generator (DUKE3D.H). A target loses 1 less than the shot carries when it is hit once in a tic (duke3d/pending-damage), so a lone pistol shot takes 5 to 10 from a monster, close to Doom's 5, 10, or 15. The strengths are CON values, so a modified USER.CON changes them without touching the C code.

Cited by: Duke Nukem 3D

A Duke Nukem 3D sprite's pending damage (hittype[].extra) is set to −1 when the sprite is created and again each time ifhitbyweapon takes it; a shot that checkhitsprite handles in its default branch adds its damage to the pending total, and ifhitbyweapon subtracts the total from the target's health, so a target hit once between checks loses 1 less than the shot carries, and several hits between checks take 1 less than their sum (computed). An explosion's hitradius sets the pending damage outright for the targets it rolls for, so those lose the full roll. duke3d/pending-damage

About: Duke Nukem 3D Damage formula

Value: -1

CodeDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAME.C#L3038hittype[i].extra = -1;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAME.C#L3143hittype[i].extra = -1;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/SECTOR.C#L2329-L2335if( sprite[i].statnum != 2 ) { … hittype[i].picnum = sprite[sn].picnum; hittype[i].extra += sprite[sn].extra;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/ACTORS.C#L994-L1018short ifhitbyweapon(short sn) … if( hittype[sn].extra >= 0 ) … npc->extra -= hittype[sn].extra;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/ACTORS.C#L1063-L1073npc->extra -= hittype[sn].extra; … hittype[sn].extra = -1; return hittype[sn].picnum; … hittype[sn].extra = -1;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/ACTORS.C#L538-L541if ( d < r/3 ) { if(hp4 == hp3) hp4++; hittype[j].extra = hp3 + (TRAND%(hp4-hp3));Checked by claude, 2026-10-22 — read EGS and spawn's initial values, checkhitsprite's default branch through the +=, both of ifhitbyweapon's subtractions and its two resets, and hitradius's assignments; a sleeping actor (list 2) moves to list 1 a few lines before the += (L2321-L2325), so it takes the += too

Actors check for hits through the CON command ifhitweapon (GAMEDEF.C calls ifhitbyweapon), and the player's code calls it too. Special sprites that checkhitsprite handles in their own cases (breakable objects and the like) don't reach the default branch. The atlas found no comment or documentation calling the −1 deliberate.

Cited by: Duke Nukem 3D

A Duke Nukem 3D player's shotgun and chaingun turn every shot by 16-(TRAND&31), −15 to +16 of the 2,048 angle units in a turn (up to about 2.8°, computed), and add 128-(TRAND&255) to its vertical speed, with or without an autoaim target; the pistol does both only when autoaim found none, so a pistol shot at an autoaim target flies straight to it. Doom's shotgun turns each of its 7 pellets by up to about 5.6°. duke3d/shot-spread

About: Duke Nukem 3D Hitscan

Value: 2.8 °

CodeDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L489j = aim( s, AUTO_AIM_ANGLE );Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L511-L525if(atwith == SHOTSPARK1) { if(j == -1) { sa += 16-(TRAND&31); zvel = (100-ps[p].horiz-ps[p].horizoff)<<5; zvel += 128-(TRAND&255); } } else { sa += 16-(TRAND&31); …Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L546-L548hitscan(sx,sy,sz,sect, sintable[(sa+512)&2047], sintable[sa&2047],DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/p_pspr.c#L626-L639( mobj_t* mo, boolean accurate ) … if (!accurate) angle += (P_Random()-P_Random())<<18;DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/p_pspr.c#L684-L687P_BulletSlope (player->mo); … for (i=0 ; i<7 ; i++) P_GunShot (player->mo, false);Checked by claude, 2026-10-22 — read shoot's player branch; angles index sintable with &2047 and a quarter turn is +512, so a turn is 2,048 units, and 16 units is 16/2048 × 360° = 2.81°; Doom's P_GunShot and A_FireShotgun

The roll's range is uneven by one unit (−15 to +16). Monsters' bullets turn by 32-(TRAND&63), twice as wide (L536). The vertical jitter is in the units of zvel, which hitscan takes shifted left by 6.

Cited by: Duke Nukem 3D

When a Duke Nukem 3D player fires the pistol, shotgun, or chaingun, aim looks for a target within AUTO_AIM_ANGLE, 48 of 2,048 angle units (about 8.4°, computed), to either side of the facing; of those in sight, more than 512 along the facing, and with a height difference over that distance (scaled by 10) within 100 of the view's pitch, it takes the nearest along the facing, searching the sprite lists 10, 13, 1, and 2 in that order and stopping at the first list with a match, and skipping fellow players in co-op. The shot then turns to the target's angle (getangle) and takes the slope to a point ((xrepeat × tile height) << 1) + (5 << 8) above the target's z. Doom's P_BulletSlope traces only straight ahead and 5.625° to each side, and its bullet keeps the player's facing. duke3d/autoaim

About: Duke Nukem 3D Autoaim

Value: 8.4 °

CodeDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/DUKE3D.H#L62#define AUTO_AIM_ANGLE 48Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L204-L227short aim(spritetype *s,short aang) … short aimstats[] = {10,13,1,2}; … dx1 = sintable[(a+512-aang)&2047]; dy1 = sintable[(a-aang)&2047]; dx2 = sintable[(a+512+aang)&2047]; dy2 = sintable[(a+aang)&2047];Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L230-L246for(k=0;k<4;k++) { if( j >= 0 ) break; … if( PN == APLAYER && … ud.coop == 1 && s->picnum == APLAYER && s != &sprite[i]) continue;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L273-L291if( (dy1*xv) <= (dx1*yv) ) if( ( dy2*xv ) >= (dx2*yv) ) { sdist = mulscale(dx3,xv,14) + mulscale(dy3,yv,14); if( sdist > 512 && sdist < smax ) { if(s->picnum == APLAYER) a = (klabs(scale(SZ-s->z,10,sdist)-(ps[s->yvel].horiz+ps[s->yvel].horizoff-100)) < 100); … if( a && cans ) { smax = sdist; …Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L489-L508j = aim( s, AUTO_AIM_ANGLE ); if(j >= 0) { dal = ((sprite[j].xrepeat*tilesizy[sprite[j].picnum])<<1)+(5<<8); … zvel = ( ( sprite[j].z-sz-dal )<<8 ) / ldist(&sprite[ps[p].i], &sprite[j]) ; sa = getangle(sprite[j].x-sx,sprite[j].y-sy);DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/p_pspr.c#L601-L619void P_BulletSlope (mobj_t* mo) … an = mo->angle; bulletslope = P_AimLineAttack (mo, an, 16*64*FRACUNIT); … an += 1<<26; … an -= 2<<26;DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/p_pspr.c#L626-L639( mobj_t* mo, boolean accurate ) … angle = mo->angle; … P_LineAttack (mo, angle, MISSILERANGE, bulletslope, damage);Checked by claude, 2026-10-22 — read aim through its return and shoot's use of the target for the three guns; 48/2048 × 360° = 8.44°; Doom's P_BulletSlope and P_GunShot

Build's z grows downward, so subtracting dal from the target's z aims above its base. List 10 holds players (hitradius and checkhitsprite treat statnum 10 as a player), and a hit moves an actor from list 2 to list 1 with a timetosleep, so the atlas reads 1 as awake actors and 2 as dormant ones; what list 13 holds isn't settled here. Outside co-op the search can lock onto another player before any monster. The aim-mode check that would turn autoaim off is commented out (L215), and the shrinker and freezer skip some targets. The RPG calls aim(s, 48) as well (L807).

Cited by: Autoaim, Duke Nukem 3D, Perfect Dark

A Duke Nukem 3D keyboard sets the forward and side moves to 40 walking or 80 running (NORMALKEYMOVE), each clamped apart to ±90 (MAXVEL, MAXSVEL); getinput turns the pair by the facing, and each tic processinput adds it to the player's velocity times TICSPERFRAME (4) and 64, doubled while steroids last and the jetpack is off, in the air as on the ground. A hard landing and a few other actions zero the velocity instead. Doom thrusts only on the floor, with moves of 25 or 50 forward and 24 or 40 sideways. duke3d/thrust

About: Duke Nukem 3D Running

Value
{
 "walk": 40,
 "run": 80,
 "cap": 90
}
CodeDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L1771-L1773#define NORMALKEYMOVE 40 #define MAXVEL ((NORMALKEYMOVE*2)+10) #define MAXSVEL ((NORMALKEYMOVE*2)+10)Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L1913-L1923if (running) { turnamount = NORMALTURN<<1; keymove = NORMALKEYMOVE<<1; } else { turnamount = NORMALTURN; keymove = NORMALKEYMOVE; }Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L1974-L1983if ( BUTTON(gamefunc_Move_Forward) ) vel += keymove; … if(vel < -MAXVEL) vel = -MAXVEL; if(vel > MAXVEL) vel = MAXVEL; if(svel < -MAXSVEL) svel = -MAXSVEL; if(svel > MAXSVEL) svel = MAXSVEL;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L2004-L2014momx = mulscale9(vel,sintable[(daang+2560)&2047]); momy = mulscale9(vel,sintable[(daang+2048)&2047]); … momx += mulscale9(svel,sintable[(daang+2048)&2047]); momy += mulscale9(svel,sintable[(daang+1536)&2047]); … loc.fvel = momx; loc.svel = momy;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L2603doubvel = TICSPERFRAME;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L3002-L3013if ( p->fist_incs || p->transporter_hold > 2 || p->hard_landing || p->access_incs > 0 || p->knee_incs > 0 || … doubvel = 0; p->posxv = 0; p->posyv = 0;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L3117if ( p->posxv || p->posyv || sync[snum].fvel || sync[snum].svel )Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L3156-L3160if(p->jetpack_on == 0 && p->steroids_amount > 0 && p->steroids_amount < 400) doubvel <<= 1; … p->posxv += ((sync[snum].fvel*doubvel)<<6); p->posyv += ((sync[snum].svel*doubvel)<<6);DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/p_user.c#L156-L164// Do not let the player control movement // if not onground. onground = (player->mo->z <= player->mo->floorz); … if (cmd->forwardmove && onground) P_Thrust (player, player->mo->angle, cmd->forwardmove*2048);DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/g_game.c#L175-L176fixed_t forwardmove[2] = {0x19, 0x32}; fixed_t sidemove[2] = {0x18, 0x28};Checked by claude, 2026-10-22 — read getinput from the run switch to the world-space move, and processinput from doubvel's set through the thrust; the block that adds it (L3117-L3191) has no ground check, and the only jump past it before L3117 is the crane's (L2622-L2623); Doom's P_MovePlayer and the move tables

A mouse adds to the same moves before the clamp, so it can reach 90 where the keyboard's run gives 80. The move is turned into world axes in getinput, so fvel and svel in the sync packet are x and y, not forward and side. The thrust is in velocity units that the no-clip path divides by 16,384 to move (L3204-L3205), and its size in map units also needs the Build engine's sine table, which isn't in the GPL code, so the atlas leaves the speed in map units uncomputed.

Cited by: Duke Nukem 3D

After the thrust, Duke Nukem 3D multiplies the player's velocity each tic by dukefriction, which the CON's gamestartup sets from RUNNINGSPEED, 53,200 of 65,536 (0.812; the C default is 0xcc00, 0.797): 0x2000 less when kicking or crouching on the ground, 0x1400 less underwater, and three quarters of it again while shrunk; the velocity drops to 0 once both axes are under 2,048. A steady run moves 4.31 times the per-tic thrust (0.812 / 0.188, computed), and a released run falls under half its speed within 4 tics (computed). Doom keeps 0.90625 of its momentum each tic. duke3d/friction

About: Duke Nukem 3D Running

Value: 0.812 ×/tic

CodeDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GLOBAL.C#L156long myhorizbak[MOVEFIFOSIZ],dukefriction = 0xcc00, show_shareware;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · testdata/USER.CON#L112define RUNNINGSPEED 53200Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · testdata/USER.CON#L134-L136gamestartup DEFAULTVISIBILITY GENERICIMPACTDAMAGE MAXPLAYERHEALTH STARTARMORHEALTH RESPAWNACTORTIME RESPAWNITEMTIME RUNNINGSPEED GRAVITATIONALCONSTANT RPGBLASTRADIUSDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAMEDEF.C#L105"gamestartup", // 60Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAMEDEF.C#L1328-L1354case 60: j = 0; while(j < 30) … case 6: dukefriction = *scriptptr;break;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L1833loc.bits |= BUTTON(gamefunc_Crouch)<<1;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L3162-L3190if( ( p->curr_weapon == KNEE_WEAPON && *kb > 10 && p->on_ground ) || ( p->on_ground && (sb_snum&2) ) ) { p->posxv = mulscale(p->posxv,dukefriction-0x2000,16); … if(psectlotag == 2) { p->posxv = mulscale(p->posxv,dukefriction-0x1400,16); … p->posxv = mulscale(p->posxv,dukefriction,16); … if( abs(p->posxv) < 2048 && abs(p->posyv) < 2048 ) p->posxv = p->posyv = 0; …Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L3193-L3205HORIZONLY: … p->posx += p->posxv>>14; p->posy += p->posyv>>14;DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/p_mobj.c#L111-L112#define STOPSPEED 0x1000 #define FRICTION 0xe800Checked by claude, 2026-10-22 — read the default, the gamestartup keyword (index 60) and its seventh number, USER.CON's call, and processinput's friction through the shrink case; the move happens after friction (HORIZONLY), so a steady velocity v solves v = (v + a) × 0.812, giving v = 4.31a, and 0.812^4 = 0.43; Doom's FRICTION

psectlotag 2 is the underwater sector tag (water's own code uses it for the slower turn, L3021). Kicking means the knee weapon past frame 10 on the ground. 2,048 velocity units are 1/8 map unit a tic on the no-clip path's scale. Doom's steady run is figured before its friction step (doom/run-speed), so the two games' multiples of thrust don't compare directly; the per-tic factors and the tic rates (30 against 35) do.

Cited by: Duke Nukem 3D

Duke Nukem 3D clamps the forward and side moves apart and adds them as perpendicular pushes, so running forward (80) while running sideways (80) gives √2 ≈ 1.41 times the forward run alone (computed); holding the strafe modifier with a turn key and a strafe key together reaches the side move's cap of 90, about 1.51 times. Doom's diagonal run, 50 forward and 40 sideways, is 1.28 times its forward run. duke3d/strafe-running

About: Duke Nukem 3D Strafe-running

Value: 1.41 ×

CodeDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L1925-L1934if (BUTTON(gamefunc_Strafe)) { if ( BUTTON(gamefunc_Turn_Left)) { svel -= -keymove; } if ( BUTTON(gamefunc_Turn_Right)) { svel -= keymove;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L1965-L1983if ( BUTTON( gamefunc_Strafe_Left ) ) svel += keymove; … if ( BUTTON(gamefunc_Move_Forward) ) vel += keymove; … if(vel > MAXVEL) vel = MAXVEL; … if(svel > MAXSVEL) svel = MAXSVEL;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/PLAYER.C#L2004-L2008momx = mulscale9(vel,sintable[(daang+2560)&2047]); momy = mulscale9(vel,sintable[(daang+2048)&2047]); … momx += mulscale9(svel,sintable[(daang+2048)&2047]); momy += mulscale9(svel,sintable[(daang+1536)&2047]);DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/p_user.c#L160-L164if (cmd->forwardmove && onground) P_Thrust (player, player->mo->angle, cmd->forwardmove*2048); … if (cmd->sidemove && onground) P_Thrust (player, player->mo->angle-ANG90, cmd->sidemove*2048);DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/g_game.c#L175-L176fixed_t forwardmove[2] = {0x19, 0x32}; fixed_t sidemove[2] = {0x18, 0x28};Checked by claude, 2026-10-22 — read getinput's strafe and move keys, the clamps, and the turn into world axes (the side move uses the sine a quarter turn behind the forward move's, so the two are perpendicular); √(80² + 80²) / 80 = 1.414 and √(80² + 90²) / 80 = 1.505; Doom's thrust and move tables

Friction scales both axes alike (duke3d/friction), so the ratio of thrusts is the ratio of steady speeds. A strafe modifier with a turn key adds the run's 80, and Strafe_Left adds 80 more, so the sum 160 clamps to 90.

Cited by: Duke Nukem 3D, Strafe-running

A Duke Nukem 3D pipe bomb that goes off passes its strength, 140 (HANDBOMB_WEAPON_STRENGTH), to hitradius with the radius PIPEBOMBRADIUS, 2,500; each sprite in lists 1, 6, 10, or 12 (not flammable) with extra of 0 or more that is a tripbomb, a monster (badguy), a QUEBALL, a STRIPEBALL, a DUKELYINGDEAD, or solid (cstat&257), within that dist and in sight of the blast, takes 105 to 139 inside a third of the radius, 70 to 104 inside two thirds, and 35 to 69 beyond: three quarters, a half, or a quarter of the strength plus TRAND modulo the next band's gap, 35 (computed). A monster in sprite list 2, which the hit wakes into list 1, goes through checkhitsprite instead unless a sight test at a random height fails, and loses 139 at any distance in the radius, the bomb's 140 added to its pending −1; a bomb set off by a hit first loses that hit's damage from its strength. A Doom rocket's blast falls off linearly, 128 minus the distance. duke3d/pipebomb-blast

About: Duke Nukem 3D Damage formula

Value
{
 "inner": [
  105,
  139
 ],
 "middle": [
  70,
  104
 ],
 "outer": [
  35,
  69
 ]
}
CodeDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · testdata/USER.CON#L127define PIPEBOMBRADIUS 2500Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · testdata/USER.CON#L149define HANDBOMB_WEAPON_STRENGTH 140Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · testdata/GAME.CON#L3168actor HEAVYHBOMB HANDBOMB_WEAPON_STRENGTH endaDuke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAMEDEF.C#L1358case 9:pipebombblastradius = *scriptptr;break;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/GAME.C#L3048-L3050if( actorscrptr[s_pn] ) { s->extra = *actorscrptr[s_pn];Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/ACTORS.C#L3988-L3998if(t[3] == 0 ) { j = ifhitbyweapon(i); if(j >= 0) { t[3] = 1; … goto DETONATEB;Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/ACTORS.C#L4076-L4093DETONATEB: … x = s->extra; … case HEAVYHBOMB: m = pipebombblastradius;break; … hitradius( i, m,x>>2,x>>1,x-(x>>2),x);Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/ACTORS.C#L486-L506q = -(16<<8)+(TRAND&((32<<8)-1)); … if( x == 0 || x >= 5 || AFLAMABLE(sj->picnum) ) { … if( dist( s, sj ) < r ) { if( badguy(sj) && !cansee( sj->x, sj->y,sj->z+q, sj->sectnum, s->x, s->y, s->z+q, s->sectnum) ) goto BOLT; checkhitsprite( j, i ); … else if( sj->extra >= 0 && sj != s && ( sj->picnum == TRIPBOMB || badguy(sj) || sj->picnum == QUEBALL || sj->picnum == STRIPEBALL || (sj->cstat&257) || sj->picnum == DUKELYINGDEAD ) )Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/ACTORS.C#L433char statlist[] = {0,1,6,10,12,2,5};Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/ACTORS.C#L519-L523if(sj->picnum == APLAYER) sj->z -= PHEIGHT; d = dist( s, sj ); if(sj->picnum == APLAYER) sj->z += PHEIGHT; … if ( d < r && cansee( sj->x, sj->y, sj->z-(8<<8), sj->sectnum, s->x, s->y, s->z-(12<<8), s->sectnum) )Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/ACTORS.C#L536-L552if(s->picnum != SHRINKSPARK) { if ( d < r/3 ) { if(hp4 == hp3) hp4++; hittype[j].extra = hp3 + (TRAND%(hp4-hp3)); } else if ( d < 2*r/3 ) { if(hp3 == hp2) hp3++; hittype[j].extra = hp2 + (TRAND%(hp3-hp2)); } …Duke Nukem 3D: 3D Realms' source release (version 1.5, 2003) · source/SECTOR.C#L2282-L2335if( badguy(&sprite[i]) == 1) … if(sprite[i].statnum == 2) { changespritestat(i,1); hittype[i].timetosleep = SLEEPTIME; } … if( sprite[i].statnum != 2 ) … hittype[i].extra += sprite[sn].extra;DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/p_enemy.c#L1598-L1600void A_Explode (mobj_t* thingy) { P_RadiusAttack ( thingy, thingy->target, 128 );DOOM: the Linux source release (id-Software/DOOM, linuxdoom-1.10) · linuxdoom-1.10/p_map.c#L1180-L1194dist = dx>dy ? dx : dy; dist = (dist - thing->radius) >> FRACBITS; … P_DamageMobj (thing, bombspot, bombsource, bombdamage - dist);Checked by claude, 2026-10-22 — read the pipe bomb's hit check and detonation, hitradius's sprite loop and bands, the strength and radius in the CON scripts, and how spawning copies an actor's strength into extra; with x = 140 the bands start at 35, 70, and 105, each gap is 35, and r/3 and 2r/3 are 833 and 1,666; Doom's A_Explode and PIT_RadiusAttack

The list-2 path follows from statlist[5] being 2, the x >= 5 test, and checkhitsprite's default branch, which wakes a monster in list 2 and then adds the bomb sprite's own extra (140) to its pending damage, so it loses 139; a non-monster still in list 2 skips the add (duke3d/pending-damage); the atlas reads list 2 as dormant actors and hasn't measured this in play. The random height q offsets that path's sight test. A player is measured from a point PHEIGHT above its sprite. The RPG, mortar, and bounce mine use the same split with their own strength and radius.

Cited by: Duke Nukem 3D