Weekly Update – May 5, 2023

Huge progress this week. The website was redesigned, Unity was upgraded (first time in over two years), and there were many history/map generation improvements.

  • History generation improvements and fixes
    • Multiple events from triggers. A trigger can now spawn more than one event. An example use is a settlement. When a faction settles in a section of the map, the rooms in the section need to be populated with the room types used by the faction. This is easily achieved by defining each room type as an event that responds to the Settled trigger and queuing multiple instances of the trigger.
    • HTML history file. The text logs output by history generation were tedious to review. I wanted to be able to click on an entity and see its full history, see entities arranged by type, and see entities by section. I added an HTML output file to do all these things. It’s much easier to understand what the history generator did now.
    • Event validator. All history event types are now scanned before generation to catch and report configuration issues. This reduces troubleshooting time.
    • Binding criteria not applied to triggered events. A history event that can respond to a trigger must verify that the trigger entities meet the event’s binding criteria. I thought this was happening but it wasn’t.
    • Refactoring. Event triggers were converted from derived classes to a single class inheriting from ScriptableObject. All of the trigger subclasses did the same thing (mapping entities to trigger parameters), so separate classes were unnecessary.
  • Map generation improvements and fixes
    • Chain Map Element Types. The map graph analysis that occurs during map generation identifies all the sequences of rooms on the map (“chains”). The new Chain Map Element Type enables these chains to be populated with specific sequences of room types. For example, a treasure room could be placed at the end of a 3-room chain, with a trap room and monster room protecting the treasure.
    • Dead end removal not working. I broke this a while ago but didn’t want to fix it because I was consumed with history generation. However, now that I’m doing more playtesting again, repeatedly running into dead ends is a real annoyance.
  • Rethemed website. The Legend website has had some long-time minor formatting issues due to limitations in the WordPress theme it uses. I could’ve directly edited the CSS to fix those issues, but didn’t want to expend effort. A recent issue cropped up, I assume from an update, that changed the font of much of the body text. That was the final straw; time for a new theme. I looked around a bit but couldn’t find any that suited the purpose. I wanted a theme that was barebones, fully configurable, and worked with minimal images and content. I landed on the WordPress Twenty Twenty-Three theme. This theme uses the new design tools in WordPress 6.1, which I was unfamiliar with. Though there was a bit of a learning curve, I enjoyed working with the new theme. A few things were unintuitive, but overall, the new design tools are more elegant and easier to use than the previous tools.
  • Updated Unity and Rider. I was using the LTS version of Unity from over two years ago (2020.3.15). The 2023 GDC Unity Roadmap presentation, particularly the mentions of performance improvements, inspired me to update to the latest version of Unity. The upgrade process was surprisingly smooth. There were a few hurdles with build version, assets and Rider integration, but nothing too time-draining. In-game, there are some animation, movement, and lighting issues I need to fix. The game runs fine otherwise. I was blown away by how much faster the game builds and loads now. This is going to save me so much time! It appears Unity has made improvements in this area, but I also benefited by moving from an Intel to Apple Silicon Unity binary.

Next week, I’ll fix the issues introduced by upgrading Unity, add more history generation event types, and address open bugs in the main game loop.

Comments

Leave a Reply

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