DEV Community

Ahmed Moaz
Ahmed Moaz

Posted on AI-assisted

Scoring a drawing game fairly: speed points, a shrinking share, and a paid drawer

When I built the scoring for a draw and guess game, the first version was the obvious one: the faster you guess, the more you get. It took one test table to show why that is not enough.

Step one: speed points

A correct guess earns points on a straight line from the clock. A guess as the timer hits zero is worth 100, and one at the very start is worth 500, so the range is 100 plus up to 400 across the whole drawing time. The values are rounded to the nearest 5.

const GUESS_FLOOR = 100;
const GUESS_RANGE = 400;

function speedPoints(secondsLeft: number, drawSeconds: number) {
  const total = Math.max(1, drawSeconds);
  const left = Math.min(total, Math.max(0, secondsLeft));
  return round5(GUESS_FLOOR + (GUESS_RANGE * left) / total);
}
Enter fullscreen mode Exit fullscreen mode

The clamp matters. A clock read a hair outside its bounds must not pay more than 500 or less than 100.

Step two: a shrinking share

If three people read a good drawing in the same second, they should not all take the full amount. Each correct guess is its speed points multiplied by an order share of 1 / (1 + 0.8 x earlier correct guesses). The first guesser keeps 100%, the second about 56%, the third about 38%, and no one ever drops below 20%. At 450 speed points that pays 450, 250, 175, 130, 105 and 90.

Step three: pay the drawer on what the table actually scored

The drawer takes the points the other players scored this turn, as shown on the result screen after the order cut, divided by everyone at the table: the drawer and any player who did not answer count in the divisor. Rounded to a multiple of five. In a two-player room the drawer gets half of the guess. With four players and three guesses worth 450, 250 and 175, the drawer gets 875 / 4, about 220. If nobody guesses, the drawer gets nothing.

I changed this after the first version. An earlier rule divided by the number of guessers, so a drawing only one person read could pay the drawer as much as one the whole table read. Dividing by the whole table means every extra right answer adds to what the drawer earns.

Hints without giving it away

The dashes show how long each word is, and letters fill in one at a time as the clock runs down. A guess that is one letter off tells only that player they are close, and a right guess is hidden from the table so nobody copies it.

The takeaway

When you design scoring for a multiplayer game, test it with a table that behaves badly: simultaneous guesses, no guesses, and one very good drawing. Most of the fairness bugs show up there.

If you want to see it running, the game is a free draw and guess game for two to twelve players on Boardit: a drawing game with friends in the browser, with no download. It is not just for friends, because Quick match seats you at an open table with other players.

Top comments (0)