# Visualizing a "zork" type map

**URL:** <https://forum.graphviz.org/t/visualizing-a-zork-type-map/556>\
**Category:** Help\
**Created:** [February 25, 2021, 4:54pm UTC](https://forum.graphviz.org/t/visualizing-a-zork-type-map/556 "2021-02-25T16:54:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eam](https://sea2.discourse-cdn.com/graphviz/user_avatar/forum.graphviz.org/eam/32/327_2.png) [@eam](https://forum.graphviz.org/u/eam)\
**Post date:** [February 25, 2021, 4:54pm UTC](https://forum.graphviz.org/t/visualizing-a-zork-type-map/556/1 "2021-02-25T16:54:23Z")

</div>

Hi all,

I’m teaching a programming class for kids where we write an Infocom/Zork style text game. The game state is a digraph where each edge follows a cardinal direction (North, South, NorthEast, etc).

I’d like a tool to visualize the game state as my students create it. Graphviz seems a close fit, but I’m having trouble controlling the relative orientation of the vertices.

I’ve found the “node ports” feature and this is pretty close to what I want in terms of rendering edges, but I’ve found that I still have trouble with vertex placement. I’d like a vertext to the “east” of another to be oriented to the right. It doesn’t have to be perfect, but sometimes I’ve found a node to the “east” is placed to the “west” and the edge is curved to compensate.

I’ve found that I can adjust the relative ordering in the digraph to coax things closer to how I would like (see the two attached images – edit: I can only attach one image so I attached the one that looks most like how I want it after ordering the graph by hand), but I’d like an automatic tool my students can run as part of their development cycle.

 ![map](https://global.discourse-cdn.com/graphviz/original/1X/ec80096dc8a928bac35ffca7f8d175ed3b692bad.png)

If I’m trying to fit a square peg in a round hole I’d appreciate any pointers to alternate solutions. I’m a longtime graphviz fan so it’s the tool I reached for first. Thanks much!

---

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [February 25, 2021, 7:04pm UTC](https://forum.graphviz.org/t/visualizing-a-zork-type-map/556/2 "2021-02-25T19:04:45Z")

</div>

Cool question. Yes, something of a “square peg”, but possibly doable.  
Dot is good at placing nodes in rows, but column placement is more of a challenge.

- What do you want the input to look like?
- How many computers do you want this to run on?
- What OS(s)?
- Could your students determine X/Y placements of the nodes on a grid, or should the mapping program figure it out?
- Have you run this web search: **zork OR “interactive fiction” mapping program**
