A map is the technical name for a level for a FPS game like Quake.
The term "map" comes originally comes from DooM where the levels were represented as 2D sectors as viewed from above with floor and ceiling heights to define the 3rd dimension. When drawn as a line diagram in this way, a level can be displayed as a map and was done in the game (by hitting the TAB key). This gave rise to the naming of DooM levels as "maps" and was further enforced in DooM2 by the actual naming of the levels as MAP01, MAP02... etc.
In DooM, a map is represented by a number of vertexes (sp), linedefs, and sectors:
This data is then processed by a BSP processor to generate compiled data which is used in game for collision detection and hidden surface removal.
All this data is stored in a .wad file which is a zero compression archive format which defines each of the above pieces of data as a "lump". All data (even pre-compiled data which is not used by the game) is stored in the WAD file, thus allowing anyone access to the pre-compiled level and thus the ability to edit them.
With the release of Quake, the term "map" was again further enforced by the console command "map xxx" which loads a particular level and by the file extension given to pre-compiled level data files (.map files).
In Quake, a map is definded by a number of brushes which are placed together to build the structural objects in the game world.
In the original Quake, there are two types of brush. Structural as described above, and entity. There are also two types of entity, point as described above, and brush (aka solid-entity).
A brush-entity is a brush/entity hybrid. It has the properties of an entity but the structural nature of a brush. Basically a brush-entity is some game world structure which moves... doors, lifts, and buttons are all brush-entities.
Level structure is defined in .map files. These files are ASCII text files which define all the brushes and entities needed to make up the level. This data is then passed through a BSP processor (QBSP) to generate a compiled level which can be run in the game (a .bsp file).
Two other processing passes can be applied to the .bsp file:
Quake "maps" do not resemble maps at all. They are 3 dimensional and cannot be easily viewed as a plan view, and there is no map view in Quake (unlike in DooM). So really the only reason they are called "maps" is due to the naming of levels in DooM.
There are of course lots of other FPS style games, many based on 3D engines other than the Quake engine. However, the term "map" is used across engines to mean a single level in the game world.
Multimaps are just the same as maps, but they allow duplicate keys. They are created through use of the template class std::multimap.
Programming: A higher-order function which, when applied to a function (or a block or expression) and a list (or array), iterates over the list, applies the function to each element, and returnds a list composed of the results. For example, if you map a list containing the numbers 1, 2, and 3, using a function that returned the value of its argument plus 1, then you would get a list containing the numbers 2, 3, and 4. In many programming languages, there is a map function which is either part of the standard library (as in Haskell - map is defined in the Prelude) or defined internally (as in Perl).
map can be defined in Haskell as
map :: (a -> b) -> [a] -> [b] map f [] = [] map f (item:list) = f item : map f list
In imperative langauges, map is replacing iterative loops as a way of processing lists of data. For example, in Perl, things like
for (my $i = 0; $i < @m; $i++) { $usernames[$i] = getpwuid $uids[$i]; }
which is the way it would be done in C (and is remarkably similar to the corresponding C code), can be written more nicely as
@usernames = map { getpwuid $_ } @uids;
instead. This elegance becomes even more apparent when multiple maps are strung together, as in the Schwartzian transform. Examples of usage:
map (+1) [1, 2, 3] -- result: [2, 3, 4]
In Perl, array elements are associated to $_ inside the block passed to map. Modifying $_ inside the block will modify the corresponding array element (which is an error if the array is a constant).
map { $_ + 1 } qw(1 2 3); # result: qw(2 3 4)
A nifty trick is to have the map block return pairs which you then assign to a hash, e.g. creating a hash which maps letters to numbers:
%h = map { $_ => ord($_) - ord('a') + 1 } 'a' .. 'z';
(map (lambda (n) (+ 1 n)) '(1 2 3)) ; result: '(2 3 4)
In Ruby, map is a method of the Array class, spelt "collect". You can use the collect! method to modify elements with the result of the block. Both can be used on constant arrays.
[1, 2, 3].collect { |x| x + 1 } # result: [2, 3, 4]
Also, when discussing code, "map" can be used as a verb, meaning to process some data using the map function, e.g. "The user ids then get mapped to usernames".
"A map is a 2 dimensional representation of a 3 dimensional shape, showing natural and man made feautres, drawn to scale, at a particular point in time." - Australian Cadet Manual
A little analysis of the components of the quote:
Amazing what you can derive from one short definition!
Map (?), n. [From F. mappe, in mappemonde map of the world, fr. L. mappa napkin, signal cloth; -- a Punic word. Cf. Apron, Napkin, Nappe.]
1.
A representation of the surface of the earth, or of some portion of it, showing the relative position of the parts represented; -- usually on a flat surface. Also, such a representation of the celestial sphere, or of some part of it.
⇒ There are five principal kinds of projection used in making maps: the orthographic, the stereographic, the globuar, the conical, and the cylindrical, or Mercator's projection. See Projection.
2.
Anything which represents graphically a succession of events, states, or acts; as, an historical map.
Thus is his cheek the map of days outworn. Shak.
Map lichen Bot., a lichen (Lecidea geographica.) growing on stones in curious maplike figures.
Dr. Prior.
© Webster 1913.
Map, v. t. [imp. & p. p. Mapped (?); p. pr. & vb. n. Mapping (?).]
To represent by a map; -- often with out; as, to survey and map, or map out, a county. Hence, figuratively: To represent or indicate systematically and clearly; to sketch; to plan; as, to map, or map out, a journey; to map out business.
I am near to the place where they should meet, if Pisanio have mapped it truly. Shak.
printable version chaos
Everything2 Help