Rules in one place
The grips, marks, stamina, paytable and HMAC draw live in a pure C# package with no Unity references. The client runs it for the offline demo, and the game provider compiles the same files as the authority for paid heaves.
Cosmic Cliffs, Carina Nebula · NASA, ESA, CSA, STScI

Kamba Adeema, the Avurudu tug of war, rebuilt in 3D: two chibi village teams, one rope and a bet on every heave.
Kamba adeema (කඹ ඇදීම, "pulling the rope") is the tug of war played at every Avurudu fair in Sri Lanka. It started as a three.js game in my Next.js arcade, and this is its Unity 6 rebuild. Two teams of chibi villagers, Yati Pila in red and Uda Pila in blue, heave on a village pitch at dusk in front of tiered stands full of villagers waving flags, filmed side-on like a sports broadcast.
You bet on each heave. Eight grips are drawn per heave, the side with more grips drags the rope, and the first team to pull the red ribbon seven marks over its line wins the match. YATI or UDA pays 1.92×, DRAW pays 3.55× and POWER pays 27.5× when your side wins the heave by three or more, all at a 97% return. In the arcade, every paid heave is drawn and settled by the game provider.
Drummers, lanterns, a pahana oil lamp and a cheering village crowd make it feel like Avurudu first and a betting game second.
Every heave is eight independent, fair grips, so both sides are priced exactly the same and the maths has a closed form.
Each demo match is sealed with a hashed seed before it starts, and History lets you re-draw every heave once it’s over.
These screenshots were captured straight from the game. Tap any of them to see it bigger.







Tap YATI or UDA, DRAW, or POWER under your side’s card. Your pick stays on the card, so the next heave is one tap.
Use MIN, ½, 2× or MAX, or type a stake. AUTO repeats your bet 5, 10 or 25 times, and TURBO speeds up the pull.
Press HEAVE! or swipe down. The grips light up one by one, the rope moves and you’re paid straight away. Tapping the ground cheers your side on.
The first team to drag the ribbon seven marks wins. The match seed is revealed and the next match seals itself after a short countdown.
A packed-earth strip with a chalk line, marker flags, a red-and-blue barrier, tiered stands, lanterns, drummers and palms under a violet-to-gold sky.
222 low-poly villagers in sarees, sarongs and banians wave team flags and Sri Lankan flags and cheer every heave.
The rope runs on a damped spring, and every puller leans on a spring of their own, kicked by the strain, each grip, each slip and the heave.
The rope drops, the winners face the camera and jump with their fists up, and the losers slump to the ground and cry.
Glossy slab buttons with a lip that sinks when pressed, jelly pick cards and cream panels under ribbons, all in Baloo 2, with big touch targets.
A brass oil lamp whose seven wicks, one for each mark, light up as the game loads.
I made this game on my own, so I handled the design, the code, the art pipeline, the audio and the release.
The grips, marks, stamina, paytable and HMAC draw live in a pure C# package with no Unity references. The client runs it for the offline demo, and the game provider compiles the same files as the authority for paid heaves.
The swing (Yati grips minus Uda grips) is exactly a shifted Binomial(8, ½), so every bet’s price comes from a formula rather than a simulation. A .NET simulator then checks each bet’s return over real matches.
Before the first heave, a match is sealed with the SHA-256 of a secret seed and the hash of a fresh blockchain block. Each heave’s grips are HMAC-SHA256 of the seed, the client seed, the block hash and the heave number, and the seed is revealed when the match ends.
The backend owns the match and a strictly increasing nonce, so leaving in the middle of a heave can never replay the same grips. A fairness test checks it, along with the two sides being symmetric.
build_arena.py makes the pulling strip, marker flags, barrier, tiered stands, pandals, lantern poles, drummers’ stands, the pahana, palms, bunting and stalls, and build_crowd.py fills the stands with 222 villagers.
build_villagers.py dresses KayKit characters in sarongs, banians, headbands and sarees, and animates Ready, Strain, Heave, Haul, Dragged, Slip and Fall with IK on the KayKit rig.
A script found CC0 recordings on Freesound: shehnai and drums, dholak, tabla, a conch, the koel and rathinga firecrackers, cut and levelled in Python. The grunts, rope burn and claps are synthesised.
Credits. The villagers are built on KayKit characters and animations (CC0), the Sri Lankan flag is public domain, the font is Baloo 2 (OFL), the recordings come from Freesound creators (CC0) and the crowd from Gregor Quendel (CC BY 4.0), with Kenney sound effects (CC0). The arena, crowd, rope, logo and the pullers’ moves were made for the game in Blender, with no AI-generated art or audio. Everything is credited on the in-game About screen.