Skip to content
Project / Browser game

Snapzule snap, shuffle, solve

A selfie puzzle game you play with your hands. Snap a photo with an open palm, swap the tiles with a pinch, and race the daily leaderboard.

5
Board sizes

From 2x2 up to 6x6.

4
Hand gestures

Open palm, pinch, peace sign and thumbs up.

100
Daily board places

One shared scramble a day, checked by replaying the moves.

120 ms
Fastest swap

Anything quicker per swap is rejected as impossible.

Exhibit / Hands only

No mouse. No touch.

The real game plays through your webcam. Hold up an open palm and it snaps your selfie. Then you pinch a tile, move your hand and open it to drop. This loop is a drawn replay of that, not your camera.

Exhibit / Replay
Controls

Your hand is the controller

The camera runs MediaPipe Hands, which finds 21 points on your hand. Snapzule does not use a trained gesture model. It compares how far each fingertip is from the wrist, and that is enough to tell these apart.

Hold 2 seconds

Open palm

Hold still and the game snaps your selfie and cuts it into tiles.

Move tiles

Pinch or fist

Grab a tile, drag it onto another one and open your hand to drop it.

Peek

Peace sign

Shows the solved picture for a moment, then hides it again.

Play again

Thumbs up

On the win screen, a thumbs up starts the next round without touching anything.

Leaderboard

A board you cannot fake

Everyone gets the same scramble each day, from a seed based on the date. A score is only accepted after the server plays your moves back and gets the solved picture. The daily leader's run is saved too, so you can race a ghost of it.

  1. Step 1

    You solve it

    The browser keeps a log of every swap you make.

  2. Step 2

    Send the run

    The seed, board size, time and swap log go to a cloud function. Google sign-in only happens here.

  3. Step 3

    Replay

    The server rebuilds the scramble from the seed and plays your swaps back.

  4. Step 4

    Check

    It must end solved, on today’s seed, no faster than 120 ms a swap, within 5,000 swaps.

  5. Step 5

    Record

    Only the function can write the daily top 100. Players cannot write scores.

Build story

Built to keep a kid busy

How it started

I kept seeing MediaPipe all over Instagram. I wanted to do something funny with it. I also wanted a cunning little game for my nephew.

A swap puzzle made sense. Nothing is hard to understand, and moving tiles with your own hand is more fun than clicking.

The bugs that were not obvious

The camera light kept blinking. The game looked fine, but the camera kept closing and reopening, about once a second. The cause was one inline function. Every re-render handed the camera component a new callback, so it thought it had to start over. The fix was to keep the callback in a ref and let the camera open once.

The leaderboard had its own surprise. Submitting a score failed with an internal error, because I had stored the ghost replay as a list of pairs and Firestore does not allow arrays inside arrays. Storing the swaps as one flat list fixed it.

Did it work?

Five whole minutes.

My nephew played it for about five minutes and I got some peace. Then it was back to annoying me.

Want something like this?