Duke Nukem Wiki
Advertisement

The sector chronology of a map in Duke Nukem 3D is the temporal order in which regions of the map were created, based on the assumption that the map’s internal indexical ordering of those regions accurately reflects the order in which they were created.

Explanation

In the mapping software used by the Duke Nukem 3D developers, “sectors” — the term for unitary geometric spaces in the Build engine — are stored in an array that allows random access for the purposes of reading, modifying, and deleting existing sectors, but new sectors are always appended to the end of the array. Crucially, modifying sectors (including their coordinates, number of walls, assigned “first wall”, etc.) does not change their indexical position in the array. In fact, the indexical ordering of sectors is preserved even while copying and pasting a group of sectors from one map file to another, with the lowest index of the group being assigned to the end of the existing array in the new map file. This means that a sector’s index will always reflect the timing of the sector’s creation, relative to all other sectors in the file.

Visualization

Sectors can be recolored to reflect their chronological indices. Knowing the number of sectors in a given map, one can generate a Build ART file containing 2x2 solid-color blocks, with each block corresponding to a sector. The blocks can be colored according to a gradient, such as blue-to-red, to reflect the increasingly newer ages of the corresponding sectors. Sector floor textures can then be reassigned to picnums in the ART file that match the sectors’ indices. For best results, floorpal, floorshade, and floorstat should be set to 0 for all sectors, and sprites, especially those aligned with the floor, may be deleted.

Because the Duke Nukem 3D color palette is limited, it may be difficult to find an ideal gradient, but the figure below shows one such gradient that is used in images across this site:

Sc article1

Proof of concept

Certain levels of Duke Nukem 3D have multiple, publicly available iterations. These include maps that were changed between version 1.3d, the Atomic Edition, and World Tour, as well as maps for which we have January 1996 iterations as part of the leaked v0.99 beta.

When applied to Zoo, the visualization methods described above show that the chronological ordering of sectors is preserved between versions 1.3d and the Atomic Edition, and the newly added sectors are correctly color-coded as the newest sectors:

Zoo v1.3d sectors
Zoo v1.5 sectors

Comparable results are achieved when testing any other maps with multiple, publicly available iterations.

Limitations

The only cases where this could be misleading — though technically still accurate — are when sectors are joined (i.e., two neighboring sectors are merged into a single sector) or split; the resulting sectors will always be pushed to the end of the array, making them seem “newer” than they arguably are. Joining sectors is not uncommon and may be done, for example, to remove shadows. Splitting sectors is even more common, but it should be noted that merely inserting a new sector within an encapsulating sector (e.g., a dumpster in a street) without using any of the pre-existing walls from the encapsulating sector (e.g., the edges of the street) does not split the encapsulating sector and instead simply adds a new sector to the end of the array. However, some maps have sectors (e.g., a street) that are “newer” than sectors that they fully encapsulate (e.g., a dumpster in the street) because of joining and splitting of the encapsulating sector (e.g., the street).

Sc article4

Comparison with other chronological measures

Wall chronology

Walls behave differently than sectors: joining walls deletes one wall while extending the other, and splitting walls actually inserts a wall in the middle of the array, rather than appending it to the end. More importantly, wall indices are locked to their associated sectors such that their index will always come after the indices of any walls associated with lower-index sectors. The indexical ordering of walls is also subject to reordering upon the joining or splitting of sectors, so a “wall chronology” would offer no advantage over sector chronology. There is also no way to improve sector-based analysis by exploiting two-sided walls; each side of the wall will simply reflect the chronology of their respective sectors and cannot “correct for” joining and splitting of the sector on the opposite side of the wall.

When sectors are color-coded based on their lowest-index wall, visualizations of wall chronology appear identical to visualizations of sector chronology.

Sprite chronology

In Mapster32, new sprites — including copied and pasted sprites — are always appended to the end of the array, just like sectors. Because sprites are not subject to the same reshuffling effects as sectors, they should theoretically be even more useful for tracking map chronology than sectors. However, when sprite chronology is actually visualized for maps from 1996 with known iterations, this method fails validation:

Sc article5
Sc article6

In the figures above, all the sectors have been recolored with white floor textures, and the colored blocks correspond to individual sprites, such that the lowest-numbered sprites are bright blue and the highest-numbered sprites are bright red. Notice how most of the newly added sprites near the bottom of the map are red, whereas many of those near the top are blue. This contradicts the underlying assumption that newly added sprites should have higher indices.

There are exactly 200 sprites on Zoo in v1.3d. The screenshots below are labeled with the sprite indices of some of the newly added sprites in the Atomic Edition:

Sc article7
Sc article8

Plotting sprite numbers against the numbers of their host sectors suggests a possible explanation:

Sc article9
Sc article10

Sprite indices and their host sectors’ indices can be converted to intra-map percentiles and plotted on a graph to visualize their relationship. The plots above show all maps in the Atomic Edition (left) and all maps created specifically for World Tour (right). Notice that the points on the graphs cluster along different lines.

Sc article11
Sc article12

Sprites in Alien World Order cluster along a line exactly as one would expect if the maps were made in Mapster32. However, sprites in the Atomic Edition cluster along two diverging lines. Therefore, the 1996 Build mapping software must have had two methods of adding sprites: one that added them to the end of the array like Mapster32 and one that added them to the beginning.

There is actually a discernible pattern here: wherever there is good reason to expect the level designer would have copied and pasted sprites, those sprites have lower numbered indices. Other newly added sprites seem to have been added to the end of the array like in Mapster32 (i.e., pressing “S” in Mapster32). This pattern can be clearly seen in the screenshot below:

Sc article13

The circled sprites in the screenshot above are evidence of copying and pasting. This is because the level designer would have needed to manually assign the graphic for each sprite after placement, and, therefore, the designer probably copied it at a given height and pasted it left-to-right.

For any 1994-1996 map, the best rule-of-thumb is that sprites with very high indices and sprites with very low indices are both probably newer. This does not make sprite chronology completely useless for older maps – because sprite indices cluster along two dissociable lines, it might be possible to “guess” which method was used to create each sprite and reconstruct a clearer chronology – but this does mean that sprite chronology is much harder to interpret for older maps and, for that reason, less useful than sector chronology.

Duke Nukem 3D
Episodes L.A. MeltdownLunar ApocalypseShrapnel CityThe BirthAlien World Order
Weapons Mighty FootPistolShotgunChaingun CannonRPGPipe BombShrinkerExpanderDevastatorLaser TripbombFreezethrowerIncinerator
Items Access CardsHealth ItemsHolodukeJetpackNight Vision GogglesPortable MedkitProtective BootsScuba GearSteroids
Enemies Assault CaptainAssault CommanderAssault TrooperBattlelord SentryCycloid SentryEnforcerFirefly TrooperOctabrainOverlord SentryPig CopPig Cop TankProtector DroneProtozoid SlimerRecon Patrol VehicleSentry DroneSharkTurret
Bosses BattlelordOverlordCycloid EmperorAlien QueenCycloid Incinerator
Editions ClassicSharewareAtomic Edition (Plutonium PAK)Megaton EditionWorld Tour
Expansions Duke AssaultDuke Caribbean: Life's A BeachDuke It Out In D.C.Duke Nukem 3D Level Design HandbookDuke Nukem's Penthouse ParadiseDuke XtremeDuke: Nuclear WinterDuke!ZONEDuke!ZONE 150Duke!ZONE IIUnofficial Expansions
Community High Resolution PackMods & Total ConversionsSource PortsSpeedrunningUser Maps
Other Build EngineCheat CodesDifficultyDuke Nukem (character)MultiplayerMusicPortsPrototypesQuotesScrapped Content
Advertisement