Loading ...
Sorry, an error occurred while loading the content.

Fwd: Building networks with a script

Expand Messages
  • dalton_spence
    I haven t got any response about this from the Macros list yet, so I thought I d see if I could get some help here (since I m sure everyone on cc2-l must be
    Message 1 of 1 , Aug 15, 2006
    • 0 Attachment
      I haven't got any response about this from the Macros list yet, so I
      thought I'd see if I could get some help here (since I'm sure
      everyone on cc2-l must be getting tired of hearing the "clash of
      symbols" about now ;) ).

      --- In CC2-Macros@yahoogroups.com, "dalton_spence"
      <dalton.spence@...> wrote:

      Early this morning I wrote:
      > I am currently writing a program that produces a script to draw a
      > maze (actually a dungeon, but the data set is the same) by
      > building a wall network from a raster of cells. When trying to
      > build such a network manually, I noticed that it was possible to
      > draw a separated span of the same network by right clicking and
      > selecting the "Break" menu option. Is there any way to simulate
      > this action in a script? (See below for the hypothetical command
      > sequence.)
      >
      > NET
      > <point 1> <-+
      > <point 2> <-|-{draw spans between these points}
      > <point 3> <-+
      > <break command> {don't draw span between last and next points}
      > <point 4> <-+
      > <point 5> <-|-{draw span between these points}
      > . . .
      > <point n> <---{last point of network}
      > <empty line>

      The alternative is the brute force method;

      1.) create an entire wall network with nodes at every intersection,
      2.) remove every wall span that obstructs a passage or fills a room
      (the program could write the script commands dynamically as rooms
      and passages were "carved" out), and
      3.) add floors, doors, stairs and other symbols as indicated.

      This is probably the simplest method, but requires at least three
      complete passes of the grid. I'd prefer a single pass, at least to
      build the walls.

      --

      Dalton "who likes his programs elegant as well as functional" Spence
    Your message has been successfully submitted and would be delivered to recipients shortly.