Glimmr Automap

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section: Glimmr Automap debugging commands

    The map-renderer g-element is not an image-map (it reads a different data structure, a flat I6 array rather than an I7 list), but it is very similar in the way it renders a grid of images. For that reason, we provide debugging commands and capabilities analogous to those that Glimmr Canvas-Based Drawing provides for image-maps. To see which tiles have individual graphic hyperlinks, include this use option:

        Use image-map graphlink preview.

    This will draw a thin gray box around each tile in the map that is graphlinked (that is, receptive to mouse input). We can change the color of the preview box by setting the "graphlink preview color" global variable to a glulx color value, e.g.

        The graphlink preview color is g-Lavender.

    Note that if the graphlink preview color is set to null (that is, g-PlaceNullCol), no box will be visible.

    We can "dump" the automap data to the screen by typing "DUMP MAP" in-game, and if we are running the game in the IDE, this will print the grid, using tile numbers, to the main window. The data dump also includes information about the size of the map, the tiles, the window, and the canvas.

    In addition to dumping the map data, we can dump the contents of the automap links array, also provided by the Automap extension. The automap links array is the same size and shape as the map data array but it contains the room names of each tile that is linked to a room. (This is the array that powers the query function, and can also be used to go to rooms when the player clicks on them in the map.) The command to dump the links array is "DUMP AUTOMAP LINKS".