Weekly Update – July 31, 2021

It was an eventful week in terms of getting things done, but not in terms of things done that matter to the end user.

  • Significantly expanded the capability to configure object functionality in the Unity inspector using a custom event model. Basically, object types have a list, where each item contains a trigger and an event. Triggers are defined as enums and are tied to hooks in the code. Events are ScriptableObjects with custom methods. Any number of triggers and events can be added to an object type. This accelerates creating new object types and eliminates a lot of object type-specific code. I will use this to add the new object types planned for Release 3.
  • Overhauled hidden object handling. Hidden objects were broken by the refactoring done a couple of weeks ago. The implementation had to be overhauled. I used this as an opportunity to both simplify the implementation and make it more robust. Previously, each cell had a list for hidden actors and a variable for a hidden cell type. I didn’t put much thought into the general design; I added object-type logic as needed to support hidden objects such as hidden doors and traps. This was not scalable and added unnecessary complexity. The new implementation leverages the new custom event model to handle revealing and triggering hidden objects. By doing so, the hidden object variables and object type-specific code could be removed.
  • Removed and simplified code involving upcoming Release 3 features. The main theme was making more logic declarative and reducing complexity, made possible by the new custom event model. 
  • Renamed some classes that had confusing or inaccurate names. Doesn’t sound like a big deal, but poorly named classes were adding to cognitive load.
  • New unit tests for actor visibility. These tests include actors being able to see other actors, cells blocking visibility, effects that affect visibility such as invisibility potions.
  • Hotbar research and design. I researched hotbars in games this week and began designing Legend’s hotbar. The design is around 75% complete. There will be a hotbar for consumable items and abilities, and possibly separate hotbars for switching equipment.

A lot of the work over the past few weeks was driven by the Save/Load features being added in Release 3. That work is coming to an end and I should be able to complete the Save/Load features in the coming week. I also plan to complete the hotbar design and start on implementation.

Leave a Reply

Your email address will not be published.