august 11, 2023


if last update's woes were the appetizer, this one was the main course...

...erm I mean, hi all! happy friday! let's just jump into the update.

as that intro may suggest, I had a lot of trouble with this update because, well, I had to completely rearchitect the UI system. previously, it worked by having "child" nodes sending signals when things happen (like dropping an item) and "parent" nodes listen for those signals and call methods on other child nodes in response. this is a fantastic design pattern for simpler stuff, or when there is only a single parent node. however, what happened for cave game was that this quickly grew out of hand and just could not be maintained. I genuinely reached a point where I flat out was not able to implement the mortar's UI, so I decided that now was the time to come up with a better way to do this.

the new approach, instead of signals between parents and children, uses a single "UI state" variable to identify what part of the UI is being interacted with at a time. every node within the UI listens for changes in the state and they update themselves accordingly. the goal was to make every UI node completely modular. meaning, if I wanted to add a new UI node, it did not depend on any other node to function (to an extent). to "move the focus" between UI nodes, the UI state is updated by UI nodes themselves updating the UI state, not some parent node. for example, if we're "focusing" on the inventory, and we want to move to the tool selector, then we change the state from "inventory" to "tool." the inventory node hears the state update and hides its highlight indicator, and likewise, the tool selector node hears the update, slides open, and begins listening for input. ...all this is to say that the UI system is much easier to expand upon. I want to be clear though: on the whole, it is not simpler. it is just a design that I have a way better understanding of, so I can add onto it in the future!

...

ok now for the important part, there is now a bespoke UI for the "mortar" building! as suggested by the name and the look, this is a building that's used to grind down items. currently, "sprouts" can be ground into "fiber," and "pollen" can be ground into "dust." these don't do anything yet, but they will be used as ingredients for future buildings, which I hope to add within the next update or two.

that's all for now though! I hope you all have a good one!

Files

build_20230811.zip 9 MB
Aug 11, 2023

Get Silt Spawn (Demo)

Leave a comment

Log in with itch.io to leave a comment.