LogicFlow, AutoEri, and Sounds (Patreon)
Content
By Bantam
LogicFlow
Anyone who's played Slay the Spire or Hearthstone knows that card games have complex interactions. Early on, we wrote every card directly in C#, which worked fine until we started iterating. Every design change meant digging into code, and experimenting with new ideas was slow and error-prone.
We switched to a node graph system called Logic Flow. Instead of writing card behavior as code, you describe it visually as a graph of connected nodes. Each node handles one discrete piece of logic so we can test and reuse them independently. It also means designers like Kuso and modders in the future can build and experiment with cards without needing to touch C#.
As the graph library grew, we noticed certain node combinations kept appearing repeatedly. Reading a dense graph isn't fun, so we added subgraphs: select a group of nodes, right-click, and "create subgraph from selection." Those nodes are now packaged into a single reusable block with its ports already wired. You can still drag in new input/output ports when a subgraph needs to be adapted for a slightly different use.
The goal is to keep hand-written C# nodes to a minimum and build everything else as subgraphs. Less code means less to test and less to break.
Most recently, we added event support to subgraphs. Events fire at specific moments during gameplay; a character's turn starting, taking damage, getting killed, and so on. We have well over 100 of them. A subgraph can now subscribe to multiple events, which makes managing things like visual effect lifecycles (stealth smoke, energy shields) straightforward to set up and reason about.
AutoEri
Every card and ability we add creates potential for unexpected interactions. Certain play orders produce edge cases nobody anticipated. The problem is that Kuso and I play completely differently; I tend to miss bugs he runs into immediately, and vice versa.
After watching a few game-stopping crashes during his sessions, I added a mode called AutoEri. The normal enemy AI plays with some intent where it evaluates cards against targets based on situation and priority. AutoEri does the opposite. It navigates every system in the game, combat, story events, the shop, choice screens, all of it, completely at random. No strategy, no self-preservation, no goal. Every time it breaks something, I get a fresh exception to investigate.
It's been more effective than expected at getting us to a stable, fully playable state. I'm planning to add performance sampling to it later so it also surfaces framerate and memory issues across every situation.
Sound
Audio was intentionally left late since it isn't load-bearing for core gameplay. We're there now and Kuso has been working on weapon audio, and a big part of that is environment. Each battle location has a distinct acoustic profile. A gunshot or grenade indoors sounds different from the same thing outdoors (Not that Bantam was against it but I was very insistent on this, I am a bit acoustic myself -Kuso). Some enemies can also deploy fields that temporarily alter how the environment sounds.
Tests
We're at 676 EditMode tests and 200 PlayMode tests. Every bug I fix gets a regression test written for it. I've gotten tired of fixing the same thing twice. With AutoEri now running against all decks and card combinations, we're about to add hundreds more PlayMode tests on top of that.
That's it for the Dev Log, Kuso will be back on the next Dev Log with some Lore Drops and new art! He has finished all the OCs for the top tier of the Patreon and will move on to the other lower tier rewards. Thank you so much for the support everyone!