Page Contents

Quick Navigation (Quickly slapped together, more like)

 

Synopsis

Introduction:

Duke Nukem 3D is a game with a long and, sometimes, difficult development. Alongside the development of the game, the Build engine upon which it runs was also slowly advancing as time went on. This sometimes meant that features of the game might clash with a development made in the engine, which is what we have here.

In early versions of the map format, less attributes about things in the map were stored and this holds true for walls. As of Version 5 of this format, a new field was introduced to the wall structure known as 'extra' which, as its name suggests, could be used for extraneous purposes. Upon converting existing maps from Version 4 to Version 5, Ken Silverman's utility would set this new attribute to -1, though it seems that Ken would later change his mind and have it default to 0 in some version of the Build editor.

 

Ken Silverman writes:

In convmap5.c (4 -> 5), I set the new extra fields to -1, probably because I considered that it might be used as a pointer - well, more of a 16-bit index, where -1 is used as an end of list. Later, I figured it was better to have it as a general purpose field for the game programmer to use for whatever - with 0 being a better default. So you're right - converting from an old map would have left -1's in the extra fields for any old geometry.

 

Incidentally, an available build of the game known as LameDuke from December 30th, 1994, uses MAP Version 5, which had only been introduced in mid-September of that year. Whilst research into this has currently been limited, due to time constraints, it seems that its maps do include walls with their 'extra' field set to 0 as well as -1. This would suggest that having it default to 0 was introduced somewhere quite early in the time of MAP Version 5, as this attribute would not have existed in prior versions.

 

Does this mean that any wall with its 'extra' field set to -1 in the final game is made from converted Version 4 geometry? No. Because it seems that at a later time, likely on the part of 3D Realms, the Build editor was adjusted to set this to -1 on any new walls. This means that walls with their 'extra' set to 0 are only likely to come from a certain window of time, somewhere between late 1994 to late 1995.

Does this have any tangible effect in the game? Yes. Walls with certain 'overtiles' will display whatever tile number is in their 'extra' field if the game is saved and then loaded again. This affects BIGFORCE (530) and W_FORCEFIELD (663) at the very least and is the cause of Tile 0 appearing in Dark Side (E2L8), on several walls, when this condition is met - incidentally, it does display on the wall of the visible W_FORCEFIELD where the mini BOSS1 is placed, but cannot be seen as the wall here is below the floor. Dark Side (E2L8) is the only map with this bug, solely as it is the only one with these 'overtile' values set on 'extra' 0 walls, but it is far from the only map with such walls.

Why is any of this interesting? Because it allows us to take a glimpse at level changes made in the time that the 'extra' field was being set to 0 and beyond.

 

With a little time and half-assery, I cobbled together a script that would find and report on any affected walls when a map was loaded, then also switch those walls to Tile 199, which is a solid blue square. This allows us a look at where old V5 geometry is located. It is notable that the geometry in Overlord (E2L9) which was reused from LameDuke's M8.MAP has entirely 'extra' -1 walls, implying it wasn't touched at all in the Version 5 era, as this map was Version 4 in the available files and likely wasn't modified again for quite some time.

 

In any case, let us take a look at what we can see. At the end of the page, you can find the script I used and run it for yourself. Below is by no means a comprehensive and complete list of everything, but more a brief skim over it. I'd also like to go through LameDuke's levels, but hey, there's nothing stopping you doing it first as I have limited time these days.

 

Incubator (E2L2)

Very little 'old' geometry exists in this level. In fact, it's almost a surprise that any exists at all, as the oldest suspected screenshot of the level is from November 1995, some way into the Version 7 era of Build. The screenshot does show floor slopes, which certainly confirms that it was in a later version of the engine:

 

Nonetheless, some older geometry does exist, but is not visible. The outer boundary of the space sectors at the beginning of the map feature an 'extra' of 0, though they may have been reused from another map, due to the distant geometry at the end of Spaceport (E2L1) not really matching what we see in Incubator (E2L2):

 

Also for comparison, the geometry seen at the end of Spaceport (E2L1) versus the real exterior of Incubator (E2L2):

 

Curiously, there is one 'visible' wall which is affected by 'extra' 0, though the player can't usually see this wall in normal play. This may mean nothing, as the Build editor likes to sometimes retain parameters when creating or splitting walls. As such, it may have simply inherited this from an older wall:

 

Warp Factor (E2L3)

This map went through several changes throughout its development, most of them quite major. In fact a layout from the middle of 1995 shows that the layout was quite different in this time:

 

We can see that the large round area at the front of the ship was already there and, fortunately, there are old screenshots of this area:

 

Whilst nowhere else in the level appears to have 'extra' 0 walls, this changes when we reach the front of the ship. The central area, however, appears to be newer and isn't affected. Similarly, the area with the switch for accessing the Star Trek secret was clearly added later:

 

Much like E2L2, there is a single stray wall that the player wouldn't usually see. This one wall (under the crosshairs) is an 'extra' 0 wall. The chances are that it simply inherited this from elsewhere in the level at a later time:

 

Fusion Station (E2L4)

Rather surprisingly, this level has a lot of Version 5 geometry. The starting area is completely devoid of all but a single 'extra' 0 wall and a few, usually not visible, exterior walls:

 

But as soon as you turn the corner, the world turns blue:

 

Curiously the area with the rotating door has a palette (23) applied to its walls, suggesting a different texture was used there at one time to what we see in the final map:

 

The first area we visit in the center lacks any 'extra' 0 walls, but the pool with rotating sectors is a mixture above and mostly repurposed Version 5 geometry below:

 

Most of the rest of the level is quite similar, with blatant modifications made later on in its development:

 

The final room is back to normal, which would indicate its supposed conversion from AHB-Space came either early in the history of Version 5, or after the 'extra' field was rigged to be set as -1 again:

 

Dark Side (E2L8)

The original trouble causer. This map has a very long history in the game, though it seems the vast majority of it has its origins in Version 5. We know for a fact that once upon a time, the ventilation shaft near the reactor area used to use an elevator instead of a slope, as is evident by the lack of straight red line on a 1995 overhead map and the fact that the elevator remains in the final version. We also know of several layout changes. For reference, here is a mid-to-late-1995 overhead view:

 

We'll be referencing this map quite a lot, so you might want to get familiar with it. Firstly, the starting area of the level was clearly added later, replacing a fourth railway with the weird little room we see now. Many of its walls do still have their 'extra' set to 0, but these forcefield windows aren't affected by the Tile 0 bug as they were added after this was adjusted to create -1 walls again:

 

The map center was formerly an open area, but the walls being 'extra' 0 here may just be a case of inherited values, rather than indicating they were added in Version 5. The secret appears to have been added fairly late, however:

 

The corridor leading to outside of the medical facility was also a later addition and so has -1 walls instead:

 

Curiously the walls of the tripmine area are 0 walls, but the earthquake geometry uses -1 walls:

 

Inside the medical facility, we can see where several layout changes were made. Firstly this wall used to be open and was clearly added later:

 

The tanks are not present in the above 1995 shot, but they are visible on the overhead map that we have. It seems at that time, they weren't enterable, so the geometry for the area where you can drop down into them appears to be newer due to using -1 walls:

 

Similarly the crusher area is a newer addition and appeared after the 'extra' default was set to -1 in BUILD.EXE:

 

But the surgery and the drainage pit are older, again reflected by the overhead map we have:

 

The room above the map center was added later, though a door that might have led to it appears in mid-1995 screenshots, suggesting that walls were either being set to -1 again by then, or that whatever was previously here was removed and the current area built from scratch at a later time. Hard as it may be to tell, an old screenshot does suggest a different room used to be here:

 

Secret areas are, as seen in other maps, often later additions:

 

Curiously the secret in the babe pit near the reactor is an exception, as it seems to exist in the 1995 overhead map, but has -1 walls:

 

The reactor room itself does not exist on the old overhead map and, as you'd expect, is where the 0 walls end again:

 

The secret on the final railway, leading to the airlock, was also a later addition, right down the the ventilation shaft you return through:

 

The room above the crater is also new, as we know, as there used to be a building there. The walls for the outside are still partially 0 walls, but this is likely just inherited rather than being older geometry:

 

Pulling in to the end of the level, only the entrance for the secret level and the underwater area are new, as reflected on the overhead map some way up the page:

 

Hotel Hell (E3L8)

The hotel had a troubled history and went through major changes. What we got barely resembles its counterpart in LameDuke at all. The final version has only two sets of 0 walls, being the entrance way and a set of shelves and cupboards:

 

XXX-Stacy (E4L7)

Not at all what I was expecting. There are two overhead maps available from between March of 1995 and August of 1996:

 

I always found the layout of this level a little confusing and seeing it this way, I'm not surprised as it seems to be a mishmash of old and new. Firstly, the map starts out with 0 walls until we get to a certain part of the corridor:

 

The rooms straight down the corridor, with the SEENINE cannisters, are blue, but the rooms off to the side are a mixture:

 

The comedy club is certainly a later addition:

 

This little area also appears to have been added later:

 

E4L8 (Critical Mass)

This level also has an overhead map from between March of 1995 and August of 1996:

 

This correlates to the starting area being comparatively new, until you reach the stairway:

 

Which goes on into the collapsing room, as we'd expect from the old map:

 

But then from the trash compactor onwards, we get -1 walls again:

 

Which finally start to run out in the trap room:

 

Then we don't see -1 walls again until the office and the ending area. One has to wonder about the erroneously scaled texture on that one piece of wall, almost as if the vent used to continue on that way instead of behind the player, as it does now:

 

Data

You can download the CON script used to find stray 0 walls and run it yourself, or look at its output. Both are included in this single .ZIP archive: here

 

This page was written by DXZeff / High Treason at some point. Feel free to use stuff from it, I don't care, it's not like I own the rights to the damn game.