Weekly Update – March 15, 2024

Higher focus this week compensated for lower available time. With the finalization of the demo MVP scope, the next milestone and the path to it are clear.

  • Demo MVP scope determined. The upcoming demo will have three levels, all taking place in caverns. The demo will be ready when the following tasks have been completed: minimap added, major bugs fixed, major UI/UX issues fixed, missing liquid content added, missing sound effects added, performance optimization, a balancing pass, and another play test. I won’t be working on other features or adding content until this work is done.
  • UI/UX improvements
    • The Inventory, Inspect, Abilities, and Character panels can now be displayed simultaneously and moved. When a panel is closed and reopened, it will appear in the same location it was in when it was closed.
    • Pressing the Escape key will close a panel.
    • Tooltips are now displayed next to the object they refer to.
    • Some log messages are color-coded to emphasize positive and negative events.
    • More readable stats in the Inspect Panel.
  • Optimization. I haven’t done any optimization since 2022. Both map generation and gameplay performance have degraded since then. Map generation takes 15 seconds on average and allocates almost 1 GB of memory. When playing the game, slowdowns occur every time more than one actor is acting; combat with multiple enemies is a slideshow. Much of the excess memory allocation was caused by strings and enumerable to list conversions. The string issues were almost entirely in debug statements that made extensive use of string interpolation. I wrapped these statements in condition statements that check whether extended logging is enabled in the game’s global configuration. For the enumerable to list conversions, I removed unnecessary conversions (cases where a collection was only iterated through once). I also converted the map cell storage from a jagged array to a 1D array. I did this to avoid having to flatten the jagged array with Enumerable.SelectMany every time the map cells were searched or filtered using LINQ. These optimizations made the main game loop smoother and shaved a few seconds off of map generation. They also reduced map generation allocations from .9 GB to .3 GB on average. 
  • Palette swapping for liquids. There are 10+ different colored liquids in the game. Palette swapping was implemented to avoid having to create separate sprites for each potion, puddle, cistern, fountain, etc. I used a simple Unity asset to handle the palette swapping.
  • Bug fixes
    • Broken weapons are still used when attacking, even though the weapon has been removed from inventory. This occurred because the actor hung onto a reference to the weapon.
    • Most potions don’t leave behind an empty vial.
    • Levels occasionally don’t have a rumor to display.
    • Combat stats shown for dead actors in the Inspect Panel.

Next week, I’ll run another play test, add missing sound effects, and fix bugs.





Leave a Reply

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