The Map Engine

The map engine consists of several parts that work together to display the game world on screen.

Map Data

The landmap holds the data of the map: the actual graphics used on that map, and the information how to place them. A single map can contain multiple, independent terrains that share the same graphics though. All terrains (or submaps) of a map are kept in memory, so transition between them is fast. Therefore it is desirable to keep related areas, like different levels of a dungeon or the floors of a building, on the same map.

The Renderer

The data on its own is only of little use as long as there is no way of displaying it. This is the mapview's task. It renders a certain area of the map and everything on it onto a surface. That way, it can be as easily displayed on screen as it can be saved to disk.

The mapview itself is rather dumb and without further instructions it would render the same part of the map for the rest of eternity. A python script can be used to achieve a dynamic behaviour of the mapview, like following the player around the map. This script is called once every cycle of the game and has access to practically all API functions and in-game data, to permit as much flexibility as possible.


Generated on Wed Jun 18 16:51:57 2008 for Adonthell by  doxygen 1.5.6