All writing

Games · Tools

Scribble or Smash?

How the constraints in GLASS’s editor helped it find a stained-glass style.

The first GLASS editor let me draw with an Apple Pencil. It used pixels rather than vector lines, and at that stage there was no stained-glass renderer. I liked being able to sketch a puzzle.

The trouble was deciding what the sketch meant. Two regions might appear to touch when a tiny gap separated them. An overlap could create an extra region that was barely visible. The colouring rule depended on knowing which regions were neighbours, so these were game problems as well as drawing problems.

Give the geometry some space

I moved towards vectors and introduced rules for spacing, junctions and angles. Those constraints made the designs easier to read, but also changed how they looked. My puzzle designer started making forms that resembled stained-glass windows. I followed that direction into the material work.

I did not begin with a finished visual style and then build an editor to reproduce it. Working out what made a legible puzzle helped us find the style.

Avoid a drawing tool that keeps objecting

The vector editor could enforce a rule by rejecting a movement. That was clear to the code and irritating to use. I wanted to keep the freedom of the early drawing tool, even though the underlying geometry had become much stricter.

Points now snap, push and settle as they approach a constraint. Second-order motion gives the correction a softer response. The author can keep moving rather than stop to dismiss an error or work out which rule they broke.

The awkward cases were rarely a dramatic invalid shape. They were tiny lines, near-overlaps and junctions changing as something moved past them. I have kept recordings of those failures. Seeing an almost-working editor break makes the reason for the finished behaviour much clearer.

Let someone else use it

My mum has made puzzles for GLASS in this editor. That is useful feedback because she is not approaching it with my mental model of the geometry. A behaviour has to make sense from the movement on screen.

The current tool is more constrained than the first sketching experiment. I think it is also more enjoyable to draw a usable puzzle with. The constraints do some of the work that I previously left to the person drawing.