Glimmr Automap

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Section: Memory allocation for the map

    The Automap extension can dynamically change the maximum size of its map array, but this feature causes some interpreters to crash. Glimmr Automap does not allow dynamic allocation of memory to the map array. What this means for veteran Automap users is that the "use static allocation" option is always set, and the maximum size of the map must be set *at compile time* using the "use automap reserved area of at least X" use option. (Note that, due to a limitation in Inform, this number looks like a minimum, but is in fact a maximum.)

    It is therefore important that we set the automap reserved area to a number that is high enough for our map to display as we want it to. GLAM calculates the dimensions by determining the number of tiles that would in the graphics window at the current zoom level. If GLAM calculates that the window would hold 45 horizontally and 24 tiles vertically, then the total number of tiles would be 45 x 24 = 1080. The default value set by Glimmr Automap is rather arbitrary (3200), but probably adequate to most purposes. We can in any case set the value higher if we like:

         Use automap reserved area of at least 3400.

    If for some reason we need to make the automap reserved area less than 3200, we need to replace the section titled "Section - Maximum map size use option". If we want to make it less than 400, we need to edit the Automap extension directly. (We can make the *map*--as opposed to the memory reserved for it--smaller by setting maximum dimensions; see below.)

    Use the "map dump" debugging command to see the dimensions and total number of tiles of your map at any given zoom level and window size.

    Note that there is an odd circumstance that affects text-only interpreters, rooted in Automap's design: setting the "use automap reserved area" to higher numbers will move the text map toward the center of the window; the lower the number, the more toward the right side of the screen it will display. The 3200 default value ought to properly center the map on most screens, but try testing in the Quixe interpreter (which, as of fall 2010, does not support graphics windows) to preview the appearance of the text-only map.