Visual Effects for Farm Companions

farmheroes-logo.png

During my time at King, I was tasked with adding some additional particle effects to make clear to the player when their Companion is affected by certain actions. With the help of some very talented artists, I implemented a basic version by creating a new class to move any UI element from some position A to another position B. I composed the movements using a queue data structure, so the visual effects would play one after another.

However, after internal playtesting, the designers for the feature felt that the implementation was too sluggish - all other visual effects on the board would not trigger until the queue was empty. So, I looked into some timer-based approaches, but the timing assumptions were resulting in some unintended behaviour.

Finally, I settled on a version that used callbacks, manually triggering each effect once the previous one finished, which avoided interrupting the flow of any other visual effects on the board. The end result (shown below), while a little less flexible than the queue approach, works well and is in the game today!