Jack Morris
Binarize
18 Oct 2023

From 2011 to 2014 I released 5 apps onto the App Store, with the first four now removed by Apple for being "outdated". RIP 🪦.

The last one however must have escaped Tim Cook's scythe, and sat there untouched until a few months back. That was "01", a fun little game I built to help with practising binary-decimal conversions in your head. It had a pretty simple premise: given a couple of decimal numbers to aim for, you'd have to try and find the binary equivalent on a grid of 1's and 0's (in either a 3, 4, or 5-bit mode), and swipe it off the board. You'd then get another number to look for, and the game continued for a round of 50 seconds. The UI was very much "programmer-design" (grey with a splash of grey), but I had a soft spot for the simple gameplay and the app's minimal footprint.

01 was totally untouched for 8 years (working entirely fine aside from an ugly letterbox on notched phones), but recently I noticed on the game's leaderboard that a dedicated few users were actually still playing. So I decided to spend a few days cleaning it up and finally coming up with a better name. Enter Binarize.

Binarize is available on the App Store, supports iOS & iPad, and is entirely free (with no ads).

The core mechanics are the same (along with the colour scheme), but with a few quality of life improvements here and there.

Improved Selection Mechanics

Selecting numbers in the grid used to be a precision operation. Say you'd selected "01" below, and you wanted to add the rightmost "1" to your selection.

For tracking selections, I would previously require that the touch moved directly onto an adjacent cell, in the direction that the drag was already progressing along. This would work fine for slow selections, but if moving quickly it would be possible to "jump over" a cell (in the sense that you swipe fast enough for the touch to never register on a cell in the middle of a selection). I've changed (daresay fixed) this behaviour to instead calculate selections based on the start and "current" position of a drag, making selection now feel super snappy.

Sound

There were previously a bunch of small "click"-style sounds played for button taps, individual number selections, and drag completions. Through headphones (particularly AirPods) I always found these lagged a little behind user interactions, causing them to get bunched up and played out of sync. These were very small sound files played through a preloaded AVAudioPlayer, and whilst I did try a few things to remedy this (in particular using the AudioServicesPlaySystemSound API to register them as system sounds, which the internet promised me would fix the issue), in the end I gave up and ripped them out.

In their place I added haptics, which to me feel much better and perfectly align with drags and selections. Removing the sound files also allowed me to squeeze down the IPA size even further (to now well under 1MB).

UI Refresh

A minor change, but I've adjusted the font from Courier to Menlo throughout (the slightly bolder typeface looks better to my eyes, and is more readable).

In addition, I tweaked a few colours here and there, and ensured margins were consistent throughout. The app also now fully supports notched devices (goodbye letterbox!). I didn't however do any major UI work; it's not the best, but it works.

Under the Hood

01 was originally written in Swift 1.0, and released in October 2014. Migrating all at once up to Swift 5.9 was definitely "fun", however thankfully the app is small enough that it was relatively painless. The game is powered by SpriteKit, which (sadly?) hasn't really changed in the last 9 years to require any changes.

I also took the opportunity to migrate to strict concurrency checking, which mostly just required slapping @MainActor on a bunch of types.

Future

I don't really have grand plans for Binarize, and don't forsee spending much more time on it (ultimately it's a free app that I'm not convinced is worth monetizing). I do have an idea for an alternate mode (more akin to a "training" mode, as opposed to the current time trial), but I'll likely wait a little to see how usage adjusts post-update before making any further changes.