Every shot verified on-chain: onicai's golf game simulated inside a canister, and our first 7-day tournament

Hi everyone :waving_hand:

We’re onicai. You may know us from icpp-pro (the C++ toolchain for ICP canisters), funnAI with its on-chain mAIners, and IConfucius. Our focus has always been pushing heavy computation onto the Internet Computer: LLMs, chess engines, physics.

Our newest project is Play the Chain, a small arcade of games where the game logic runs inside an ICP canister and not in your browser. It’s built entirely with icpp-pro, which makes it a good real-world test of what C++ canisters can do. We wanted to share how it works and invite you to Season 1 of our first tournament.

What’s actually on-chain

Most “on-chain games” keep a score on-chain and run the game somewhere else. We wanted to do it the other way round: the canister is the game engine.

  • :in_hole: Chain Golf. Your browser sends only your aim and power. The canister runs the ball physics for every shot, so the result is computed and agreed by the subnet’s 13 nodes. There’s no client-side score to tamper with.
  • :chess_pawn: Chess against Stockfish. Stockfish 11 is compiled to wasm and searches up to depth 20 inside one update call.
  • :person_golfing: 3D mini-golf, :person_running: Dash, :wavy_dash: Lines and :crossed_swords: Duels. These use the same idea: the canister replays your inputs and decides the outcome.
  • The whole site is served by the canister itself: pages, share cards, leaderboards and a public stats page at /games.

Everything is written in C++ and built with icpp-pro. Happy to go deeper on any of it: instruction budgets, keeping replays deterministic, or serving certified HTTP straight from a canister.

Why build it this way?

If the chain computes the outcome, a leaderboard means something. Nobody can post a fake score, because there’s no score to post, only inputs that the canister replays.

That makes it possible to run something that’s usually hard to do honestly online: a tournament with real prizes where every result is verifiable.

:trophy: The Chain Golf Open: Season 1

  • :in_hole: Chain Golf only, over 7 days
  • 5 ICP entry. The canister holds the pot and pays the prizes.
  • 14 ways to win: Champion, Runner-up and Third, a Daily Champion for each of the 7 days, the Ace (shared by every hole-in-one), Lucky Seven (drawn on-chain from everyone who plays all 7 days), Midnight Master and Rookie.
  • Everyone keeps something: a numbered ticket, a trophy card, and a Storybook of your week written from your replayed rounds (sample).

Get on the list: https://play.onicai.com/tournament
You can sign up with an email, or with no email at all. We’ll show it on the site when entries open and post the date on @onicaiHQ.

Want to practise? Today’s Chain Golf hole is free to play, with 20 levels to unlock: https://play.onicai.com/golf

We’d love your feedback

  • Does a fully on-chain game engine change how you’d trust a leaderboard or a prize pool?
  • Which prize types would make you play all 7 days?
  • Ideas for what to put on-chain next?

Thanks for reading, and see you on the tee :in_hole:
— the onicai team · Play the Chain · @onicaiHQ

1 Like