Difference between revisions of "Duke Nukem 3D/Game Mechanics and Glitches"

From SDA Knowledge Base

Jump to: navigation, search
(+added "Shrink Ray vs. the Mini Battlelord / Understanding Enemy Collision Areas" section, based on Youtl's suggestion and LLCoolDave's explanation)
m (+small edit: better description of the Mini Battlelord shrink bug)
Line 289: Line 289:
 
The Mini Battlelord is such a large sprite that if the Shrink Ray hits most areas of its body (including the auto-aim target), the Shrink Ray blast radius will be too far away and will not intersect the Mini Battlelord's collision area.<br />
 
The Mini Battlelord is such a large sprite that if the Shrink Ray hits most areas of its body (including the auto-aim target), the Shrink Ray blast radius will be too far away and will not intersect the Mini Battlelord's collision area.<br />
 
Because of this, the Mini Battlelord can be difficult to shrink, unless the shot is aimed close to its feet.<br />
 
Because of this, the Mini Battlelord can be difficult to shrink, unless the shot is aimed close to its feet.<br />
Note that there is a useful glitch: any Mini Battlelord that has been shrunk will continue to not attack even after returning to normal size (until it is shot again and re-activated).<br />
+
<br />
 +
Note that there is a useful glitch: any Mini Battlelord that has been shrunk will continue to not attack even after returning to normal size (until it is hit with enough explosives and re-activated).<br />
 +
While the Mini Battlelord is in this state, its collision area will be basically non-existent -- auto-aim will no longer target them and hitscan weapons will not hit them.<br />
 
<br />
 
<br />
 
Additionally, it is useful to note that enemies will take more damage from explosives when the explosion is closer to their collision area's origin.<br />
 
Additionally, it is useful to note that enemies will take more damage from explosives when the explosion is closer to their collision area's origin.<br />

Revision as of 14:48, 8 June 2014

Movement

Strafe-40 and Strafe-50

Similarly to Doom, Duke3D handles Duke's movement such that strafe running (forward/backward + strafing), a.k.a. Strafe-40, causes Duke to move faster.
Again similarly to Doom, Duke3D also allows for Duke to run even faster by double strafe running, a.k.a. Strafe-50.
This can be performed by holding down forward/backward + strafe + the strafe-on modifier (typically alt) + a turn key.
These techniques are named after the Doom strafe running techniques -- the 40 and 50 in the names refer to Doom engine units, not Build engine units.
In 1.3D and 1.5 (and presumably also 1.4), you cannot turn while the strafe-on modifier is held -- even mouse horizontal movement will strafe instead of turning.
In the Megaton Edition, the strafe-on modifier does not affect mouse turning. Thus, strafe-50 is no longer limited to mainly running in straight lines.
Strafe-50 can now be curved and weaved around corners without alternating w/ strafe-40, and can also be performed more easily and consistently for long periods of time.
This is especially true if one remaps the control buttons so that there is no need to release the mouse in order to press the turn keys.

Underwater Swimming Movement

Swimming underwater causes Duke to move more slowly than swimming above the water's surface.
Submerged, Duke moves somewhere between 1.4 and 1.5 times slower than he would at the water's surface (tested in version 1.3D).
Using steroids does not appear to change this speed multiplier (i.e. Duke will still move slower underwater while on steroids than at the water's surface while on steroids).

Jetpack Movement and Steroids

Jetpack movement is very similar to underwater swimming movement in Duke3D, but there are some differences.
Unlike swimming underwater, using a jetpack does not usually hinder horizontal movement speed.
Note though, jetpack movement hinders steroid movement speed.
For this reason, it can be useful to let Duke fall in order to allow him to move faster horizontally.
If a certain elevation is required, Duke's jetpack can be toggled on and off while using steroids to achieve a slightly faster movement speed.
Additionally, it is worth noting that Duke cannot submerge into water if he has his jetpack turned on, but he is able to surface from underwater while using a jetpack.

Full-Height Jump from Water

Jumping after surfacing from water with the correct momentum, especially while moving into sector boundaries, will cause Duke to jump out of the water w/ a full-height jump instead of simply bobbing at the surface of the water.
Movement on the surface of the water can cause Duke3D to realize Duke is in water and reset his jump to bobbing.
For this reason, hammering jump to catch an early frame after surfacing can improve the chances of a successful full-height jump.
In Duke 1.3D, full-height jumps from water were automatic, as Duke would automatically jump upon surfacing.
Additionally, it has been observed in 1.3D that Duke can very rarely glitch and become stuck on top of the water, unable to submerge until he makes a full-height jump.
It is unknown whether the "unable to submerge" glitch has been fixed in later versions, potentially as part of the other water movement changes.

Video tutorial:
http://www.youtube.com/watch?v=iqQ3pbVYc3I

Safety Falls

Stair-stepping causes fall damage to be avoided.
If you are falling a long distance, moving into a ledge such that you collide with its corner and stair-step onto it can save you from taking any damage.

Hazards

The Void of Space

If Duke enters a sector tagged as having no atmosphere, Duke will immediately die.
This can be seen in 1-8 Dark Side by clipping out of the dome immediately by the starting area.
Originally, before leaving any space craft or station, Duke was supposed to require a Space Suit (which functioned similarly to scuba gear), but this idea was scrapped.
This means that any sector tagged as having no atmosphere is usually untraversable.

Clipping

Projectile Clipping

Projectiles fired along certain lines while Duke spans multiple sectors can be forced to pass through walls.
This can be useful to trigger explosives or destruction that can open up areas and allow skipping segments of levels.
Missing the proper setup to clip explosive projectiles typically leads to Duke's demise.

Pipebomb Clipping

In addition to the ability to throw pipebombs through small cracks and openings, pipebombs can be pushed through certain solid walls (particularly those which are child sectors).
When Duke is tight against a wall, he can drop a pipebomb through the wall if it is thrown without any velocity.
There appears to be multiple methods available to accomplish this:

  • after beginning to throw the pipebomb, crouch or uncrouch just as the pipebomb is being placed
  • crouch and aim at a slight angle up
  • rapidly hammer the fire button

In the original 1.3D release, pipebombs could also be thrown through extremely thick walls into neighbouring sectors if thrown w/ the proper angle to the wall.

Water Surfacing Clip

Duke3D expects that there will be enough vertical and horizontal space in a sector above an underwater sector to safely house Duke.
If there is not, Duke will typically immediately die upon surfacing.
This behaviour is potentially the cause of the somewhat useful clip out of water in 2-1 Spaceport through the force-fields at the bottom of the Red Key chute.

Landing Crouch Jump (also known as Jump/Duck/Jump)

By crouch jumping while landing from a jump or fall in the direction of a small opening,
Duke can slide into vertical spaces smaller than he should normally be able to move into.

Small Ledge Push

Duke's collision resolution while on small ledges is volatile.
If Duke crouch jumps while moving towards a wall while on a small ledge, Duke will clip into the wall, and potentially through it into a neighbouring sector.
When Duke is forcing against a wall while on a small ledge, Duke will be pushed backward a small amount without forcing him back so far as to knock him off the ledge.
This causes Duke to visibly jitter backwards and forwards while the movement keys are held.
This jitter is related to two clipping bugs in Duke3D, and its presence is an indicator that a clip (or imminent squash death) may be possible.
A ledge must be smaller than 224 build units for Small Ledge Pushes to be possible on it.

Large Ledge Push

Large Ledge Pushes are completed by crouch jumping while landing from a jump or fall during which the corner of Duke's hitbox collides perfectly into the corner between a wall and the surface of a ledge.
A ledge must be smaller than 320 build units for Large Ledge Pushes to be possible on it.
Large Ledge Pushes allow for Duke to clip through thicker walls than a Small Ledge Push would allow.
Performing Large Ledge Pushes while applying strafe-40 allows Duke to clip through walls of sizes 64 build units or less.
It appears to be possible to perform a large ledge push on ledges smaller than 224 build units, but if the large ledge push is missed, this can easily prove fatal depending on the wall thickness (as a Small Ledge Push will typically occur instead on improper landing).
When attempting a Large Ledge Push, you will know if you are close to achieving one if Duke does not make a sound on landing.

Overhang Fall Damage Push (Megaton Only)

In the Megaton Edition, if Duke slides past an overhang while falling and takes fall damage upon landing, he can crouch jump during the landing to clip through some walls.
Similarly to the Shrink Ray Clip, this appears to be limited to doorways (particularly vertically opening ones) and certain sprite barriers (like grates).
This may be related to Duke's vertical velocity upon landing -- sometimes, if Duke is not falling far enough, he may not be able to clip even while taking fall damage.

Shrink Ray Clip

When Duke is shrunk using a Shrink Ray, Duke can toggle on and off crouching and force himself into normally impassable doorways and certain sprite barriers (like grates).
Because Duke's movement speed is significantly reduced when shrunk, this often results in clipping into walls and dieing.
While unshrinking, Duke can still perform this clip.
If Duke waits until he begins to return to normal size or uses Steroids, his movement speed will be faster during unshrinking, allowing him to clip through thicker doorways.

Generic Clip

When Duke is forced with proper momentum into force-fields, small sectors, between walls, against slopes, and into corners and seams, Duke will sometimes clip through them.
Many clips can be affected by Duke's sector to sector movement immediately prior -- some clips seem to be easier to perform if Duke has just immediately entered the sector where the clip will be attempted.
Although these generic clips do not necessarily fit in w/ or look like the other clips documented here, they appear to share similar preconditions and prerequisites.

Clips and Movement Speed

Movement speed affects the thickness of wall that Duke can clip through.
In order to survive clips through thicker walls (or underwater walls), using some combination of strafe-40/50, steroids, and/or the knockback of explosives may be necessary.

Acute Corner Glide

When a sector's walls form an acute angle, Duke can be forced slightly into spaces horizontally smaller than he should normally be able to move into.
This is performed by moving towards the corner and slowly rotating Duke's aim.
Eventually, when the correct angle is met, Duke will suddenly slide a small amount into the corner.
If you continue to rotate, and slide against the other wall a small amount out of the corner, you will still maintain a position slightly out from where you normally should be.
Returning back in the other direction and doing the same rotation, will allow you to force yourself even deeper into the corner.
This can force Duke into the wall and can allow Duke to clip into neighbouring sectors.
If the corner area Duke resides in is small enough, Duke will begin to exhibit a similar jittering back and forth as he does on small ledges.
In this case though, the jittering and clip probably owe significantly to the fact the two walls of the acute angled corner both try to disallow Duke from entering either of them, constantly bouncing him back and forth.
Although distinct and different from a Doom glide, this sliding trick feels similar in its execution, hence the name.

Sectors w/ Sloped Floors/Ceilings

Sectors w/ sloped surfaces behave a little strangely, sometimes allowing Duke onto them in cases where he normally shouldn't be able to (esp. if they are in motion).
Particularly, sectors w/ sloped floors that are moving vertically, when pushed against, can cause Duke to clip to the top of them.

Note: 1-5 The Abyss contains every of the above types of clips (save for the Water Surfacing Clip). It is a useful level for practice.

Rotating Objects

Objects and sectors that rotate can be pushed into and cause Duke to clip to the top or bottom of them.
In Death Row, this is especially useful if one falls down the giant gear shaft, as it can be used to clip back up to safety before falling to one's death at the bottom of the pit.
Additionally, rotating objects and sectors can squish Duke into walls, sometimes causing him to clip or warp into neighbouring or overlapping sectors.
Finally, rotating doors do not move properly if Duke is standing on top of them (the game probably assumes that an actor is wedged in them, when really one is just colliding w/ the top of them).
This can be exploited to force rotating doors to rotate in the wrong directions, and force them through walls and sectors they should never have collided with.
Rotating doors which have sectors w/ enough open vertical space can thus be used to create tunnels through walls.
Sadly, rotating doors the wrong way doesn't seem to have much use in any of the original 3 episodes nor the Atomic Edition expansion beyond:

Sector Crushing

By rotating doors so that they collide and overlap certain other sectors, the engine will sometimes crush the relevant sectors (sometimes squishing or trapping Duke or enemies in the process).
The exact setup requirements for this to happen are uncertain -- there are quite a few levels where rotating doors into other sectors will not cause any sector crushing.
Sector crushing can be performed in 4-1 It's Impossible in the projector conference room.

Oasiz demonstrates this here:
http://www.youtube.com/watch?v=25Suq8tvVqU

Again, sadly, sector crushing does not appear to be useful for sequence breaking any of the original 3 episodes nor the Atomic Edition expansion.

Warps

In Duke3D, maps can be built with overlapping (but disconnected) sectors (same x and y locations, but spanning different z locations).
Due to the way sector resolution is performed, clipping glitches can cause Duke3D to resolve an actor's current sector to be another different sector that overlaps the same space.
Duke (and various enemies) can exploit this, and warp from one area to another.
(Aside: Later Build engine games would add Room over Room support which would allow two sectors to be connected vertically w/ one another, simultaneously rendering both sectors from either one.
Duke3D does not allow this [except for the EDuke32 source port, which adds ROR support for user levels, mods, and conversions].
I don't believe Megaton allows ROR either, being based primarily on JonoF's JFDuke3D combined w/ some EDuke32 patches [further modified w/ a variety of additional changes and work].)

Train/Locomotive Sector Death Warp

If a locomoting sector exists on a map, dieing by being squished/clipping will cause Duke to teleport to the locomoting sector.

Oasiz demonstrates this here:
http://www.youtube.com/watch?v=DZUwWsIx2i8

This glitch is not particularly useful, but somewhat interesting...
A user level could potentially exploit this, perhaps for a simple secret exit?

Level Transitioning

Exit Trigger Buffering

By using the game menus, multiple exit triggers can be buffered to trigger at the same time, which causes Duke3D to skip levels.
The only known level this can be performed in is 1-2 Red Light District, which allows skipping directly to 1-4 Toxic Dump w/o having to play 1-3 Death Row.
To perform the trick, skip past the floor trigger that traps Duke, to the end of the hallway where the level exit button lies.
Wait for the "Duke captured" ending to trigger, and while the audio plays, hit the level exit button.
Press F1 to bring up the help menu and wait for the audio to finish (in-game time will still pass for a short while w/ the help menu up).
If you paused long enough, both triggers should now be lined up, and when leaving the help menu, both should trigger immediately at the same time.
After the intermission menu ends, you should be brought into 1-4, instead of 1-3.
Note that some other menus will work too, depending on which version of the game you are running.
Additionally, it is possible, albeit difficult, to line up both triggers to naturally end at the same time without buffering.

Silos911 originally discovered this trick, you can check out his video tutorial here:
http://www.youtube.com/watch?v=3EFEJD3h6X4

Deathmatch Exits

Some levels in Duke3D contain deathmatch-only exits, provided when the normal exit in a level wouldn't be appropriate for deathmatch games.
These exits are intended to be inaccessible outside of deathmatch, but, using a variety of tricks, can often be accessed in single-player and coop.
This can be especially useful in boss levels, as fighting the boss is often slower than breaking into the deathmatch exit.

LLCoolDave demonstrates this here:
http://www.youtube.com/watch?v=fXmS_uEWSNo

Level Ordering

Using deathmatch exits can provide strange level ordering, and can also allow one to reach levels that were previously unreachable from an episode (for instance, 1-7 Faces of Death).
This can be explained through the mechanics of the four level exit types in Duke3D:

Normal Exit Nuke Button
A Normal Exit Nuke Button will typically advance directly to the next level.
The Normal Exit Nuke Button has an additional check though:
If, while using a Normal Exit Nuke Button, the level_number counter ever surpasses the 11th level (exceeds a value of 10), then it resets back to level 1.
This was most likely added for deathmatch purposes to loop back at the end of an episode.
This limits the number of levels any episode can have to 11 -- this limitation is changed in certain source ports (like EDuke32).

Secret Exit Nuke Button
A Secret Exit Nuke Button will jump to whatever level is specified by the map maker in its lotag.
Notably, all secret levels end with a Secret Exit Nuke Button (but these are usually treated differently, as per the Exit from Secret Level section below).
Additionally, using a Secret Exit Nuke Button typically causes Duke3D to believe it is entering a secret level, and thus, Duke3D stores the value of the level that you are leaving for later use.
(technical: it stores this in the ud.from_bonus variable. ud.from_bonus is set to ud.level_number+1, since ud.level_number uses a base index of 0, while ud.from_bonus uses a base index of 1 [0 is reserved])
If no level (i.e. level 0) is specified in the Secret Exit Nuke Button's lotag, or if the level specified exceeds level 11, the game repeats the current level, but treats it as a secret level.
Again, this limits the number of levels any episode can have to 11 -- this limitation is changed in certain source ports (like EDuke32).

Level Exit Countdown Timer
When a Level Exit Countdown Timer finally fires, it typically advances directly to the next level.
Note that a Level Exit Countdown Timer will not check if it is advancing past any limits -- thus, it can allow one to advance past level 11.

Exit from Secret Level
If Duke3D believes we are on a secret level (because we last used a Secret Exit Nuke Button), it will treat exiting a level differently.
Instead of doing what it normally would for any type of level exit, it will attempt to continue onward from the level which led us to the secret level.
(technical: ud.level_number is set to ud.from_bonus, but, since we are advancing by one, there is no need to adjust for the base index difference)
Now that Duke3D has returned to the normal level past the one it had stored, it no longer needs to remember that level and clears that storage.
This also ensures that Duke3D will treat the new level as a normal level.
Note that any Exit from a Secret Level will not check if it is advancing past any limits -- thus, it can allow one to advance past level 11.

The combination of all these mechanics allow players to reach strange levels in odd arrangements, thanks to a variety of interesting facts:

  1. Deathmatch Exits are always Normal Exit Nuke Buttons.
    Deathmatch Exits from boss levels thus allow one to advance into secret levels without telling Duke3D to treat them as secret levels.
    This is thanks to secret levels always being placed after the end of an episode (always being designated with the greatest number designations within an episode).
  2. Secret levels always end in Secret Exit Nuke Buttons.
    These Secret Exit Nuke Buttons are properly set to point back to the level you would typically advance to next, despite this value usually not being used.
    Due to this, exiting a secret level while Duke3D is treating it as a normal level will cause Duke3D to treat the normal level it returns to as a secret level.
  3. Advancing the level counter past the end of an episode will cause Duke3D to load the next episode's levels.
    (note that this functionality is different in some source ports [like EDuke32])

These facts, combined with the mechanics of the 4 exit types, cause Duke3D to exhibit strange deathmatch level ordering.
If Duke didn't treat secret levels specially, the deathmatch level loop would not be organized in such a strange fashion.
The order appears to be somewhat intentional: it is probably a work-around to ensure that secret levels would appear at the end of the deathmatch loop (without requiring their secret exits to be hit).
This deathmatch loop allows for one to potentially marathon run episode 2 indefinitely.

Death Exits

Traditionally disallowed in IL runs, dieing while triggering the level exit allows you to start the next level with full health.
Death stops the in-game timer, so dieing screws up the in-game time for any run.
Additionally, in some versions of the game, dieing or freezing solid will not just stop the in-game timer, but also abruptly end any demo recording.

Object Interactions

Switch Pressing

Switches (and other usable objects) can be operated from long distances and through some walls.
Wall thickness and angle affects how far away an object can still be activated from.
In particular, windows, especially those that open/close from triggers/buttons, often allow Duke to use objects through them (for instance, the 2-9 Overlord deathmatch exit).
Some walls are specially tagged to swallow use actions and disallow players from activating buttons beyond them.
These walls are recognizable by the fact that Duke will not make any normal use noises when the use key is pressed on them.
Push switches can also be shot to activate/deactivate them.

Kick Open

Duke's Mighty Foot can kick open doors and activate switches that normally cannot be activated by shooting w/ any other weapon.
Even some locked doors can be kicked open.
Notably, the locked Yellow Key door on 1-3 Death Row and the locked Blue Key Doors on 3-6 Rabid Transit can be kicked open.

Teleporter Activation

Teleporters are normally activated when Duke initially crosses the threshold into the teleporter sector.
When trapped within the confines of a teleporter, if Duke fires any weapon that causes the teleporter to activate, Duke can move into the location the projectiles are teleporting from and teleport w/ them.
Easy weapons to perform this with are the pistol, shotgun, Ripper chaingun, and the freezethrower.

Double Keycard Insertion

If two keypads are mounted vertically adjacent to one another, they can both be activated using the same single keycard by jumping/falling, activating a keypad, and while Duke is scanning the card, ramming the use key as you pass by the other pads.
This has no use in the original 3 episodes nor in the Atomic Edition expansion, as no level stacks keycards in this manner.

Laser Trip Mines

Placing Laser Trip Mines can be useful to safely slow rapid descent and protect Duke from falling to his death.
Additionally, placing Laser Trip Mines uses similar code as using a keycard on a keypad, but Laser Trip Mines do not allow unlocking keypads.
You cannot use Laser Trip Mines on keypads or on most doors which are not currently in the process of opening.
If you get the proper angle, you can attempt to place a Laser Trip Mine on a keypad, but it will not be placed despite the placing animation playing.

Enemy Tricks and Info

Riding Flying Enemies

Most flying enemies, when stood on, will continue to move upwards towards Duke's vertical position.
This allows one to scale large vertical climbs by riding on top of these enemies.
Particularly, the Assault Commander is most useful for this, as Assault Commanders will fly very straight upwards while attempting to attack Duke.

Sentry Drone Jumping

Sentry Drones, despite being extremely volatile, can sometimes be jumped onto and off of to help reach high platforms.

Fernito demonstrates this here:
http://www.youtube.com/watch?v=dC3cNUInFmc

Protozoid Slimers

Protozoid Slimers will eat various different types of enemies, living or dead.
They will always move towards the player's current view location, not necessarily towards Duke (esp. noticeable when viewing through a security camera).
In 1.3D, Duke cannot kick Protozoid Slimers off of his face, he must press the fire button while holding a gun.
Note that there is a glitch: Duke does not actually have to fire the weapon to kill the slimers, but simply attempt to fire the weapon.
If Duke is switching weapons, he will not be able to fire, but attempting to fire will still kill any slimer attached to his face.
Additionally, if Duke is out of ammo, this glitch allows him to pull out a gun he has no ammo for, quickly attempt to fire it before it is automatically put away, and, in doing so, kill any slimer on his face.
Kicking slimers attached to your face was made possible in later versions, resulting in slimers being less annoying and also less potentially fatal to those without ammunition or armaments.

Shrink Ray vs. the Mini Battlelord / Understanding Enemy Collision Areas

The Shrink Ray is a weapon which fires projectiles that shrink enemies within a blast radius.
All enemies within this blast radius will be shrunk, but the radius is extremely small, making it hard to shrink multiple enemies at once.
The projectile's spherical blast radius must intersect an enemy's collision area in order for them to be shrunk.
Most enemies have their collision areas located at their feet (with the exception of some bosses).
The Mini Battlelord is such a large sprite that if the Shrink Ray hits most areas of its body (including the auto-aim target), the Shrink Ray blast radius will be too far away and will not intersect the Mini Battlelord's collision area.
Because of this, the Mini Battlelord can be difficult to shrink, unless the shot is aimed close to its feet.

Note that there is a useful glitch: any Mini Battlelord that has been shrunk will continue to not attack even after returning to normal size (until it is hit with enough explosives and re-activated).
While the Mini Battlelord is in this state, its collision area will be basically non-existent -- auto-aim will no longer target them and hitscan weapons will not hit them.

Additionally, it is useful to note that enemies will take more damage from explosives when the explosion is closer to their collision area's origin.
This is especially useful for the boss enemies.
In particular, the Battlelord boss takes more damage at its head than at its feet; functioning as if its collision area's origin is located at its head.

Other Info

Skill Modes

Duke has 5 skill modes:

/S0: DNSKILL1
A hidden skill mode that is not available in the main menu.
It can be accessed either by using the command-line /s0 parameter when loading a particular level or by typing the DNSKILL1 cheat.
Some enemies that show up in "Piece of Cake" do not show up in this difficulty (as they have a lotag greater than 0).
This mode has the fewest enemies.

/S1: DNSKILL2 "Piece of Cake"
This mode has a reduced number of enemies.

/S2: DNSKILL3 "Let's Rock"
More enemies than "Piece of Cake".

/S3: DNSKILL4 "Come Get Some"
Even more enemies.

/S4: DNSKILL5 "Damn, I'm Good"
In this skill mode, enemies respawn seconds after death unless their corpse is destroyed.
This can be accomplished by gibbing their corpse with an explosion.
Because enemies respawn, this skill mode does not have a maximum number of kills.
Additionally, typing cheats while in this mode will not work, instead typing them results in the text "YOU'RE TOO GOOD TO BE CHEATING!"
Despite it being possible for enemies to be tagged to appear only on "Damn, I'm Good" difficulty, it is atypical for levels to do this.
Instead, at this difficulty, it is the norm for levels to share exactly the same enemies as in "Come Get Some".

Personal tools