automap

Module(s): vncanvas-base, vncanvas-cmds, vncanvas-atmo
Description: Provides an auto-revealing minimap to be used with 'tile' navigation.

  • Not to be confused with 'map' navigation.
  • Uses two reserved user variables:
    "_nav_pos" for the tile position,
    "_nav_automap" for the minimap revealed positions

automap, {param}
Define a minimap for tile navigation.
Parameters are given as {param:value, param:value, ...}
automap, "show"
automap, "hide"
Shows or hides the current minimap.
Parameter Attributes and Description
src:"minimap_image"
The image to display.
size:[x_size, y_size]
Defines the minimap in terms of number of tiles horizontally and vertically. The actual size of the tile in pixels is then computed from this using the minimap image dimensions.
offset:[x_offset, y_offset]
Optional
Defines the offset of the top left corner of the image. Default is [0,0].
Before defining any of the tiles, first define and display the minimap.
  
chapter = [

	...
	automap, {src:"minimap.png", offset:[660,180], size:[3,3]},
	...
];
						
Then, create a definition for each tile. To indicate the position on the minimap, use the 'map' parameter.
  
chapter = [

	...
	tile, {id:"T1",
		wall:["wall1n.jpg", "wall1e.jpg", "wall1s.jpg", "wall1w.jpg"],
		link:["T1", "T3", "T1", "T1"],
		map:[2,1]
	},
	/* this puts current position as 2 tiles to the right and 1 tile down */
	...

];
						
See also 'tile' navigation.
For a complete example, see Navigation Demo.