Weekly Update – March 26, 2022

Cell Context Menus were the top priority this week, but most of my time went to implementing torches. I had a rough time getting lighting and extinguishing torches working. The implementation is probably overengineered; it provides more flexibility than I’ll likely ever need and, consequently, has a high complexity cost. It’s also on the messy side – multiple SOLID principles are violated. After writing the code, it took several hours to figure out why it wasn’t working because the sequence of events in the code was difficult to follow. I just got it working today, which held up my weekly update.

  • Item light sources. Items can now add light sources to actors. This capability was needed to support torches and other light source items. It will also be used to radiate light from certain magic items.
  • Torches. Torches now work properly. When the player selects a torch in the Light Quick Switch Slot, the torch will automatically light and illuminate the area around the player. Deselecting the torch will remove the illumination and extinguish the torch.
Torches
  • Moved game buttons to the right of the hotbar. Originally the game buttons were in the lower right corner of the screen. I later relocated them to the right middle area. Now, they’re back at the bottom of the screen, but next to the hotbar. I did this to get them out of the way of the Inspect Panel’s new location.
  • Moved Quick Switch Slots to the left of the hotbar. These were originally on the left side of the screen, mirroring the game buttons. To maintain symmetry with the game buttons, and consolidate buttons and slots, the Quick Switch Slots were moved to the left of the hotbar.
  • Quick Switch Bar improvements. The currently selected item was being shown twice, once in the Quick Switch Slot, and once in the Quick Switch Bar. This was confusing and redundant. Now the selected item is excluded from the Quick Switch Bar.
  • World building. Although the dungeon is procedurally generated each game, the world in which the dungeon exists is fixed. Each generated dungeon will reference some world events, historical figures, peoples, places, deities, etc. Gradually, the player will learn more about the world, which will make the  references more meaningful and factor into gameplay. This week, I started fleshing out this world.

Cell Context Menus didn’t get enough attention to warrant a bullet in the above list. However, this feature technically already exists. The Inspect Panel, which is displayed when the player right-clicks on a cell, provides a description of the cell contents and buttons for actions that can be performed. The buttons correspond to the items that would appear in the Cell Context Menu. Next week, I’m going to move the Inspect Panel from the center of the screen to the right side and add icons that match the Cell Action Indicator icons. I’ll also continue to work on the next major milestone, visibility.

Leave a Reply

Your email address will not be published.