This page tells how Pétanque Game is made. For the game itself — what it offers, what it costs, when it comes out — the game's page is the place, and the web version plays right away.
From the browser to the phone
The game started among the website's mini-games, in TypeScript and three.js. The app is built with Unity 6 (URP), and its core reinvents nothing: the rules, the physics of the boules, the computer opponent and the sway of the hand are copied line by line into C#, in an assembly that knows nothing of Unity. A script runs the website's code and writes a reference file: pitch heights, throws run until the boules stop, the computer's plans. The app's tests replay it all and must land on the same numbers.
The devil is in the details: the pitch noise relies on Math.imul and >>>,
which become unchecked integer arithmetic in C#; heights stay float because the website keeps
them in a Float32Array; and Math.round does not round halves the way
Math.Round does. Each gap shows up in a test before it shows up on the pitch.
Two phones, one match
Online, only the throws travel: the boule's speed and where the hand lets it go, numbered and applied in order, over Unity Netcode and Relay. Each phone replays the throw with the same engine, which allows itself nothing but square roots so that both devices land on the same result. After each throw, the phone that opened the match sends its ruling and the other one adopts it; a phone that falls behind asks again for what it lacks.
To check it, a script opens two Unity editors that play a real private match against each other through the online services, and must end with the same head, to the millimetre. It is what found the guest that never started: the session connected it before its link existed, and the start signal got lost.
A pitch you can read
A pitch goes from smooth to rough: a tilt, bumps, craters from high lobs, patches of four grounds, stones that send a boule off, and a layer of loose gravel, thicker along the planks. The ground shader blends the four textures where each ground really plays, and steepens the slopes six times for the light only: drawn at their true size, a few centimetres per metre, the eye could not read them. The physics never sees that exaggeration.
The computer, and the path shown before you let go, work on a "blind" copy of the match: without the hidden stones, without what nobody can read on the ground. The real throw feels them, and the same way on both phones.
Players with their habits
The players are 3D bodies from Microsoft Rocketbox, posed by code on every frame, with no animation files: the crouch, the pointer's pendulum swing, the shot that rises onto the toes, the walk that keeps the foot on the ground. The stances follow photos of real players. Before each boule, everyone has a ritual, drawn at random and always the same: weighing the boule, wiping it, bending the knees, aiming. The outfits are drawn by a shader from where each point sits on the body, so any outfit fits any player, with no texture per combination.
Measure, don't guess
Settings are measured by making the computer play itself. The Easy level, too hard at first, was redone on measurements; the leagues' entry fees and prizes come from hundreds of simulated matches; and each boule model (weight, diameter, hardness) faces the standard boule on three pitches, so that none is better everywhere.
For people who play for real
The game is aimed at players aged 45 to 75: a single type scale, never below 15 pt, buttons of a good size, and contrast checked in the menus' six colour themes. The play-mode tests launch the app, play a whole end, take screenshots in the five languages and list every text that overflows its frame; the same screenshots make the store images. The game's sounds (boules knocking, the ground, the jack, the planks) are synthesised, as on the website, without a single audio file.






