Static limits


This is a list of static limitations of the vanilla Doom engine, including Heretic, Hexen, and Strife. In addition, Doom Classic and Strife: Veteran Edition are also covered. Note that rendering-related limits (such as MAXVISSPRITES) do not apply to Strife: Veteran Edition's hardware-accelerated renderer, and are only used when the game is using its "classic" renderer.

A number of limits are caused by the engine using static arrays for storing data, the size of which is defined in the code.

Name Value Raised values Note
Hexen Strife SVE DC Unity
BACKUPTICS 12 64 64 Used to size the localcmds array.
HU_MAXLINELENGTH 80 Maximum message length.
HU_MAXLINES 4 Number of messages remembered.
MAX_ADJOINING_SECTORS 20 Used to find the next highest floor.
MAX_DM_STARTS 10 16 Removed Player spawn spots for deathmatch. Called MAXDEATHMATCHSTARTS in Hexen.
MAXANIMS 32 40 40 Maximum amount of animated flat and texture types in a level. (Not sectors and lines.)
MAXARGVS 100 N/A Command line parameters
MAXBUTTONS 16 4 players, 4 buttons each at once, max. Not increased in Hexen or Strife despite increased MAXPLAYERS. Game will not exit if exceeded in SVE.
MAXCEILINGS 30 Removed Active ceilings.
MAXDRAWSEGS 256 Removed 1280 4096
MAXEVENTS 64 1024 Networking and tick handling related. The localcmds array's size is MAXPLAYER*BACKUPTICS.
MAXINTERCEPTS 128 Strife does not crash, malfunction, or exit if this limit is exceeded.
MAXLINEANIMS 64 96 96 Maximum number of wall scrollers (line type 48) in a level.
MAXNETNODES 8 16 16 16 Max computers/players in a game.
MAXOPENINGS SCREENWIDTH*64 64000 SCREENWIDTH is normally 320; however it is tripled to 960 in the Classic Doom port included with Doom 3: BFG Edition. SCREENWIDTH is 852 in the Doom Classic Unity port due to widescreen. A value of 320*200, or 64000, is sufficient to remove this limit in the vanilla engine as a factor, since there cannot be more openings than can be displayed on a per-pixel basis.
MAXPLATS 30 Removed
MAXPLAYERS 4 8 8 8 The maximum number of players, multiplayer/networking.
MAXSEGS 32 161 427 Number of solidsegs structures that can be generated in one frame. A value of SCREENWIDTH/2 + 1 (or 161) is sufficient to remove this limit in the vanilla engine as a factor, since there cannot be more solidsegs generated than this value.
MAXSLIDEDOORS 5 8 8 Unused, related to the uncompleted sliding door code. Used for animated doors in Strife.
MAXSPECIALCROSS 8 20* Maximum number of special hits (spechit). In Strife: Veteran Edition, overflows are emulated after the normal limit of 8 is exceeded.
MAXSWITCHES 50 80 80 Maximum number of switch texture animations that can be internally defined.
MAXVISPLANES 128 160 200 Removed 384 1024 Michael Raymond-Judy mentions increasing the visplane limit for Heretic (it was lower at the time Heretic was created, either 32 or 64).
MAXVISSPRITES 128 192 4096
MAXWADFILES 20 The maximum number of files that can be loaded, IWAD included.
Heretic limits
Name Value Note
MAX_AMBIENT_SFX 8 Maximum number of global Heretic ambient sound things.
MAX_BOSS_SPOTS 8 Maximum number of teleport destinations for D'Sparil.
MAX_MACE_SPOTS 8 Maximum number of firemace spawn spots.
Hexen limits
Name Value Note
MAX_ACS_MAP_VARS 32 Number of separate ACS variables with map scope.
MAX_ACS_SCRIPT_VARS 10 Number of separate ACS variables with local scope in a single script.
MAX_ACS_STORE 20 Number of scripts that can be "remotely" started in other maps.
MAX_ACS_WORLD_VARS 64 Number of separate ACS variables with world scope in a hub.
MAX_ANIM_DEFS 20 Number of animations defined in ANIMDEFS
MAX_FRAME_DEFS 96 Number of individual frames used by all animations defined in ANIMDEFS
MAX_TAGGED_LINES 64 Number of lines with a non-zero tag (through Line_SetIdentification)
MAX_TID_COUNT 200 Maximum number of mobjs with a non-zero TID in a map


Main article: Visplane overflow

The most famous limit of them all, there are 128, and each one represents a unique combination of floor or ceiling height, light level, and texture present in a rendered scene. In the worst case each subsector will generate at least two visplanes if its floor and ceiling are in view, but these may be merged—or split—as the game engine draws the scene. The only means in which to improve this are to make a level less detailed in areas visible from the spot it happens, add sight-obstructing walls, or move areas up or down vertically so that the floors or ceilings are not visible.


Main article: Visible sprites limit

Doom will not draw more than 128 sprites at one time. If there are too many, the extra ones will flicker in and out of view, depending on the sorting order.


Doom will not render more than 256 segs (128 in earlier versions) in a single scene. The rest will become HOM. Doom draws from front to back, so the furthest lines away from the player will typically disappear first.


Main article: Map size limit (blocks)

The maximum size of a vanilla blockmap is hard to define. However the amount of 128*128 big blocks has a practical upper limit of about 32750 blocks, as these and the start of the blockmap list(s) must be within the first 65536 bytes of the blockmap lump.

Even a relatively simple map with only 4 linedefs can exceed the blockmap limit if it is made to cover enough area, because the size of the blockmap is a function of both the number of linedefs in the map, and the amount of area it covers in 128x128 blocks. Maps that exceed the blockmap limits can crash vanilla Doom.


The number of these map entities cannot exceed 32767 due to hard data type size limits in the map format. Practically speaking, the segs limit is always the first one exceeded, and thus imposes an even more stringent limit on the other entities, of which the number of segs is partially a function.

Plats & ceilings[edit]

Main article: Moving platforms limit

Only 30 platform actions can be active at one time. Exceeding this limit will cause a bomb-out with error message.

There can also only be 30 active non-door ceiling effects at a time, and if this limit is exceeded, all ceiling sectors beyond this limit will become unresponsive to subsequent actions, and will keep making noise permanently.


If more than 16 switches are activated at once, the game will bomb out.


Main article: Spechits overflow

Crossing more than 8 special linedefs in a single tic will cause an internal overflow, and undefined behavior will result.


If a bullet tracer crosses too many things and lines (more than 128), an internal overflow will happen, causing undefined behavior. This sometimes results in the bug known as "all-ghosts". Note that while the limit on intercepts tracked still exists in Strife, that game includes a fix to the code which stops a tracer from progressing any further if the intercepts array is detected to be full, preventing the overflow condition.


Savegames are limited in size to around 180 KB. If the saved memory footprint of your map is larger than this, including because of dynamically spawned objects such as missiles or monsters spawned by the final boss, the game will bomb out.


The number of alternating regions of solid and transparent linedefs have some esoteric limits. If this exceeded, for instance with too many fenceposts, the game will crash. Like most things in the engine, openings are stored in a static array. Its dimensions are defined as "SCREENWIDTH * 64", giving a maximum total of 20480 for the vanilla resolution of 320x200.


Main article: Excessive scrolling texture overflow

Having more than 64 scrolling lines creates an overflow condition, with unpredictable results including a possible engine crash.

Adjoining sectors[edit]

Only up to 20 adjoining sectors are considered for effects such as "floor raise to next highest floor". The overflow is benign at 21 sectors, but fatal at 22 or more where it results in a crash.


Because of the fixed-point format used by Doom, the integral part of coordinates is effectively a signed 16-bit number, restricted to values between -32768 and 32767. Values outside of this range simply cannot be expressed.

This amplitude restriction concerns both absolute and relative coordinates, as the same units are used when calculating distances between two points, so diagonal dimensions are concerned as well. In practical terms, it is safer to keep the map boundaries between -16384 and +16383.

Even limit removing ports do not generally raise this limit, since increasing it requires either moving to floating-point arithmetic or to 64-bit format.

Demo length[edit]

Recorded demos have a default maximum file size of 128KB. The game abruptly exits if this limit is reached during recording. Longer demos can still be played back, however.

The limit can be raised using the -maxdemo parameter, but only up to the executable's remaining free memory (see below). This varies from machine to machine, but seems to top out around 4MB (or 8 hours, 19 minutes, 19 7/35 seconds of solo play).

Total RAM used[edit]

The memory pool in Doom or Doom II is hard-coded to 6 MB (see the file i_system.c).

In Doom 3: BFG Edition the memory pool in Doom and Doom II is hard-coded to 15 MB (see the file z_zone.cpp).

See also[edit]