BITCOINDERBY
A live blockchain horse racing and betting game built in Unity WebGL. Players connect crypto wallets to race their Bitcoin Ordinals NFT horses, bet gems on race outcomes, and compete in AI-driven quests, all in real-time multiplayer with up to 100 live spectators per race.

Overview
BitcoinDerby is a production-grade blockchain horse racing game built entirely by me as sole Unity developer. Players authenticate using one of 5 supported crypto wallets across 2 blockchains, Unisat, Xverse, and MagicEden for Bitcoin Ordinals horse NFTs, and MetaMask and OKX for Ethereum saddle NFTs. Once connected, players' NFT horses are rendered as unique 3D models in-game with their on-chain attributes loaded live.
The game features three core modes. In Race Mode, players subscribe their horse to API-scheduled races using in-game gems, watch 3D animated races live alongside up to 100 other players, and bet gems on the winner. Races support up to 10 horses with a tier restriction system (Tier 1/2/3) and configurable prize pools, all set via backend API. Every completed race is stored for replay and accessible at any time from the Race History tab.
In Quest Mode, players take full direct control of their horse through a custom-built Animal Controller, exploring a 3D open world to find keys, unlock chests, collect pearls, and ultimately defeat an AI boss horse in a combat encounter to claim the final prize, gems and NFT items. Quests run within a scheduled time window and progress is saved client-side throughout.
Explorer Mode gives players a free-roam sandbox to walk and gallop their horse through open meadows with no objectives, a low-friction onboarding and showcase experience for their NFT.
The monetisation layer is built on an in-game gem economy: players earn gems by winning races and quests, or purchase gem packs with real money via a fully integrated Stripe payment flow. The multiplayer infrastructure runs on Photon Fusion Dedicated Server Mode with a headless Unity build deployed on AWS EC2, supporting hundreds of concurrent race sessions.
The Challenge
The core challenge was integrating 5 completely different crypto wallet SDKs across 2 separate blockchains (Bitcoin Ordinals and Ethereum) into a single Unity WebGL game, each wallet has its own authentication flow, API structure, and browser-based communication pattern. Simultaneously, the game required a real-time multiplayer race architecture capable of broadcasting live race state to 100 concurrent viewers while remaining stable on a WebGL client. Coordinating blockchain authentication, live server state, a gem economy, Stripe payments, and a full quest system as a sole developer within a continuously evolving client brief was the defining challenge of the project.
Our Solution
I architected each wallet integration as an independent, interchangeable authentication module, same interface, different provider, allowing the game to support 5 wallets without duplicating core logic. For the multiplayer layer, I chose Photon Fusion Dedicated Server Mode deployed as a headless build on AWS EC2, which gave the stability and concurrent session capacity needed for live race broadcasting. The gem economy was centralised through a REST API backend, decoupling all currency transactions from the client. Stripe was integrated with server-side webhook validation to ensure gem credits only fire on confirmed payments. The Quest system was built as a fully client-side simulation scheduled via API, removing the need for a dedicated server session and keeping infrastructure costs minimal.
