Editing Map metrics

From Quake Wiki

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 39: Line 39:
 
In vanilla game the map is stored in BSP29 format which was targeted at medium level Pentium chip (e.g. around 90 Mhz) with medium amount of system memory. As such, limitations imposed on maps are quite severe (at least by today's standards).
 
In vanilla game the map is stored in BSP29 format which was targeted at medium level Pentium chip (e.g. around 90 Mhz) with medium amount of system memory. As such, limitations imposed on maps are quite severe (at least by today's standards).
  
While all BSP29 coordinates (of vertices for example) are expressed as floats during runtime internally (potentially allowing for very big maps), actual map allows only +/-32767u (u = in game units) per axis due to signed shorts (int16_t) being used for nodes and leafs limits, and structure indexing is using only 16bit indexes and that and means only around 65535 objects of any kind, and in many cases much less.  
+
While all BSP29 coordinates (of vertices for example) are expressed as floats during runtime internally (potentially allowing for very big maps), actual map allows only +/-32767 per axis due to signed shorts (int16_t) being used for nodes and leafs limits, and structure indexing is using only 16bit indexes and that and means only around 65535 objects of any kind, and in many cases much less.  
  
 
These index limits can be exhausted very quickly (especially if mapper is not very careful with resource budgets and their economy), in many ways: very detailed geometry (running out of slots for map objects: vertices, edges or triangles/faces), very big flat surfaces (remember Quake 1 compilers usually subdivide surfaces automatically, to allow for lightmapping, and one surface quad subdivision requires quite a lot of resource objects to express: vertices, edges, triangles/faces), lightning (with animated lights, each face requires as many textures as the light style has light levels, more over rays from multiple animating lights hitting single face increase lightmap requirements exponentially due to combinatorial explosion caused by lightstyles for each light interacting) and so on.
 
These index limits can be exhausted very quickly (especially if mapper is not very careful with resource budgets and their economy), in many ways: very detailed geometry (running out of slots for map objects: vertices, edges or triangles/faces), very big flat surfaces (remember Quake 1 compilers usually subdivide surfaces automatically, to allow for lightmapping, and one surface quad subdivision requires quite a lot of resource objects to express: vertices, edges, triangles/faces), lightning (with animated lights, each face requires as many textures as the light style has light levels, more over rays from multiple animating lights hitting single face increase lightmap requirements exponentially due to combinatorial explosion caused by lightstyles for each light interacting) and so on.
  
Finally, player movement is severely limited further by network protocol and it's position/movement packets framing: in vanilla Quake the network layer is able to express player position only in measly range of +/-4000u, on any axis. If players gets near any of those limits on any axis, their position on that axis is "wrapped around". This means that player will "instantly teleport" to other side of the map (i.e. opposing minimum/maximum limit, depending on limit hit) while maintaining direction and acceleration they had when they hit the given limit.  
+
Finally, player movement is severely limited by network protocol and it's position/movement packets framing: in vanilla Quake the network layer is able to express player position only in range -4000 to 4000 map units, on any axis. If players gets near any of those limits on any axis, their position on given axis is "wrapped around". This means that player will "instantly teleport" to other side of the map (i.e. opposing minimum/maximum, depending on limit hit) while maintaning direction and acceleration they had when they hit the given limit.  
  
The network protocol is always the limiting factor, even in single player mode, because the client/renderer part (what player sees) and server part (how player moves and collides) are the same between both single player and network play, only in SP mode, network communication is emulated using memory buffers. This client server design is described further here: xxx.
+
The network protocol is always a limiting factor, even in single player mode, because the client/renderer part (what player sees) and server part (how player moves and collides) are the same between both single player and network play, only in SP mode, network communication is emulated using memory buffers. This client server design is described further here: xxx.
 
+
The limitation of +-4000 units was probably chosen to conserve both emulated (SP) and real network code (MP) memory requirements and it also matched well to initial target hardware platform performance characteristics.
The limitation of +/-4000u (i.e. maps can be "only" 8000u wide) was probably chosen to conserve both emulated (SP) and real network code (MP) memory requirements and it also matched well with initial target hardware platform performance characteristics.
 
  
 
Vanilla engines are unable to load BSP2 maps due to binary format difference.
 
Vanilla engines are unable to load BSP2 maps due to binary format difference.

Please note that all contributions to Quake Wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see Quake Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)