ICanRoll: Real Dice, Shaken by a Robot, Certified by Cryptography

I got tired of trusting dice I couldn't see.

I play tabletop games with people I can't sit across a table from anymore. That's not unusual — remote gaming is the norm for a lot of groups now. What is unusual is how much that situation bothered me about dice.

Not the rolling. The trusting.

Every digital dice roller is, at its core, a random number generator with a skin on it. You get a number. You're asked to believe it. Most people are fine with this. I was not. There's something about the physics of a real die — the clatter, the chaos, the moment of resolution — that a PRNG can't replicate. And when you're playing remotely, that's exactly what you lose.

So I built something to give it back.

The Idea

It started in a Discord server, playing D&D with friends. I wanted to roll my real dice instead of using the digital rollers on D&D sites — but I also wanted my friends to be able to verify I wasn't cheating. So I grabbed a coffee can, a webcam, and started shaking it by hand and sending photos. It worked, but it was ridiculous — and that's where the name came from.

Once I started automating the shaking, I realized I needed a way to actually deliver the results. That's when the site came into it — a proper interface, session management, and eventually the certificate system so anyone could verify a roll was real without just taking my word for it.

The Hardware

Each enclosure is a PVC cap on a platform. An actuator drives it up and down, tumbling the dice. An LED illuminates the interior. A camera mounted above looks down and captures the result when the shaking stops.

The electronics are straightforward — a single-board computer handles all the control logic: actuation timing, lighting through a PWM controller, and the camera over USB. The whole thing sits on my workbench and costs less than a dinner out to build.

The Software Stack

There are three machines in the system. The frontend is a single self-contained HTML file hosted on Cloudflare Pages — no build step, no framework, the whole deploy is zipping one file and uploading it. API traffic routes through a Cloudflare Tunnel to the head server, a Flask app running on my local network that manages worker registration, session tokens, photo storage, and the public API. The worker nodes run their own Flask app handling all hardware control, heartbeating to the head every 30 seconds and self-updating when a new version is pushed through the admin UI.

The Certificate

This is the part I'm most proud of. Every roll generates a signed certificate that binds together: the roll ID, the player, the die type, a SHA-256 hash of the photo, and a SHA-256 hash of the video clip. Both hashes are signed together in a single token, which means neither the photo nor the video can be swapped out independently without breaking the signature. You can hand someone a PDF of your session and they can independently verify that every roll was real, unmodified, and genuinely yours — no trust in me required.

What It Looks Like in Use

The frontend has a tavern aesthetic — parchment, candlelight, wooden table. Sessions are tracked in a "ledger book" layout. Each player gets a plaque. Roll photos appear inline as you roll. At the end of a session you download a PDF — a permanent record of every roll, including the photos and certificates.

There's also a Discord bot in progress. Right now your server can register with ICanRoll and players can roll directly from a channel — the bot returns the photo and result inline. The self-service setup flow is still being built out.

What's Next

The project is live at icanroll.com. Right now it's one worker node running out of my home lab. The immediate priority is expanding the dice support — the current selection is limited — and on top of that, building out automated game modes directly on the platform rather than just raw rolling.

There's a Ko-fi if you want to support...

Read more »