Case study · iOS · Multiplayer

Facedown

Four cards. Two looks. Lowest hand wins. The card game from the table, on the phones already in your pockets.

Black king: 30 points

What it is

Everyone gets four cards, face down, and may look at two of them once. After that you're on your memory, and so is everybody else.

It's the table game that goes by Magic, Cabo, Cambio or Golf depending on who taught you, played by the rules our table plays. One person starts a table and reads out a four-letter code, everyone else types it in, and the phones become the cards. No account, no sign-up, nothing saved. When you think you're lowest, call Magic. Be wrong, and you take thirty.

In the app

Loud colours, quiet cards

The Facedown home screen with the logo and buttons to start or join a table
HomeStart a table or join one. How to play is right there, taught with real cards rather than a wall of text.
A round in play: face-down cards around the table and a freshly drawn three of hearts
In playKeep it or play it. The card you just drew is the only one face up. The app marks nothing else, not even which cards you've already looked at.
The round-over screen: Nabil called Magic with more than five and took thirty on top
Round overCall Magic with more than five and you take thirty on top. Yes, that's me in the screenshot.

Engineering

The parts that were actually hard

Secrets

Nobody's phone can know your cards

In a game built on hidden information, the obvious approach, sending the whole table to every phone and hiding what you shouldn't see, means anyone curious enough can read everyone's hand.

Instead each player gets their own version of the table with everything they aren't allowed to see removed, delivered on a private channel named by a secret only their phone holds.

Network

The server is someone's phone

The phone that starts the table holds the one true game: it checks every move against the rules and tells everyone what happened. There's no game server to pay for or keep running.

That part was written so it could move to a real server unchanged, and so a full game can be played in a test with no network at all.

Speed

Burning is a race

The moment a card lands in the middle, anyone holding the same rank can burn it, and the first tap wins. Burns chain onto burns, a wrong burn costs you cards, and burning someone else's card means handing them one of yours, face down, unseen by either of you.

Every one of those rules is covered by tests, including one that checks no card is ever created or lost, however strange the round gets.

Bots

The practice players remembered too much

Cards get fresh labels each round, so a label that meant a six last round can mean a three now. The practice players kept their memory between rounds and started confidently burning cards they had never seen.

Now they forget everything the moment a new deal arrives, just like people should.

Shipping

Getting a party game past Apple

A reviewer with nobody to play with

A multiplayer game needs several people, and an App Store reviewer is one person. The review notes link to a full walkthrough video of a real game.

Updates in minutes

Rule tweaks, card art and fixes go straight to phones without a new App Store submission. Players just reopen the app.

Testers first

Testers and the public get updates on separate tracks, so a change can be tried on a few people before it reaches everyone.

Practice players

Bots to learn against or fill an empty seat, so the game works even when only two of you showed up.

Built with

Stack

App

  • React Native · Expo
  • TypeScript
  • Expo Router
  • Audio · Haptics

Game

  • Rules engine in pure TypeScript
  • Per-player hidden views
  • Tested rule by rule

Multiplayer

  • Supabase Realtime channels
  • Host phone as authority
  • Private channel per player

Delivery

  • EAS Build & Submit
  • EAS Update (over the air)
  • TestFlight

Support · Privacy policy