-
Title screen. Your real breath is the controller.
-
Holding your breath for 59 seconds: the diver only descends while you hold.
-
Your fish swim in a 3D aquarium. Feed them with PEARL and they grow.
-
Fish NFTs, drawn by the same code as the in-game cards.
-
The Collection: every fish is a Solana NFT. Tick boxes to bulk-sell with one approval.
-
Net upgrades: capacity grows from 6 to 8 to 10 fish.
Inspiration
Freedivers train for years to stay calm on a single breath. Most of us never notice our breathing at all. We wanted a game where the controller is something you already carry: your lungs.
With Presage, a plain webcam can read breathing and heart rate. That meant anyone could play a breath-hold game without any special hardware. From there the game grew a simple, tense loop: the longer you stay down, the rarer the fish, and the closer you are to running out of air.
What it does
Breathless is a low-poly diving game where your real breath is the oxygen tank.
- Hold your breath to dive. The diver only descends while you are actually holding your breath. Your webcam and the Presage SDK read your chest motion and heart rate.
- Greed versus risk. Deeper water holds rarer fish. If you breathe underwater, you get 3.2 seconds to reach the surface. Miss it and you black out, losing every fish in your net.
- 3 maps and 4 depth zones. Fjord, Heaven Lake and Open Ocean, from the Shallows to the Trench, with reward multipliers up to 6×. Night rolls rarity twice and keeps the better result. In the Open Ocean, sharks hunt by your heart rate.
- 35 species across 6 rarities: sharks, octopus, lantern anglers, turtles, jellyfish and more. They are worth from 1 PEARL (common) up to 800 PEARL (mythic).
- Gear up. There are 7 upgradeable gear slots, each with 3 levels and exclusive module paths, plus workbench synthesis from scales, fiber, scrap and crystal. A shark bite ends the dive and resets your dive gear.
- Every fish is an NFT. Each catch you bank is minted as a Metaplex Core NFT in the Breathless collection on Solana. Our server co-signs every mint, so only real catches enter the collection. The NFT art is drawn by the same code as the in-game card. Sell a fish to the market and the NFT is burned; you receive PEARL, our SPL token.
- A 3D aquarium. Your fish swim in a glass tank on a table. Feed them with PEARL and they grow and glow. The Collection lets you tick boxes to bulk-sell many fish with one wallet approval.
- Progress lives on chain. Our
player_stateAnchor program stores your gear levels, materials and aquarium growth. Every purchase burns PEARL and applies the upgrade in one transaction, so there is no server database of player data. - Health stays private. After each trip you get a breath and heart report: longest hold, dive reflex, recovery time, and heart-rate curves. The data stays in your browser and never goes on chain or to our server. One button deletes all of it. The report is for wellness only, not medical advice.
- Anyone can play. Keyboard and simulation fallbacks work without a camera.
Play it live: breathless.gotclass.xyz
How we built it
- Frontend: Vite, TypeScript and three.js. The low-poly art, water, weather, the day/night cycle and every fish model are generated in code.
- Breath sensing: a Node server bridges the Presage SDK to the game over WebSocket. Our own detector learns your breathing baseline from the median activity over the last 30 seconds, calls a hold when activity drops below 0.38× baseline for 2 seconds, and calls a release on the exhale, so glitches in the trace during a hold don't end the dive.
- Solana (devnet): two Anchor programs (
fish_marketandplayer_state), Metaplex Core NFTs via umi, and PEARL as an SPL token. The server co-signs mints and renders NFT images by bundling the game's own fish-card code. Purchases burn PEARL on chain, and a session key handles low-risk actions so players see fewer wallet prompts. - Ops: every push to
mainis tested and auto-deployed by a self-hosted GitHub Actions runner, then served through a Cloudflare tunnel. - Scale: about 55,000 lines of code, 560+ automated tests (game, server and contracts), and 590+ commits.
Challenges we ran into
- Breath detection was wrong at first. Our first detector scored only 44% on recorded sessions: it learned "normal breathing" from the wild first seconds of the Presage trace. We recorded real holds, analysed them, and rebuilt it with a median baseline from the last 30 seconds, activity-based hold detection, and exhale-based release, because every real release starts with an exhale while trace glitches don't.
- Never charging twice. Wallet transactions can land late, fail or be retried. We built a pending journal that settles by transaction signature, never re-sends, and reconciles on login, so a flaky connection can't double-charge PEARL or wipe a paid upgrade.
- The NFT art drifted from the game. The server had its own copy of the fish renderer, and when we added 35 new marine species the NFTs stopped matching the cards. Now the server bundles the game's own fish code, and a test fails the deploy if the bundle is stale.
- Moving player data on chain without a database. We had to design PDAs that are additive across program upgrades, keep the first purchase to a single wallet approval, and keep health data completely off chain.
Accomplishments that we're proud of
- A breath-hold mechanic that really works with just a webcam.
- A complete on-chain economy: fish NFTs, a PEARL token, a market, and gear and aquarium progress stored on chain.
- NFT art generated from the same code as the game, so what you catch is exactly what you own.
- A health report that respects privacy by design.
- It is live, tested and auto-deployed: 560+ tests and 590+ commits during the hackathon.
What we learned
- Real sensor data beats intuition. Recording and analysing actual breath holds fixed problems we could not have guessed.
- On-chain design is mostly about failure cases: late confirmations, retries, stale sessions and replays.
- Keeping one source of truth (the chain for progress, the game code for art) removes whole classes of bugs.
What's next for Breathless
- Boat parts and ships on chain. The
player_statev2 upgrade is already deployed on devnet. It adds boat parts, ships, and lifetime catch value recorded by an oracle inside each fish mint, which will unlock new maps. - Player-to-player fish trading in a shared market.
- Guided breathing sessions and longer-term breath-hold progress for players who want to train.
- A mainnet launch once the economy is balanced.
Log in or sign up for Devpost to join the conversation.