xray.games is live — a trustless arcade where player skill is proven entirely onchain through zero-knowledge proofs and deterministic simulations on Stellar.
ZK circuits typically focus on proving low-cost, tractable statements with known upper bounds (hash preimages, range checks, Merkle inclusion) where circuit shape is predictable.
The ZK circuits and contracts behind xray.games solve a different class of problem where the computational structure is dynamic, recursive, heavily shaped by player input from arbitrary polygon partitioning, edge-boundary containment, object physics, level integrity checks.
Gaming has historically pushed technical boundaries, but most computation-heavy workloads remain impractical onchain due to execution costs. Dark Forest, a pioneer in ZK gaming, burned through 7,000 ETH in gas (on Ropsten) during their seven-day beta.
Now take the cheapest smart contract platform in crypto. Give it native ZK primitives with the X-Ray protocol. Do the math.
The Arcade
Over the past decade I’ve designed and released 14 games. My most recent, Cyberbrawl, is a fast-paced TCG built on Stellar, focused on real ownership and P2P trading.
xray.games is an opportunity to reimagine some of those ideas, and to push Cyberbrawl itself toward trustless gameplay.
Three games are already live on the arcade:
Chain Slicer
Chain Slicer is a spin-off of a geometry puzzle I created years ago. The game ranked #2 in the 2014 top 10 HTML5 games (when HTML5 was still experimental, and we were trying to push its limits), received a $40K Honorable Mention at the Linux Foundation & Samsung Tizen App Challenge (MWC Barcelona), and is still played daily on Coolmath Games, Famobi, ABCya, Math Playground and other gaming portals.
The original game shipped with 120 handcrafted levels with progressive difficulty, but over time video walkthroughs have enumerated every solution. For a trustless, skill-based arcade, static levels are a dead end, making procedural puzzle generation a requirement.
Designing a generator that produces puzzles which are both complex and provably solvable was one of the most interesting parts of this project, with Poseidon2 making the generation deterministic.
Chain Snooker
The second game, Chain Snooker, is a spin-off of my Soroban Snooker demo, rebuilt with new graphics and significant fixes to the physics simulation. The client now uses the same fixed-point arithmetic as the contract, enabling optimistic score calculation with accurate feedback.
Chain Snooker features onchain pool physics validation, Ohloss integration, and is already live for play and faction warfare.
Chain Runner
The third game is a vertical runner inspired by my earlier title Sticky Goo. I tweaked the rules to make it more accessible (e.g., removing vertical obstacles) while shifting the scoring model from height reached to stellar coins collected. The idea is to make scripted runs harder as high scores now require a spacial search component rather than simply maximizing survival time.
This was probably the most challenging and interesting circuit to design: it reconstructs parabolas from points and velocity data to validate the gameplay physics against the level layout.
The Circuits
The circuits are available in both Noir (w/ Poseidon2) and Circom (2.1.9 w/ circomlib Poseidon and comparators).
The first working version for the Slicer circuit was simply mirroring my original game verification logic inside the circuit, compact code, written a decade ago and battle-tested through millions of play sessions, but it brute-forced every geometric relationship. It compiled but was completely unusable as loop unrolling pushed the Noir circuit past 100MB and blew up at runtime.
To make this work, the circuit was redesigned around a hint-based architecture. Witness hints reduced verification from O(n²) brute-force checking to O(n). This slightly increases prover complexity but shrinks the compiled circuit from ~100MB to ~4MB.
| Backend | Constraints/Width | Compiled Size |
|---|---|---|
| Circom | 458,578 | 3.5MB |
| Noir | 273,511 | 4.3MB |
Stellar natively supports BN254 pairings for Groth16, enabling full onchain verification of Circom proofs. Noir is more constraint-efficient for this workload, but currently lacks native support on Stellar. An alternative path would be integrating an external verifier such as ultrahonk_soroban_contract.
Session Lifecycle & Trust Model
Gameplay on xray.games is deterministic, reproducible, and verifiable onchain.
This is achieved through Poseidon2-seeded deterministic sessions with dual ZK proof submission paths: direct trustless or server-delegated with commit/reveal.
Note: fairness in statistical distributions can be audited publicly (e.g. via open sourcing). This model does not address it.
No oracles or server-side validation is required. In xray.games, the server is a convenience layer, not a trust assumption. Players can either delegate proof generation and submission to the server, or download the prover, generate proofs locally, and submit directly to the contract.
Ohloss: Enroll and Represent
Players can optionally login via their Ohloss wallet to engage in faction-based warfare (note: at the time of writing I have not yet tested against the official ohloss contract).
Ohloss, designed by @kalepail, is a gamified DeFi protocol where players deposit into a yield vault, earn faction points, pick a faction and wager FP against each other.
Solving Synchronicity
Ohloss flow is designed around synchronous matches where both players are present.
That works well for scheduled duels but can be impractical for sustaining active gameplay in always-on models where players drop in on their own schedule.
To address this, xray.games contracts implement asynchronous matchmaking, removing the need for scheduling coordination while maintaining the faction rivalry mechanics that make Ohloss engaging.
Not enrolled yet? Pick a faction. Go represent!
2-Player Edition
A dedicated 2-player edition of Chain Slicer built with the Stellar Game Studio is live at sgs.xray.games (source), integrating Chain Slicer with the Game Hub contract on testnet.
Conclusion
Gameplay is one of the hardest things to prove onchain: it is unbounded, shaped by player input, and computationally explosive. On most blockchains, that makes verification impractical.
Built on Stellar, xray.games takes the real approach, embracing dynamic simulation and ZK proofs onchain for trustless gameplay verification.
Final boss cleared. Let’s grab the loot!
See you in the arcade.
Open Source
The xray.games contracts and circuits are open source — grab the code.