Weekly Update – September 15, 2023

I started the week by playing for an hour and logging all the issues I came across. I spent the rest of the week fixing those issues.

  • Bug fixes
    • Movement-blocking objects can be placed in locations that disconnect a level. This problem has existed since the original map generator was developed several years ago. I’ve made a couple of unsuccessful attempts to solve it in the past. This week I was determined to find a solution, and I did so just before this update. The basic concept is to check if an object will disconnect the room it’s being placed in before placing the object. That sounds simple and obvious but the implementation was complicated.
    • Maps are sometimes too small. The map generator is supposed to prevent this by checking the percentage of cells that are populated and adding more rooms if a minimum value isn’t met. This check uses a counter to prevent infinite looping. The counter increments on each attempt to add a room. Many attempts were failing, causing the counter to reach its limit before the cell minimum was met. The attempts were frequently failing because new rooms couldn’t be placed in the random location chosen. The solution was to limit the list of possible room locations to areas where the room would fit. 
    • When an enemy is killed, the player’s selected weapon changes to the enemy’s selected weapon. This was an odd one. When an actor dies, it’s replaced by a corpse and its items are transferred to the corpse. An event is generated when an item is added to an actor. A listener for this event checks to see if the item is a melee weapon and, if so, equips the item. A separate listener for this event updates the player’s selected melee weapon in the UI. The second listener was responding to all events, not just the events for the player. This was fixed by having the event listener check whether the event was triggered by the player.
    • Error occurs when a damage sound effect is played for an actor without a melee weapon.
    • An error occurs when fire spreads to a cell containing an item. 
    • An error occurs when a status effect is removed from a corpse.
    • Braziers can be placed outside of non-rectangular rooms.
    • Some room types, such as Alchemy Chambers, appear in corridors.
    • Actor names are displayed in the Inspect Panel when the player doesn’t know the actor’s name.

Next week, I’ll start with another play session, but the focus will be (hopefully) less on bugs and more on small improvements and polish.






Leave a Reply

Your email address will not be published. Required fields are marked *