The Velan Codex

Chapter

Shape overlaps

Method

The check copies the recognizer's shape step from Assets/Scripts/Scoring and runs it on every proposed template:

  1. Resample each thumb's stroke to 64 evenly spaced points (Geometry.Resample).
  2. Normalize: centroid to the origin, larger side scaled to 1, with orientation and direction kept (Geometry.Normalize).
  3. Take the mean point-to-point distance d to the other spell's template, thumb by thumb, and turn it into a shape score, exp(−d / 0.15) (PartScorers.Shape).
  4. A drawing counts as an attempt at a spell when both thumbs score at least 0.30, which means d under about 0.18 (ShapeMinimum). The scorer then picks the spell with the best overall score among the recognized ones, learned or not.

Every spell was compared with every other spell. Because the scorer also checks every ordered pair of spells as a composite (Grimoire.Castable, 27 × 27 = 729 chains, built with SpellComposer.Join), every spell was also compared with every chain, and every chain with every other chain.

This is a shape-only check on perfect templates. It doesn't model corners (20% of the overall score), size (10%), pace (15%) or sync (20%), all of which pull apart shapes that look alike but differ in corners, size or speed. So "recognized" here means the scorer has to fall back on those other parts, not that the cast certainly goes wrong. Every pair marked "watch" needs a device test.

Collisions fixed in this roadmap

These are Spell Set shapes that the check found too close to another spell. Each is redrawn in this roadmap.

Spell Set shapeCollides withShape scoreWhyRoadmap fixAfter the fix
Squall: an M, two peaks in a rowGale into Gale0.43Two Gales threaded is an M. A player who knows Gale but not Squall and draws Squall gets either "You have not learned Squall" or a free Gale-into-GaleA lightning bolt0.27 against Hush (watch list); Gale into Gale no longer near
Echo: a tiny arc, top to bottom, bulging outwardBrace0.54Once normalized, a rounded bracket and a square bracket are nearly the same pathA short stroke inwardClear of every other spell
Tailwind: a check markDrift0.46The check's long arm is Drift, and it is most of the strokeGale's peak upside down (a V)Clear (nearest: Table Mend, 0.18)
Root: a low waveCalm0.39A low wave normalizes to almost a straight outward lineA wave almost as tall as it is wide0.20 against Calm
Hasten: spiral outward, clockwise (right thumb)Wither0.31Its outer half-turn, most of the stroke, is Wither's archSpiral counter-clockwiseClear of Wither
(first draft) Weigh as a staircaseRepel0.33Its first two steps are an LAn N0.07 against Repel (nearest: Root, 0.20)

Pairs to watch on device

These pairs stay apart on shape (both below 0.30, or right at it) but are close enough that a careless draw could cross over. Corners, size or direction should separate them.

PairShape scoreWhat separates them
Coil and Hush0.30Size (34 mm against 12 mm). Hush is a straight vertical line, the shape many tall, narrow strokes collapse toward once normalized. Repel (0.28), Linger (0.27), Squall (0.27) and Tally (0.25) also sit near Hush.
Hasten and Recall0.26Direction only: same size, no corners, both spirals. They are a deliberate pair (speed time up, wind it back), but a player who starts Hasten from the wrong end may get Recall.
Coil and Linger0.25Linger loops; Coil doesn't. Same tier, close sizes.
Brace and Tally0.23Both two-corner Warden shapes starting with the same outward stroke; the corner positions differ.
Root and Calm0.20Size, and Root's height.
Weigh and Root0.20Weigh has two corners; Root has none.
Gale and Tailwindunder 0.10The recognizer keeps them apart, but they are the same peak flipped. Players may mix them up even when the scorer doesn't; teach them in different chapters.

Problems in how threads are built

The thread checks turned up four problems in SpellComposer and Grimoire. None is specific to this roadmap, and the code would need to change to fix them. They are listed for the Lead to ticket.

From Spell Roadmap › Shape overlaps