vincent nazzareno contact fr · en

Project

The math engine
behind a slot game

A casino game is first a probability distribution given a shape. The work is getting the distribution you want, then proving you got it.

python monte carlo simulation pixi.js spine

A brief written in numbers

A game arrives with precise constraints: a target return to player, a desired volatility, a hit frequency, a maximum win. These parameters are not independent. Raising the maximum win without touching the return to player mechanically thins out wins elsewhere, and the game feels different.

Design means finding the set of tables that satisfies those constraints together, not separately.

Verify rather than believe

Return to player can be computed analytically for simple features, but as soon as free spins, expanding symbols or re-triggers appear, exact computation becomes impractical. Simulation takes over, across very large numbers of spins.

What matters is not the mean obtained but its uncertainty: a return to player quoted to three decimals only means something if the confidence interval is tighter than the precision quoted. A run that is too short gives a number that looks right and is not.

The whole chain is reproducible down to the random seed, so a simulation campaign can be replayed exactly and a discrepancy explained rather than merely observed.

From model to screen

The second half of the work is integration: web rendering, symbol animation, win sequences, spin flow. The constraints change completely, you have to hold a smooth frame rate on modest devices, with heavy animation and constant transitions.

The delicate point is the boundary between the two worlds. A spin's outcome is decided by the math engine, never by the animation. The display only narrates a result already settled, and that strict separation is what makes the game verifiable.