Difference between revisions of "Moving platforms limit"

From DoomWiki.org

[unchecked revision][unchecked revision]
(er... that's "lower floor", not "lower sector". obviously. :>)
(rewrite)
Line 1: Line 1:
{{Template:stub}}
+
Doom contains a limit on the number of platforms which can be moving simultaneously.  A platform is defined as a sector with a moving floor.  The limit in [[Vanilla Doom]] is 30. If the platform limit is exceeded, the game quits with the message "No more plats!".
  
A linedef with a "lower floor" type, but no tag, attempts to lower every untagged sector in the level when triggeredIn [[vanilla Doom]], this normally results in an [[Doom engine|engine]] crash and the error message "P_AddActivePlat: No more plats!".
+
A simple way to deliberately trigger this error is to create a [[linedef]] to trigger a [[Linedef types |moving floor]].  If the linedef is given no tag (ie. a tag of 0), triggering it will attempt to cause every untagged sector in the level to start movingOn any reasonably sized level this will cause the limit to be exceeded.
 +
 
 +
== Technical ==
 +
 
 +
The limit itself is found in [[Doom source code:files |p_spec.h]]:
 +
 
 +
#define MAXPLATS              30
 +
 
 +
The code responsible for the limit is found in p_plats.c. Specifically, there is an array with a static array which depends on the limit:
 +
 
 +
plat_t*        activeplats[MAXPLATS];
  
 
[[Category:Errors and bugs]]
 
[[Category:Errors and bugs]]
 
[[Category:Doom engine]]
 
[[Category:Doom engine]]

Revision as of 04:03, 29 September 2005

Doom contains a limit on the number of platforms which can be moving simultaneously. A platform is defined as a sector with a moving floor. The limit in Vanilla Doom is 30. If the platform limit is exceeded, the game quits with the message "No more plats!".

A simple way to deliberately trigger this error is to create a linedef to trigger a moving floor. If the linedef is given no tag (ie. a tag of 0), triggering it will attempt to cause every untagged sector in the level to start moving. On any reasonably sized level this will cause the limit to be exceeded.

Technical

The limit itself is found in p_spec.h:

#define MAXPLATS               30

The code responsible for the limit is found in p_plats.c. Specifically, there is an array with a static array which depends on the limit:

plat_t*         activeplats[MAXPLATS];