Glimmr Drawing Commands

version 2/101030 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next

  • Chapter: Debugging

    Glimmr Drawing Commands does not include any special debugging commands. However, like all Glimmr extensions, it includes a debugging log. To use the log, enable this use option:

        Use Glimmr debugging.

    Now Glimmr functions will announce themselves, as well as the particular extension that generated them (e.g., Glimmr Canvas-Based Drawing, Glimmr Drawing Commands, etc.) as they fire. Be warned that, under normal usage, Glimmr generates a lot of debugging information, and can quite thoroughly gum up a game's output. There are a few things we can do to mitigate this:

        1) The Glimmr Debugging Console extension can be included to segregate Glimmr logging output into its own window.

        2) We can set up our own alternate text-buffer window and direct log output there by setting the "console output window" variable, e.g.:

            The console output window is my-text-window [a text-buffer g-window].

        3) We can also send console log output to the transcript, while not printing it anywhere else. To do this, we include this code in our story file (it must be placed *after* the inclusion of GDC):

            To say >console:
                say echo stream of main-window.
            To say <:
                say stream of main-window;
                say run paragraph on.

        This will only work when a transcript is actually being written. To ensure that we do not forget to initiate one, we can include something like this:

            When play begins:
                try switching the story transcript on.