Map
From GPWiki
The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server. However, the GPWiki forums are still active! Come say hello. There are two main definitions of Maps within Game Programming.
[edit] Map - Game ContentMaps are files used in games to define the layout of a playable area in a game program. These files contain the data defining the area/level in a custom data format. In real-time, the program will read the file and interpret its contents to get the number, positions, orientations and other data on objects within the game. The advantage of this is that the data can be easily manipulated by a non-programmer using an external tool (whether by an artist during development or by modders after the product is released). It also makes the content easier to manage when it is not all hard-coded. [edit] Map - ProgrammingA map in programming is a one-to-many key-value relationship between different objects. A map is an abstract data structure that can have any implementation. In essence, a map stores some values. These values can be any type of object. The values are entered with a key. The key is then used to determine which value the Map should get when asked to retrieve a value. The key is often a string but can be any object. If the key is an object, the Map may compare the memory locations of the objects to see if they are the same or there may be a polymorphic reference to a compare method. [edit] Common Functions of MapsThese are some common uses of Maps:-
[edit] Examples of MapsThese are some common uses of Maps:-
|


