forked from jordansavant/doomengine.python
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Unofficial_DOOM_Specs.txt
3808 lines (3178 loc) · 161 KB
/
Unofficial_DOOM_Specs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
FOUND ONLINE AT: http://www.gamers.org/dhs/helpdocs/dmsp1666.html
T H E U N O F F I C I A L
================= =============== =============== ================
\\ . . . . . . .\\ //. . . . . . .\\ //. . . . . . .\\ \\. . .\\// . .//
||. . ._____. . .|| ||. . ._____. . .|| ||. . ._____. . .|| || . . .\/ . ..||
|| . .|| ||. . || || . .|| ||. . || || . .|| ||. . || ||. . . . . . .||
||. . || || . .|| ||. . || || . .|| ||. . || || . .|| || . | . . . ..||
|| . .|| ||. _-|| ||-_ .|| ||. . || || . .|| ||. _-|| ||-_.|\ . . . .||
||. . || ||-' || || `-|| || . .|| ||. . || ||-' || || `|\_ . .|..||
|| . _|| || || || || ||_ . || || . _|| || || || |\ `-_/| .||
||_-' || .|/ || || \|. || `-_|| ||_-' || .|/ || || | \ / -_.||
|| ||_-' || || `-_|| || || ||_-' || || | \ / | '||
|| `' || || `' || || `' || || | \ / | ||
|| .===' `===. .==='.`===. .===' /==. | \/ | ||
|| .==' \_|-_ `===. .===' _|_ `===. .===' _-|/ `== \/ | ||
|| .==' _-' `-_ `=' _-' `-_ `=' _-' `-_ /| \/ | ||
|| .==' _-' `-__\._-' `-_./__-' `' |. /| | ||
||.==' _-' `' | /==.||
==' _-' S P E C S \/ `==
\ _-' `-_ /
`'' ``'
Release v1.666 - December 15th, 1994
Written by: Matthew S Fell ([email protected])
"The poets talk about love, ...but what I talk about is DOOM,
because in the end, DOOM is all that counts."
- Alex Machine/George Stark/Stephen King, _The Dark Half_
------------------------------------------------------------------------------
----------
DISCLAIMER
----------
These specs are to aid in informing the public about the games
DOOM and DOOM 2, by id Software. In no way should this promote your
killing yourself, killing others, or killing in any other fashion.
Additionally, the author does not claim ANY responsibility
regarding ANY illegal activity concerning this file, or indirectly related
to this file. The information contained in this file only reflects
id Software indirectly, and questioning id Software regarding any
information in this file is not recommended.
----------------
COPYRIGHT NOTICE
----------------
This article is Copyright 1994 by Matt Fell. All rights reserved.
You are granted the following rights:
I. To make copies of this work in original form, so long as
(a) the copies are exact and complete;
(b) the copies include the copyright notice and these paragraphs
in their entirety;
(c) the copies give obvious credit to the author, Matt Fell;
(d) the copies are in electronic form.
II. To distribute this work, or copies made under the provisions
above, so long as
(a) this is the original work and not a derivative form;
(b) you do not charge a fee for copying or for distribution;
(c) you ensure that the distributed form includes the copyright
notice, this paragraph, the disclaimer of warranty in
their entirety and credit to the author;
(d) the distributed form is not in an electronic magazine or
within computer software (prior explicit permission may be
obtained from the author);
(e) the distributed form is the NEWEST version of the article to
the best of the knowledge of the distributor;
(f) the distributed form is electronic.
You may not distribute this work by any non-electronic media,
including but not limited to books, newsletters, magazines, manuals,
catalogs, and speech. You may not distribute this work in electronic
magazines or within computer software without prior written explicit
permission. These rights are temporary and revocable upon written, oral,
or other notice by the author. This copyright notice shall be governed
by the laws of the state of Ohio.
If you would like additional rights beyond those granted above,
write to the author at "[email protected]" on the Internet.
--------
CONTENTS
--------
[1] Introduction
[1-1] id Software's Copyright
[1-2] What's New
[2] The Basics
[2-1] Pwads
[2-2] DOOM version information
[2-3] Terminology conventions
[3] List of DOOM.WAD Directory Entries
[4] The Levels
[4-1] ExMy or MAPxy
[4-2] THINGS
[4-2-1] Thing Types
[4-2-2] Thing Sizes
[4-2-3] Thing Options
[4-3] LINEDEFS
[4-3-1] Linedef Flags
[4-3-2] Linedef Types
[4-4] SIDEDEFS
[4-5] VERTEXES
[4-6] SEGS
[4-7] SSECTORS
[4-8] NODES
[4-9] SECTORS
[4-9-1] Special Sector Types
[4-10] REJECT
[4-11] BLOCKMAP
[5] Graphics
[5-1] Picture Format
[6] Flats (Floor and Ceiling Textures)
[6-1] Animated Floors, see [8-4-1]
[7] Sounds and Music
[7-1] PC Speaker Sound Effects
[7-2] Soundcard Sound Effects
[7-3] Music
[7-4] GENMIDI
[7-5] DMXGUS
[8] Miscellaneous Lumps
[8-1] PLAYPAL
[8-2] COLORMAP
[8-3] ENDOOM
[8-4] TEXTURE1 and TEXTURE2
[8-4-1] Animated Walls
[8-4-2] The SKY Textures
[8-5] PNAMES
[8-6] DEMOs
[8-6-1] Level changes from 1.2 to 1.666 DOOM.WAD
[9] Savegame Files
[10] The DOOM.EXE File
[10-1] Version 1.2 DOOM.EXE Data Segment Overview
[10-1] Version 1.666 DOOM.EXE Data Segment Overview
[10-3] Detail on some EXE Data Structures
APPENDICES
[A-1] Backus-Naur Form definitions of wad elements
[A-2] Engine limits
[A-3] DOOM.WAD changes and errors
[A-3] A BLOCKMAP algorithm
[A-4] Other helpful documents
[A-5] Acknowledgments
-------------------------
CHAPTER [1]: Introduction
-------------------------
DOOM is simply an all-time great game. A big factor in its success
and durability is the plethora of user-created add-ons. id Software
tacitly encouraged them by including the -FILE parameter, and by having
a data format that is both straightforward and easy to understand.
DOOM is basically two files, DOOM.EXE and DOOM.WAD. DOOM.EXE is the
"engine" which does the display and controls the game, and DOOM.WAD has
ALL of the graphics, sound, and map/level data that the engine uses.
The -FILE parameter allows small or large external "WAD" files to be
incorporated, changing any number of those graphics, sounds, and maps.
DOOM 2 has many things in common with DOOM. It uses the same EXE file
as version 1.666 of DOOM, and the WAD file format is the same. It's just
the contents of the WAD file that are different; there are more enemies!
more pictures! more weapons! more stuff!!
This document explains in great detail nearly all aspects of the doom
WAD file format. And a new chapter (10) documents the location of data
within DOOM.EXE itself, so that various unusual game-play changes can
be made. This information has been updated to apply to DOOM 2 as well
as DOOM 1.
The specs were originally conceived as an aid to programmers making
DOOM utilities, especially map-editors. Coincidentally, there might also
be information useful to advanced level designers and players.
The material herein is somewhat technical and it is not recommended for
beginners, unless they are determined. There are some other very useful
documents in existence; I list the ones I know of in Appendix [A-3].
[1-1]: id Software's Copyright and the Shareware Version
========================================================
My comments and statements are by no means official, and the excerpts
below are just the parts that I think are relevant to these specs. Please
read the LICENSE.DOC and README.EXE that came with DOOM.
The LICENSE.DOC says:
"You shall not: rent, lease, sell, distribute for money or other
consideration, modify, translate, disassemble, decompile, reverse
engineer, or create derivative works based upon the Software.
Notwithstanding the foregoing, you may create a map editor, modify
maps and make your own maps (collectively referenced as the
"Permitted Derivative Works") for the Software. You may not sell
or distribute any Permitted Derivative Works but you may exchange
the Permitted Derivative Works at no charge amongst other end-users.
In order to commercially distribute any such map editor or data
utility you must first sign ID's Data Utility License and ID
reserves the right to deny authorization to commercial distribute
the any such map editor or data utility. You may request a copy of
the Data Editor License from ID"
"(except for backup purposes) You may not otherwise reproduce, copy
or disclose to others, in whole or in any part, the Software."
The README says:
"id Software respectfully requests that you do not modify the levels
for the shareware version of DOOM. We feel that the distribution of
new levels that work with the shareware version of DOOM will lessen a
potential user's incentive to purchase the registered version.
"If you would like to work with modified levels of DOOM, we encourage
you to purchase the registered version of the game."
If you are making add-ons, plan on them not working on the shareware
game, and plan on including statements about the trademarks and copyrights
that id Software owns, as well as disclaimers that they won't support your
add-on product, nor will they support DOOM after it has been modified.
[1-2]: What's New
=================
Each new version of these specs renders the previous version obsolete.
This document has grown considerably in size, and to fight that trend,
I'll not discuss it any more.
It has now been five months since the specs were updated. I won't talk
about that either. I'll just apologize for not releasing updates in late
May and July like I should have. Those updates would have been numbered
1.4 and 1.5, so perhaps that's why this is version 1.666.
Here's some of the new or revised sections since the 1.3 specs:
- DOOM 2 info, especially in [4-2-1] and [4-3-2]
- lots of info on the DOOM.EXE file in [10]
- BNF style definitions in [A-1]
- DOOM engine limits in [A-2]
- the DEMO format [8-6]
- the ENDOOM lump [8-3]
- comprehensive list of WAD lumps in [3]
- many parts rewritten for clarity
- changes in terminology to reflect id's where possible, and to be
more consistent throughout
- reformatted again, errors and typos corrected
-------------------
CHAPTER [2]: Basics
-------------------
The starting point is the concept of "WAD". It is not an acronym, it
just means a collection of data. Throughout this document, "WAD" or "wad"
will mean a file with a .WAD extension that contains data for the doom
engine to use.
A WAD file has three parts:
(1) a twelve-byte header
(2) one or more "lumps"
(3) a directory or "info table" that contains the names, offsets, and
sizes of all the lumps in the WAD
The header consists of three four-byte parts:
(a) an ASCII string which must be either "IWAD" or "PWAD"
(b) a 4-byte (long) integer which is the number of lumps in the wad
(c) a long integer which is the file offset to the start of
the directory
The directory has one 16-byte entry for every lump. Each entry consists
of three parts:
(a) a long integer, the file offset to the start of the lump
(b) a long integer, the size of the lump in bytes
(c) an 8-byte ASCII string, the name of the lump, padded with zeros.
For example, the "DEMO1" entry in hexadecimal would be
(44 45 4D 4F 31 00 00 00)
A "lump" is just data, in one of several different formats. Some
contain sound data, some contain graphics data, some contain level
structure data, etc. These specs are mostly concerned with delineating
the formats of the various lump types. There are 10 different types of
map/level lump formats, each has a section in chapter [4] (sections 2-11).
There are 13 other types of lump formats, listed below with the section
where the format is explained, and the actual lump names in parentheses.
Also, Appendix [A-1] has definitions of the structures of all these
WAD elements.
[8-1] palettes (PLAYPAL)
[8-2] colormaps (COLORMAP)
[8-3] dos exit text (ENDOOM)
[8-6] demos (DEMO1, DEMO2, and DEMO3)
[8-4] texture composition list (TEXTURE1 and TEXTURE2)
[8-5] wall patch "number for name" indexing list (PNAMES)
[7-4] midi mapping (GENMIDI)
[7-5] Gravis UltraSound patch mappings (DMXGUS)
[7-1] PC speaker sound effects (DP*)
[7-2] Soundcard sound effects (DS*)
[7-3] songs (D_*)
[6] flats (lumpnames between F_START and F_END)
[5] all other graphics (all other lumps)
The "marker" and "label" lump names like "S_START" and "E1M1" (or
"MAP01") do not actually refer to lumps - they have zero length. They
merely serve to mark the beginning or end of a set of related lumps.
It is possible to include other directory entries and lumps in a wad
file, e.g. an entry called CLOWNS could point to a lump that includes the
level creator's name, date of completion, and the latitude and longitude
of the Holy Grail. None of these non-standard entries will be used by
DOOM, nor will they cause it problems.
[2-1]: Pwads
============
There are two types of wad files. The original DOOM.WAD and DOOM2.WAD
files are "IWAD"s, or "Internal wads", meaning they contain all of the
data necessary to play. The other type is the "PWAD" file, "Patch wad",
an external file which has the same structure, but with far fewer entries
in the directory. The data in a pwad is substituted for the original data
in the DOOM.WAD, thus allowing for much easier distribution of new levels.
Only those resources listed in the pwad's directory are changed,
everything else is loaded from the IWAD. All external wads should have
the "PWAD" indicator, as id has requested.
A typical pwad might contain new data for a single level, in which
case it would contain the 10 lumps and 11 directory entries necessary
to define the level (as described in chapter [4]).
A pwad file may contain more than one level or parts of levels, in
addition to replacement graphics, sounds, etc. (as of version 1.666,
sprites and flats do NOT work from pwads - see chapter [5] for more).
In fact, there is apparently no limit to how many entries may be in a
pwad. The original doom levels are pretty complicated, and they are
from 50-200 kilobytes each in size, uncompressed.
Pwad files need to have the extension .WAD to work. Many of them have
descriptive names, e.g. if J.R.R. Tolkien made a new level, he might call
it GONDOLIN.WAD - to use this level, a player would type
DOOM -FILE GONDOLIN.WAD
at the command line, along with any other parameters. More than one
external file can be added, thus in general:
DOOM -FILE [pwad_filename] [pwad_filename] [pwad_filename] ...
If there are duplicate entries amongst the directories of all the
wads being "added", the pwads listed LAST take precedence.
When the game loads, a "modified game" message will appear if there
are any pwads involved, reminding the player that id Software will not
give technical support or answer questions regarding modified levels.
With DOOM version 1.666, there is also the @responsefile option for
listing command line parameters and -file specifications. See the DOOM
README or the latest FAQ for more information. Also, there are numerous
"front-end" utilities that make it easier to play pwads, e.g. load several
external files at once, warp to certain levels, specify options, etc.
[2-2]: DOOM versions
====================
Version Date Time Is
1.0 10dec93 01:00 first release (aka DOOM Operating System 0.99)
1.1 16dec93 01:10 slightly different from 1.0, newer dos extender
1.2 17feb94 01:20 modem play added!
1.3 - - unauthorized beta release
1.4 28jun94 01:04 shareware beta
1.5 ??jul94 ? shareware beta
1.6 03aug94 01:06 shareware beta
1.666 01sep94 16:42 registered full upgrade!
1.666 ? ? DOOM 2!
The important releases as of this writing are 1.2 and 1.666. Hopefully,
everyone will move up to 1.666 soon; it has many important improvements
over 1.2. The 1.4, 1.5, and 1.6 shareware betas contained increasing
amounts of the stuff that's now in 1.666, but there's no information
here about what exactly those changes were. One, I didn't keep track,
and two, they're not really important.
See appendix [A-3] for some miscellany about what has changed from
version to version.
[2-3]: Terminology conventions
==============================
Throughout this document, I will use the following conventions for
numbers and variable types:
(1) Most numbers will be decimal. Hexadecimal numbers will usually be
labeled thus: 0xffff or $ffff. But sometimes I'll say "hex ...".
And in tablature form, a column heading "HEX" indicates all the
numbers in that column are hexadecimal.
(2) "byte" is of course the generic, 8 bits. It will usually mean one
8-bit component of a larger data type, or an 8-bit ASCII
character, or some such. As a number, it is an unsigned 8-bit
integer (0..255).
(3) "short" is a signed 16-bit integer (-32768..32767), stored in
lo-hi format.
(4) "ushort" or "unsigned short" is an unsigned 16-bit integer (0..65535).
(5) "integer" or "long" is a signed 32-bit integer. If you don't read
this first, my use of the word "integer" might not be immediately
apparent.
(6) "string8" or "8-byte string" is an ASCII string with length between
1 and 8 characters inclusive. If its length is less than 8, the
remaining bytes are zeros.
(7) The first byte of a file or any data structure, for addressing and
offset purposes, is byte #0, not byte #1.
(8) Some abbreviations I use: E1, E2, and E3 refer to episodes 1, 2, and
3 respectively. "The EXE" means the file DOOM.EXE.
(666) Any reference to this number is purely intentional.
-----------------------------------------------
CHAPTER [3]: List of DOOM.WAD Directory Entries
-----------------------------------------------
There are over 2000 entries in the DOOM.WAD directory. Most of them
can be easily described in groups, and so are not explicitly mentioned
in this list. This includes the sprites (see [4-2-1] for sprite names
and [5] for the sprite lump naming system), the wall patches ([8-4] and
[8-5] have more info), the flats (chapter [6]), the sounds and songs
(chapter [7]), and the map data lumps (chapter [4]). All the others
are listed here.
There have been several changes from version to version. The "Ver"
column indicates in which doom versions the lump exists:
___ no indication means it is in every version. Most are like this.
1.1 it was in 1.0 and 1.1, but not in 1.2 and later. It is obsolete.
1.2 it is not in 1.1 and earlier, only in 1.2 and up.
1.6 it is not in 1.2 and earlier, only in 1.666 and up.
r it is only in the registered version, not the shareware.
1 it is only in DOOM 1, it is not in DOOM 2.
2 it is only in DOOM 2, it is not in DOOM 1.
In the lump names, x (and y and e) indicates variable ASCII
characters, and * can be replaced by an ASCII string (up to the
8-byte lumpname limit).
LumpName Ver Description
-------- --- -----------
PLAYPAL fourteen 256 color palettes. See [8-1].
COLORMAP maps colors in the palette down to darker ones. [8-2].
ENDOOM text message displayed when you exit to DOS. [8-3].
DEMOx x=1-3, are the demos. [8-6].
ExMy subsequent entries define a single level's data. [4].
MAPxy 2 like ExMy, but for DOOM 2.
TEXTURE1 list of wall texture names and their composition data,
used in the SIDEDEF portion of each level. [8-4].
TEXTURE2 r more wall texture compositions.
PNAMES lists all lump names used as wall patches. [8-5].
GENMIDI General Midi standard instrument data. [7-3].
DMXGUS Gravis Ultra Sound instrument patches. [7-4].
D_ExMy music for a doom 1 level. [7-2].
D_INTER music played on the summary screen between levels.
D_INTRO music played when the game starts.
D_INTROA 1.2 more introductory music.
D_VICTOR music played on the victory text-screen after an episode.
D_BUNNY r music for while a certain rabbit has his story told...
D_* 2 music for a doom 2 level.
DP_* vary PC speaker sound effects. [7-1].
DS_* vary Soundcard sound effects. [7-1].
All the remaining entries in the directory, except the flats between
F_START and F_END, and the "markers" like S_START, refer to lumps which
are pictures, in the doom/wad graphic format described in chapter [5].
The flats are also pictures, but in a format described in chapter [6].
The next seven are full screen (320 by 200 pixel) pictures. After
that, ST* are status-bar pictures, WI* are for the screens between
levels, and M_* are for menus.
HELP1 Ad-screen says Register!, with some screen shots.
HELP2 Actual help, all the controls explained.
TITLEPIC Maybe this is the title screen? Gee, I dunno...
CREDIT People at id Software who created this great game.
VICTORY2 r Screen shown after a victorious end to episode 2.
PFUB1 r A nice little rabbit minding his own peas and queues...
PFUB2 r ...a hint of what's waiting in Doom 2.
ENDx r x=0-6, big red "THE END" gets shot up.
AMMNUMx x=0-9. Small grey digits for ammo count (15/200 etc).
STxBARy 1.1 x=M or A, y= L or R. Status bar used to be in pieces.
STCHAT 1.1 Status bar used to have a "chat" box.
STRSNUMx 1.1 x=0-9. Small red digits.
STWEAPx 1.1 x=0-5. COOL little weapon icons. Why'd they drop them?
STFRAGS 1.1 Tiny "FRAG" to be placed on top of part of status bar.
STBAR 1.2 Status Bar as used in deathmatches.
STGNUMx x=0-9. Small grey digits used on the "Arms" panel.
STTNUMx x=0-9. Big red digits used for Armor, Health, etc.
STTMINUS 1.6 Big red "-" used for negative frags.
STYSNUMx x=0-9. Small yellow digits used on the "Arms" panel.
STTPRCNT Big red % used in Armor and Health.
STKEYSx x=0-5. Blue/Yellow/Red Keycards and Skullkeys.
STDISK Disk, used at bottom right corner during disk accesses.
STCDROM 1.6 CD, used during CD-ROM accesses.
STARMS "Arms" panel which replaces "Frags" in non-deathmatch.
STCFNxxx xxx=033-095, also 121. Small red ASCII characters.
STFBx x=0-3. Green/black/brown/red squares, for ST player faces.
STPBx x=0-3. Squares with bottoms, for inter-level screens.
STFSTxy x=0-4, y=0-2. Player face. x=0 is 100% health...x=4 is
very low health. y=0 is glancing right, y=2 left.
STFTLx0 x=0-4. Face looking left, player hurt from that direction.
STFTRx0 x=0-4. Face looking right.
STFOUCHx x=0-4. Face looking surprised (hurt bad).
STFEVLx x=0-4. Face with a grin (when pick up new weapons).
STFKILLx x=0-4. Face with a grimace (when killing foes).
STFGOD0 Face with yellow eyes (invulnerable).
STFDEAD0 Dead face.
BRDR_* Tiny pictures used as a border between a less-than-full
screen view and the "outside" marbleized zone. TL is
top left, BR bottom right, you can guess the rest.
WIBONUS 1.1 Medium sized red text "BONUS"
WISCORE 1.1 "SCORE"
WIMSTPx 1.1 x=0-3. Red text "ONE" to "FOUR".
WIMSTBx 1.1 x=0-3. Grey text "ONE" to "FOUR".
WIMINUS 1.6 Small red "-" used for negative frags.
WIMAPx x=0-2. 320x200 maps used on inter-level screens for e1,2,3.
WIAe0x0y patches used to animate inter-level maps.
WIURH0 "YOU ARE HERE" with an arrow pointing left.
WIURH1 "YOU ARE HERE" with an arrow pointing right.
WISPLAT Splat mark that indicates a completed level.
WIOSTK "KILLS"
WIOSTI "ITEMS"
WIF "FINISHED"
WIMSTT "TOTAL"
WIOSTS "SCRT"
WIOSTF "F."
WITIME "TIME"
WIPAR "PAR"
WIMSTAR "YOU"
WIPCNT "%"
WINUMx x=0-9. Medium sized red digits.
WICOLON ":"
WISUCKS "SUCKS"
WIFRGS "FRAGS"
WILVxy x=0-2, y=0-8. E(x+1)M(y+1) level names in grey/white letters.
WIPx x=1-4. Red "P1" - "P4", for multiplayer summaries.
WIBPx x=1-4. Grey "P1" - "P4"
WIKILRS Small red "KILLERS" going sideways up, for deathmatches.
WIVCTMS Small red "VICTIMS" for the top of the deathmatch chart.
WISCRT2 "SECRET"
WIENTER "ENTERING"
M_DOOM The DOOM logo
M_RDTHIS Big red "Read This!"
M_OPTION "Options"
M_QUITG "Quit Game"
M_NGAME "New Game"
M_SKULL1 The skull indicator with eyes lit.
M_SKULL2 The skull indicator with eyes unlit.
M_THERMO The marker on e.g. the Sfx volume "thermometer".
M_THERMR The right end of the thermometer.
M_THERML The left end.
M_THERMM The middle, repeated over and over.
M_ENDGAM "End Game"
M_PAUSE "Pause"
M_MESSG "Messages:"
M_MSGON "on"
M_MSGOFF "off"
M_EPISOD "Which Epsiode?"
M_EPI1 "Knee-Deep In The Dead"
M_EPI2 "The Shores Of Hell"
M_EPI3 "Inferno"
M_HURT "Hurt me plenty."
M_JKILL "I'm too young to die."
M_ROUGH "Hey, not too rough."
M_SKILL "Choose Skill Level:"
M_NEWG "NEW GAME" (title of New Game menu)
M_ULTRA "Ultra-Violence."
M_NMARE 1.2 "Nightmare!"
M_SVOL "Sound Volume"
M_OPTTTL "OPTIONS" (title of Options menu)
M_SAVEG "Save Game"
M_LOADG "Load Game"
M_DISP "Display"
M_MSENS "Mouse sensitivity"
M_GDHIGH "high"
M_GDLOW "low"
M_DETAIL "Graphic Detail:"
M_DISOPT "DISPLAY OPTIONS"
M_SCRNSZ "Screen Size"
M_SGTTL "SAVE GAME"
M_LGTTL "LOAD GAME"
M_SFXVOL "Sfx Volume"
M_MUSVOL "Music Volume"
M_LSLEFT Load/save box, left part
M_LSCNTR Load/save box, center part (repeated)
M_LSRGHT Load/save box, right part
The following entries are markers that do not point to a lump; they
have zero size:
S_START marks the start of the item/monster "sprite" section.
See chapter [5] for the naming convention used here.
S_END is immediately after the last sprite.
P_START marks the beginning of the wall patches.
P1_START before the first of the shareware wall patches.
P1_END after the last of the shareware wall patches.
P2_START r registered wall patches.
P2_END r registered wall patches.
P_END marks the end of the wall patches.
F_START marks the beginning of the flats (floor textures).
F1_START shareware flats.
F1_END shareware flats.
F2_START r registered flats.
F2_END r registered flats.
F_END marks the end of the flats.
-----------------------
CHAPTER [4]: The Levels
-----------------------
Each level has eleven directory entries and ten lumps: E[x]M[y] (or
MAPxy in a DOOM 2 wad), THINGS, LINEDEFS, SIDEDEFS, VERTEXES, SEGS,
SSECTORS, NODES, SECTORS, REJECT, and BLOCKMAP.
In the DOOM.WAD file, all of these entries are present for every level.
In a pwad external file, they don't all need to be present. Whichever
entries are in a pwad will be substituted for the originals. For example,
a pwad with just two entries, E3M6 and THINGS, would use all the walls
and such from the original E3M6, but could have a completely different
set of THINGS.
[4-1]: ExMy or MAPxy
====================
DOOM 1 levels have an ExMy label in a wad's directory. x is a single
(ASCII) digit 1-3 for the episode number and y is 1-9 for the mission
number.
DOOM 2 levels have a MAPxy label in a wad's directory. xy can range
from (ASCII) 01 to 32, for the level number.
This label just indicates that the lump names following it are part
of the designated level. The label does not actually point to a lump,
and the size field in the directory is 0. The assignment of lumps to
this level stops with either the next ExMy or MAPxy entry, or with a
non-map entry like TEXTURE1.
Without these labels, there would be no way to differentiate amongst
the many lumps named "THINGS", "LINEDEFS", etc.
[4-2]: THINGS
=============
"Things" in DOOM are player start positions, monsters, weapons, keys,
barrels, etc. The size of each THINGS lump will be a multiple of ten,
since each thing requires ten bytes to describe it, in five <short>
fields:
(1) X position of thing (at level's inception)
(2) Y position of thing
(3) Angle the thing faces. On the automap, 0 is east, 90 is north, 180
is west, 270 is south. This value is only used for monsters, player
starts, deathmatch starts, and teleporter landing spots. Other
things look the same from all directions. Values are rounded to
the nearest 45 degree angle, so if the value is 80, it will
actually face 90 - north.
(4) Type of thing, see next subsection, [4-2-1]
(5) Thing options, see [4-2-3]
[4-2-1]: Thing Types
--------------------
Short 4 of 5, occupying bytes 6-7 of each thing record, specifies its
kind. The table below summarizes the different types. They are listed
in functional groups. You can easily get a numerical-order list by
extracting this table and SORTing it.
Dec/Hex The thing's number in decimal and hexadecimal. This is the
number used in the THINGS lump on a level (ExMy or MAPxx).
V Version of DOOM needed to use this object:
no mark indicates all versions have this object
r requires registered DOOM or DOOM 2
2 requires DOOM 2
Spr The sprite name associated with this thing. This is the first
four letters of the lumps that are pictures of this thing.
seq. The sequence of frames displayed. "-" means it displays nothing.
Unanimated things will have just an "a" here, e.g. a backpack's
only picture can be found in the wad under BPAKA0. Animated
things will show the order that their frames are displayed
(they cycle back after the last one). So the blue key
alternates between BKEYA0 and BKEYB0. The soulsphere uses
SOULA0-SOULB0-C0-D0-C0-B0 then repeats. Thing 15, a dead
player, is PLAYN0.
+ Monsters and players and barrels. They can be hurt, and they
have a more complicated sprite arrangement. See chapter [5].
CAPITAL Monsters, counts toward the KILL ratio at the end of a level.
# An obstacle, players and monsters can't move through it.
^ Hangs from the ceiling, or floats (if a monster).
$ A regular item that players may get.
! An artifact item; counts toward the ITEM ratio at level's end.
Note that 2025, the radiation suit, was an ITEM in version
1.2, but it is not an ITEM in version 1.666 on. Also note
that 2022 and 2024, invulnerability and invisibility, do not
respawn in -altdeath games.
Dec. Hex V Spr seq. Thing is:
-1 ffff ---- - (nothing)
0 0000 ---- - (nothing)
1 0001 PLAY + Player 1 start (Player 1 start needed on ALL
levels)
2 0002 PLAY + Player 2 start (Player starts 2-4 are needed in)
3 0003 PLAY + Player 3 start (cooperative mode multiplayer games)
4 0004 PLAY + Player 4 start
11 000b ---- - Deathmatch start positions. Should have >= 4/level
14 000e ---- - Teleport landing. Where players/monsters land when
14 they teleport to the SECTOR containing this thing
3004 0bbc POSS + # FORMER HUMAN: regular pistol-shooting zombieman
84 0054 2 SSWV + # WOLFENSTEIN SS: guest appearance by Wolf3D blue guy
9 0009 SPOS + # FORMER HUMAN SERGEANT: black armor, shotgunners
65 0041 2 CPOS + # HEAVY WEAPON DUDE: red armor, chaingunners
3001 0bb9 TROO + # IMP: brown, hurl fireballs
3002 0bba SARG + # DEMON: pink, muscular bull-like chewers
58 003a SARG + # SPECTRE: invisible version of the DEMON
3006 0bbe r SKUL + ^# LOST SOUL: flying flaming skulls, they really bite
3005 0bbd r HEAD + ^# CACODEMON: red one-eyed floating heads. Behold...
69 0045 2 BOS2 + # HELL KNIGHT: grey-not-pink BARON, weaker
3003 0bbb BOSS + # BARON OF HELL: cloven hooved minotaur boss
68 0044 2 BSPI + # ARACHNOTRON: baby SPIDER, shoots green plasma
71 0047 2 PAIN + ^# PAIN ELEMENTAL: shoots LOST SOULS, deserves its
name
66 0042 2 SKEL + # REVENANT: Fast skeletal dude shoots homing missles
67 0043 2 FATT + # MANCUBUS: Big, slow brown guy shoots barrage of
fire
64 0040 2 VILE + # ARCH-VILE: Super-fire attack, ressurects the dead!
7 0007 r SPID + # SPIDER MASTERMIND: giant walking brain boss
16 0010 r CYBR + # CYBER-DEMON: robo-boss, rocket launcher
88 0058 2 BBRN + # BOSS BRAIN: Horrifying visage of the ultimate demon
89 0059 2 - - Boss Shooter: Shoots spinning skull-blocks
87 0057 2 - - Spawn Spot: Where Todd McFarlane's guys appear
2005 07d5 CSAW a $ Chainsaw
2001 07d1 SHOT a $ Shotgun
82 0052 2 SGN2 a $ Double-barreled shotgun
2002 07d2 MGUN a $ Chaingun, gatling gun, mini-gun, whatever
2003 07d3 LAUN a $ Rocket launcher
2004 07d4 r PLAS a $ Plasma gun
2006 07d6 r BFUG a $ Bfg9000
2007 07d7 CLIP a $ Ammo clip
2008 07d8 SHEL a $ Shotgun shells
2010 07da ROCK a $ A rocket
2047 07ff r CELL a $ Cell charge
2048 0800 AMMO a $ Box of Ammo
2049 0801 SBOX a $ Box of Shells
2046 07fe BROK a $ Box of Rockets
17 0011 r CELP a $ Cell charge pack
8 0008 BPAK a $ Backpack: doubles maximum ammo capacities
2011 07db STIM a $ Stimpak
2012 07dc MEDI a $ Medikit
2014 07de BON1 abcdcb ! Health Potion +1% health
2015 07df BON2 abcdcb ! Spirit Armor +1% armor
2018 07e2 ARM1 ab $ Green armor 100%
2019 07e3 ARM2 ab $ Blue armor 200%
83 0053 2 MEGA abcd ! Megasphere: 200% health, 200% armor
2013 07dd SOUL abcdcb ! Soulsphere, Supercharge, +100% health
2022 07e6 r PINV abcd ! Invulnerability
2023 07e7 r PSTR a ! Berserk Strength and 100% health
2024 07e8 PINS abcd ! Invisibility
2025 07e9 SUIT a (!)Radiation suit - see notes on ! above
2026 07ea PMAP abcdcb ! Computer map
2045 07fd PVIS ab ! Lite Amplification goggles
5 0005 BKEY ab $ Blue keycard
40 0028 r BSKU ab $ Blue skullkey
13 000d RKEY ab $ Red keycard
38 0026 r RSKU ab $ Red skullkey
6 0006 YKEY ab $ Yellow keycard
39 0027 r YSKU ab $ Yellow skullkey
2035 07f3 BAR1 ab+ # Barrel; not an obstacle after blown up
(BEXP sprite)
72 0048 2 KEEN a+ # A guest appearance by Billy
48 0030 ELEC a # Tall, techno pillar
30 001e r COL1 a # Tall green pillar
32 0020 r COL3 a # Tall red pillar
31 001f r COL2 a # Short green pillar
36 0024 r COL5 ab # Short green pillar with beating heart
33 0021 r COL4 a # Short red pillar
37 0025 r COL6 a # Short red pillar with skull
47 002f r SMIT a # Stalagmite: small brown pointy stump
43 002b r TRE1 a # Burnt tree: gray tree
54 0036 r TRE2 a # Large brown tree
2028 07ec COLU a # Floor lamp
85 0055 2 TLMP abcd # Tall techno floor lamp
86 0056 2 TLP2 abcd # Short techno floor lamp
34 0022 CAND a Candle
35 0023 CBRA a # Candelabra
44 002c r TBLU abcd # Tall blue firestick
45 002d r TGRE abcd # Tall green firestick
46 002e TRED abcd # Tall red firestick
55 0037 r SMBT abcd # Short blue firestick
56 0038 r SMGT abcd # Short green firestick
57 0039 r SMRT abcd # Short red firestick
70 0046 2 FCAN abc # Burning barrel
41 0029 r CEYE abcb # Evil Eye: floating eye in symbol, over candle
42 002a r FSKU abc # Floating Skull: flaming skull-rock
49 0031 r GOR1 abcb ^# Hanging victim, twitching
63 003f r GOR1 abcb ^ Hanging victim, twitching
50 0032 r GOR2 a ^# Hanging victim, arms out
59 003b r GOR2 a ^ Hanging victim, arms out
52 0034 r GOR4 a ^# Hanging pair of legs
60 003c r GOR4 a ^ Hanging pair of legs
51 0033 r GOR3 a ^# Hanging victim, 1-legged
61 003d r GOR3 a ^ Hanging victim, 1-legged
53 0035 r GOR5 a ^# Hanging leg
62 003e r GOR5 a ^ Hanging leg
73 0049 2 HDB1 a ^# Hanging victim, guts removed
74 004a 2 HDB2 a ^# Hanging victim, guts and brain removed
75 004b 2 HDB3 a ^# Hanging torso, looking down
76 004c 2 HDB4 a ^# Hanging torso, open skull
77 004d 2 HDB5 a ^# Hanging torso, looking up
78 004e 2 HDB6 a ^# Hanging torso, brain removed
25 0019 r POL1 a # Impaled human
26 001a r POL6 ab # Twitching impaled human
27 001b r POL4 a # Skull on a pole
28 001c r POL2 a # 5 skulls shish kebob
29 001d r POL3 ab # Pile of skulls and candles
10 000a PLAY w Bloody mess (an exploded player)
12 000c PLAY w Bloody mess, this thing is exactly the same as 10
24 0018 POL5 a Pool of blood and flesh
79 004f 2 POB1 a Pool of blood
80 0050 2 POB2 a Pool of blood
81 0051 2 BRS1 a Pool of brains
15 000f PLAY n Dead player
18 0012 POSS l Dead former human
19 0013 SPOS l Dead former sergeant
20 0014 TROO m Dead imp
21 0015 SARG n Dead demon
22 0016 r HEAD l Dead cacodemon
23 0017 r SKUL k Dead lost soul, invisible
(they blow up when killed)
[4-2-2]: Thing Sizes
--------------------
The list below gives the radius, height, mass, speed, and toughness
of all the monsters in DOOM 1 and 2. Almost all non-monster things only
differ in their "radius", dependent on whether they are obstacles or not.
For collision purposes, things are NOT circular. They occupy a square
whose side equals slightly more than 2 times the radius. This square
does not turn, it is always aligned with the x and y axes of a level.
Consider a simple collision detection in a coordinate plane:
IF (ABS(x1-x2) =< (r1+r2)) AND (ABS(y1-y2) =< (r1+r2)) THEN *collision*
This will result in square objects centered on their (x,y) positions,
and that is the behavior that DOOM objects exhibit.
I don't know why the horizontal size is "slightly more" than 2 times
the radius, but it is. A player cannot enter a corridor of width 32, but
can enter a corridor of width 33. Experiments have shown that no monster
can enter a corridor that is exactly (2*radius) wide. It must be bigger.
Moving up to the next multiple of 8 is a good idea, if not 16 or 32.
Monsters CAN enter sectors that are exactly "Height" high. But obstacles
are infinitely high for collision purposes. A player on a very high ledge
might not be able to jump off, because of an obstacle right next to him,
even though it is far below him.
Height is also used when under a crushing ceiling, and to determine
if an object can move from one sector to another. The space between the
highest floor and the lowest ceiling must be "Height" or greater for the
object to fit.
Toughness indicates how much punishment a monster can take until it
dies. Bullets do 10 damage, Shotgun shells 70 (7 pellets, each is 10),
Plasma 20, Rockets 100, and the BFG does 1000 for a direct hit. There's
more info on this stuff in the DOOM FAQ.
Dec. Hex Radius Height Mass Tough Speed Sprite name or class of things:
- - 16 56 100 (100) - PLAY
3004 0bbc 20 56 100 20 8 POSS
84 0054 20 56 100 50 8 SSWV
9 0009 20 56 100 30 8 SPOS
65 0041 20 56 100 70 8 CPOS
3001 0bb9 20 56 100 60 8 TROO
3002 0bba 30 56 400 150 10 SARG
58 003a 30 56 400 150 10 SARG (Inviso model)
3006 0bbe 16 56 50 100 8 SKUL
3005 0bbd 31 56 400 400 8 HEAD
69 0045 24 64 1000 500 8 BOS2
3003 0bbb 24 64 1000 1000 8 BOSS
68 0044 64 64 600 500 12 BSPI
71 0047 31 56 400 400 8 PAIN
66 0042 20 56 500 300 10 SKEL
67 0043 48 64 1000 600 8 FATT
64 0040 20 56 500 700 15 VILE
7 0007 128 100 1000 3000 12 SPID
16 0010 40 110 1000 4000 16 CYBR
88 0058 16 16 6666 250 0 BBRN
72 0048 16 72 6666 100 0 KEEN
2035 07f3 10 42 100 20 0 BAR1
- - 20 16 - - - most non-obstacles (e.g. gettables)
- - 16 16 - - - most obstacles
54 0036 32 16 - - - large brown tree
[4-2-3]: Thing Options
----------------------
Short 5 of 5, occupying bytes 8-9 of each thing record, control a
few options, according to which bits are set:
bit 0 the THING is present at skill 1 and 2
bit 1 the THING is present at skill 3 (hurt me plenty)
bit 2 the THING is present at skill 4 and 5 (ultra-violence, nightmare)
bit 3 indicates a deaf guard.
bit 4 means the THING only appears in multiplayer mode.
bits 5-15 have no effect.
The skill settings are most used with the monsters, of course...the
most common skill level settings are hex 07/0f (on all skills), 06/0e
(on skill 3-4-5), and 04/0c (only on skill 4-5). Unusual skill settings
are perfectly allowable, e.g. hex 05 for a thing which is present on
skill 1, 2, 4, and 5, but not skill 3.
"deaf guard" only has meaning for monsters, who will not attack until
they see a player if they are deaf. Otherwise, they will activate when
they hear gunshots, etc. (including the punch!). Sound does not travel
through solid walls (walls that are solid at the time of the noise).
Also, lines can be set so that sound does not pass through them (see
[4-3-1] bit 6). This option is also known as the "ambush" option (or
flag, or attribute).
[4-3]: LINEDEFS
===============
Each linedef represents a line from one of the VERTEXES to another,
and each linedef's record is 14 bytes, containing 7 <short> fields:
(1) from the VERTEX with this number (the first vertex is 0).
(2) to the VERTEX with this number (31 is the 32nd vertex).
(3) flags, see [4-3-1] below.
(4) types, see [4-3-2] below.
(5) is a "tag" or "trigger" number which ties this line's effect type
to all SECTORS that have the same tag number (in their last
field).
(6) number of the "right" SIDEDEF for this linedef.
(7) "left" SIDEDEF, if this line adjoins 2 SECTORS. Otherwise, it is
equal to -1 (FFFF hex).
"right" and "left" are based on the direction of the linedef as
indicated by the "from" and "to", or "start" and "end", VERTEXES.
This sketch should make it clear:
left side right side
start -----------------> end <----------------- start
right side left side
IMPORTANT: All lines must have a right side. If it is a one-sided
line, then it must go the proper direction, so its single side is
facing the sector it is part of. DOOM will crash on a level that has
a line with no right side.
[4-3-1]: Linedef Flags
----------------------
The third <short> field of each linedef controls some attributes of
that line. These attributes (aka flags) are indicated by bits. If the
bit is set (equal to 1), the condition is true for that line. If the
bit is not set (equal to 0), the condition is not true. Note that the
"unpegged" flags cannot be independently set for the two SIDEDEFs of
a line. Here's a list of the flags, followed by a discussion of each:
bit Condition
0 Impassible
1 Block Monsters
2 Two-sided
3 Upper Unpegged
4 Lower Unpegged
5 Secret
6 Block Sound
7 Not on Map
8 Already on Map
9-15 unused
0 (Impassible) - Players and monsters cannot cross this line. Note that
if there is no sector on the other side, they can't go through the line
anyway, regardless of the flags.