Skip to main content

Case Study: Cadence

Cadence is my love letter to things that interest me: games, music and programming.

A crossover of game and music app, players use the game's rules and logic to make music. Bringing these two worlds together is the culmination of a decade of tinkering, and the relentless quest to create an uncompromising user experience.

As a solo indie developer, I've been responsible for all aspects of development, from architecture to the visual look and feel. There have been several interesting challenges to solve over the years.

Play Mode

Your goal is to wake up Ren the Cat - by sending pulses through the circuit. It's very easy to pick up, but as more tiles are introduced it becomes more challenging. Tiles also make sounds. Broken circuits will play a few notes before stuttering to a halt. In contrast, solved circuits loop infinitely, rewarding you with satisfying and emergent refrains of music. Cadence doesn't require any musical talent to play though, levels are solved entirely by logical deduction.

Create mode

In create mode you have access to all the features used to author the game's content. However, you also have access to a musical grid editor and can create and customise up to four tracks including synths and drums. Unlike other music apps, Cadence both gives you immediate results, but also allows you to program transitions between parts using its logical tiles. Ideally suited to people looking for a different and more playful way to engage with making music.

Design Achievements

To create something truly innovative means that there is no script to follow, everything needs to be derived from first principles. Cadence borrows many ideas from electrical circuitry, which provides a rich palette of emergent behaviour to draw inspiration from. However, the game always needs to produce pleasing music - which often forced me to abandon the obvious path to unlock something more immediately intuitive and accessible, lest users need a degree in electronics or music to enjoy themselves.

Often working ideas seem obvious and simple, but in reality, they are the product of a long journey of discovery that required many "aha" moments and breakthroughs to arrive at. Indeed the earlier versions of Cadence looked very different from how it looks today:

The guiding light through the discovery process is user feedback. For example, we know accessibility is important, but there is nothing like witnessing a visually impaired player trying your game at a festival and being unable to solve a level because there isn't enough visual contrast to read the level properly. And then of course making changes to ensure it doesn't happen again.

Technical Implementation

The data structure at the heart of Cadence is graphs. Traversal and evaluation need to happen in real time, without causing performance spikes interrupting gameplay or music playback. Graph calculation happens ahead of the beat, as it evens out spikes in performance, allowing musical notes to be triggered timeously (though this trade-off does introduce latency, which is acceptable given that Cadence is not a rhythm game).

Separation between presentation and data runs throughout the code base. All tiles are unit-tested, and split implementation between an abstract data script that defines the business logic of a tile, and a separate visual script that is responsible for animation and how the tile appears in-game.

Tech: MVVM UI

The create mode editor is UI-heavy. Whilst I use Unity UI, there aren't many off-the-shelf solutions for managing UI game state. So I created my own MVVM-style framework to separate data from presentation. This has scaled well, as the game has survived many visual iterations and styles, especially as the capabilities of Unity has evolved:

Tech: State Machine

Another successful piece of technology spun out of the game is my State Machine library. It's a good example of the pragmatism I strive for in library design. Even though it's not a textbook implementation of a state machine, it pays careful attention to the context it is used in. By harnessing familiar Unity idioms, the library presents an interface that's been very easy for users to onboard with and has proven especially popular amongst game designers. Just like any visual interface, an API has a user experience and it's important to carefully curate an API's surface area. However, this flexibility shouldn't sacrifice technical correctness, to this end, the library comes with extensive test coverage.

Commercial status

Cadence is a passion project I work on when I have spare capacity - it will be done when it's done! Versions of the game have been selected and featured across many games festivals, from SXSW to Amaze. The game is nearing the end of development and I hope to release it across both iOS and PC.

In the meantime, you can wishlist the game on Steam: