Z-machine - maps, inventory, and miscellaneous

Cool.

I avoided using names because games sometimes use the same name for multiple rooms. the author may intend them to represent the same room, or they may not.

This can display/hide images or text based on variables, objects (properties, attributes, or child and parent relationships) or raw memory addresses.

Doors are a neat use, yeah it should be able to do that.

It’s not the printed name, it’s the name in the source code so it’s unique. I can only do that because it’s provided in the gameinfo.dbg file generated by the compiler.

It contains data like:

<object>
	<identifier>I135_escalier_en_bois</identifier>
	<value>725500</value> 
</object>

which I can easily convert to “escalier en bois”, matching the name in the source.

2 Likes

I wanted to be able to create display elements like maps and status displays without having access to the original source (or compiled using something other than Inform).

2 Likes

I’ve updated the way I handle positioning so that multiple copies of an item’s image within the svg aren’t needed. It reduces the size of the svg considerably and makes it easier to create.

Showing an item at any location on the map is still a bit clunky in that you need to specify exactly where it shows up but I’m working on a system to use fixed per-item offsets that should clean it up a bit.

2 Likes

I got item offsets working and Suspended is looking pretty cool with the little robot markers moving around the map. Wow, this turned into a bigger side-project than I intended.
I’d still like to add a way to not require fixed positions for objects. Fixed positions makes it weird when you have items in your inventory appear far apart due to the reserved spots for items you don’t have. :thinking:

2 Likes

Dynamic grid sizing for objects in rooms or inventory is now working! (with one annoying heisenbug)

I need to take some time to refactor and clean up the code - it’s a mess.

2 Likes

I’m looking for some suggestions for displaying objects in a room on the map. Displaying a few items is not an issue, but let’s say the player is stashing a bunch of items, e.g. 20 or more in a single room. How would you display them?

  • In a fixed grid with a numeric cap where extra items are ignored
  • A fixed sized grid that decreases spacing between items as necessary even if it overlaps items
  • An uncapped grid that allows items to overlap other rooms
  • Some other way

I’m leaning toward the fixed-size, but flexible spacing model.

1 Like

How about a fixed grid which, when trying to accommodate a number of objects exceeding grid size, changes the icon of the last grid (say the bottom right-hand one) to some sort of “more” icon? Clicking that would lead to the grid switching to a second “page.”

That does sound good. However so far the display has been purely that: non-interactive. The idea was to encode all the appearance and behavior into the svg itself.

1 Like

I need to learn to draw in inkscape. I’m really struggling to make anything look better than a plate of pixel spaghetti, and the UI is inscrutable.

Well I’m off to find some tutorials on youtube, I suppose.

I have managed to draw a passable sandwich for the lunch in Zork I, although I’ll probably re-do it. One thing is for certain: No one will ever mistake my drawing for being AI generated.

2 Likes

I ended up going with dynamically sized objects that shrink to fit the available space.

Since it’s svg - there’s no fidelity lost and you can zoom in to see better if needed.

1 Like