dInfinity

Face designer

Design: the designer is options 1v (d6 with a skull on the 1), 4c (colour picker) and 8d (d20, triangular face mask) of the clickable design (design/).

The face designer lets a user draw the faces of a die with a finger and roll the result immediately. Its output is a normal dice set (see docs/dice-sets.md), so a designed die can be exported, shared on any git forge or web server and installed by other users like any other set.

Flow

  1. Pick a base die. Any catalogue shape or any installed die. The designer copies its faces and labels, so face values are inherited; the user is only drawing what the face looks like.
  2. Draw. The screen shows one face at a time as a large square canvas with the face’s outline (triangle, square, pentagon, kite for the d10…) masked in. Swipe left/right or use the strip at the bottom to move between faces. The current face value is shown faintly as a guide and can be hidden.

    A d4 is the exception and needs three guides, not one. Its numbers belong to corners rather than to faces, so each of its four triangles carries the values of its three corners, one at each corner of the canvas (docs/dice-sets.md, “The d4”). The guide shows all three in place, and the two triangles sharing an edge have to agree along it — a die drawn otherwise reads as a different number depending on which way it is looked at, which the designer should make hard to do by accident rather than merely warn about afterwards.

  3. Preview. A 3D preview of the die with the drawn atlas applied, rotatable by drag, updated live.
  4. Roll it. One tap rolls the die in the tray to see how it looks in motion.
  5. Save. The die is added to the user’s personal set (“My dice”, id mine), or to a new set the user names. The set folder is written with a generated diceset.toml and one atlas PNG per die, and then run through the standard validator like any import.

Drawing tools

Deliberately small:

Strokes are recorded as vector paths in a draft file so that the canvas can be re-rendered at export resolution and so drafts survive process death.

Export details

Quick mode

From the roll screen, long-pressing a die offers “Doodle this die”: the designer opens on that die with its existing texture (if any) as the starting layer. Saving creates a variant in “My dice” with the same id suffixed -doodle and switches the current roll to use it. This is the “draw a skull on the 1 in ten seconds” path.

Constraints