Dr Sleep's DOOM Apothecary
  Latest News
  Editing Clinic
  Tutorials
  jDoom
  AddOn Levels
  Downloads
  About
  Doom Builder Guide
 Articles and Guides
  Doom Builder Guide
  WinDEU for Beginners Guide
  Managing Textures
  REJECT Tricks and Tips
  jDOOM and Hi-Res Textures
  WAD Author's DOOM Reference
 Related Sites
  Doomsday HQ
  NewDoom.Com
  Doom Wad Station
  DoomWorld: Top 100 PWADs
  The Megawad Project Page


Doomsday HQ Link

Doomsday HQ Link

Check out our host: NewDoom.com
Hosted by NewDoom

Copyright @ 2004 by
John W. Anderson

johnwanderson@verizon.net

 

Dr Sleep's DOOM Apothecary
Home  |  Editing Clinic  |  Tutorials  |  jDoom  |  Levels  Downloads About  Email
Editing Clinic: REJECT Table Tips and Tricks
PWAD Designer's Reference | REJECT | Textures | Graphics | Aesthetics: Artistic Design

Continued from previous page.

Hiding in the Dark

The map in Figure 1.6 shows a small, 10-Sector level with zones of light and dark. Sectors 2, 6, 7, 8, 9 and 10 are brightly lit (Light Level 255), while the rest are all fairly dark (64). (We're taking liberties with reality here, since anyone standing or passing in front of a very bright source would be silhouetted, but suspend your disbelief in favor of the dramatic point.)

Figure 1.6:  Sectors 2, 6, 7, 8, 9, and 10 are brightly lit. Imps are in Sectors 7 and 10.

Monsters are in Sectors 7 and 10, facing west, and the Player Start is in Sector 1 facing east. The idea is that the monsters can't see you as long as you stay out of the lit Sectors. Using the SAFE option with RMB, the dark Sectors can be made essentially invisible to the monsters, even if they move and enter the dark Sectors. Move through a lit spot, and they see you and start tracking you, perhaps firing until you move out of the light.

To show you how easy it is, the argument for this option would be

SAFE 0 (0 1 3 4 5)

The parameters are

SAFE <distance> <sector list>

Distance is measured in Sectors. SAFE 0 indicates the Sector is totally unseen by its neighbors and within itself; SAFE 1 means that a Sector is unsighted by all of its neighbors but can be seen by monsters once they enter the Sector. The numbers in parentheses are the Sectors to which the SAFE option is applied.

Looking at our pair table again, first let's see how the REJECT map would look with a proper REJECT LOS optimization (no special effects).
 

                                 Player Sector

Monster Sector

0 1 2 3 4 5 6 7 8 9 10
  0 0 0 0 0 0 0 0 0 0 0 0
  1 0 0 0 0 0 0 0 0 0 0 0
  2 0 0 0 0 0 0 0 0 0 0 0
  3 0 0 0 0 0 0 1 0 0 0 0
  4 0 0 0 0 0 0 0 0 0 0 0
  5 0 0 0 0 0 0 1 0 0 0 0
  6 0 0 0 1 0 1 0 0 1 0 0
  7 0 0 0 0 0 0 0 0 0 0 0
  8 0 0 0 0 0 0 1 0 0 0 0
  9 0 0 0 0 0 0 0 0 0 0 1
  10 0 0 0 0 0 0 0 0 0 1 0

Figure 1.7:  REJECT table built by RMB with the PERFECT option.

The table in Figure 1.7 shows eight 1s representing Sector pairs that can't see each other. The DOOM engine will ignore LOS calculations for those pairs. (These tables are merely visual tools - you don't need to understand them to use RMB. They do serve to illustrate a point about LOS calculations. Moving from a 4-Sector to just a 10-Sector map has grown increasingly complex. You can imagine a 100-Sector pair table would be ridiculous to do by hand. That's what algorithms are for.)

                                 Player Sector

Monster Sector

0 1 2 3 4 5 6 7 8 9 10
  0 1 1 0 1 1 1 0 0 0 0 0
  1 1 1 0 1 1 1 0 0 0 0 0
  2 1 1 0 1 1 1 0 0 0 0 0
  3 1 1 0 1 1 1 1 0 0 0 0
  4 1 1 0 1 1 1 0 0 0 0 0
  5 1 1 0 1 1 1 1 0 0 0 0
  6 1 1 0 1 1 1 0 0 1 0 0
  7 1 1 0 1 1 1 0 0 0 0 0
  8 1 1 0 1 1 1 1 0 0 0 0
  9 1 1 0 1 1 1 0 0 0 0 1
  10 1 1 0 1 1 1 0 0 0 1 0

Figure 1.8:  REJECT table using SAFE 0 (0 1 3 4 5) parameter.

The table in Figure 1.8 shows the results of having applied SAFE 0 to Sectors 0, 1, 3, 4, and 5. We now have 65 1s indicating the Sector pairs that are completely SAFE.

BLIND works almost the same way as SAFE, except that it is more of an inclusive parameter. SAFE declares Sectors that can't be seen from other Sectors. BLIND declares Sectors that can't see other Sectors. We can use a distance unit for BLIND which sets how far away (in Sectors) BLIND works. In the map in figure 1.6, we can make Sector 10 BLIND to all Sectors (including itself) with BLIND 0 (10). Or it can be BLIND to all except itself with BLIND 1 (10). Or BLIND to all but itself and its nearest neighbor (Sector 4) with BLIND 2 (10), and so on. This could be a good option to use in a long hallway.

Distance and Length

There are two other useful options that RMB can apply to your map that are a lot easier to use. DISTANCE is a parameter measured in DOOM units, beyond which Sectors cannot see each other. For instance DISTANCE 512 means simply that no monster in any Sector can see further than 512 grid units or pixels (as measured in your level editor). This setting is generic to the whole level and may be useful for limiting LOS distances across long courtyards. (A DISTANCE setting of 800 is probably the best mean.)

LENGTH is measured in Sectors. LENGTH 10 would mean that no monster can see further than 10 Sectors away. Now, remembering that each step in a set of stairs is a Sector, you may want to be careful with this parameter. It is useful, but DISTANCE is probably the parameter to echo reality a little better.

RMB comes with many other options, and the four we've covered are just the ones I find most interesting. The SAFE and BLIND options also have more complex parameters that can be used with them. The RMB manual provides verbose instructions on the use of each option.

Response Files

RMB uses response files for ease of execution. That is, you simply create a text file that uses a separate line for each parameter instead of typing them all out on the command line. The response file needs only to have the same name as you WAD file with the .REJ extension and RMB will find it and apply it to that map. The response file for the operations we've performed on the map in Figure 1.7 would read

#NOMAP turns the graphic display off
NOMAP
PERFECT
SAFE 0 (0 1 3 4 5)
BLIND 2 (10)

You can put comments prefaced by # in your response file which will be ignored.

You can download the example map here if you'd like to see the very cool effects you can achieve to make your level a little more interesting. (Response file included). RMB comes with several example maps of its own, along with detailed notes on how to configure your response files with the SAFE and BLIND parameters.

If you've found this discussion of how to optimize your REJECT table and apply special effects to your level through the same useful, let me know. Meanwhile, you can download the programs we've discussed below. And don't forget to check back for progress on the ZenNode REJECT update.

ZenNode v1.1.0 by Marc Rousseau.

Reject Map Builder v3.0 by Jens Hykkelbjerg.

Example SAFE Map by Dr Sleep.

Batch file for easy creation of response files that match the name of your PWAD by Dr Sleep.

Download this article in Adobe Acrobat PDF or Microsoft Word format (self-extracting ZIP).