

Knotted
Drag nodes and untangle a web of ropes in Knotted, a WebGL puzzle where every level is a fresh knot to work loose.
Knotted is a Scratch puzzle about untangling a graph: you drag nodes, the game tests every edge pair for a crossing, and the move count is the score. The project also carries a small cipher for the high score names, which is why the leaderboard looks like numbers.
The build keeps four parallel lists: nodes, edges, coordinates and intersections. Nodes are named a, b, c and d, edges are named by their two endpoints, and coordinates hold an x and a y for each node. A level is therefore a graph rather than a tile map, which is why the whole game fits in two sprites.
| List | Contents |
|---|---|
| nodes | The node names, starting with a, b, c, d |
| edges | Edges as endpoint pairs, starting with ad and bc |
| coordinates | An x and a y per node |
| Intersections | One count per edge, updated every frame |
Dragging is resolved per node rather than per edge. The build records which node was grabbed, where the drag started, and where the node started, so a drag can restore the previous position if the player lets go outside the playfield. That is why the release behaviour is a reset rather than a snap.
The crossing test is the standard range overlap method: take the larger of the two minimums on each axis, take the smaller of the two maximums, and if the larger minimum is below the smaller maximum, the segments overlap on that axis. The build keeps each step as its own variable — max edge one, min edge two, max of mins, min of maxes — which is a deliberate choice for a Scratch project, because it makes the test readable while debugging.
A pair that overlaps on both axes is counted once per edge in the Intersections list. That list starts with two entries, one per starting edge, so the puzzle can tell you how many crossings each edge still has rather than only whether the board is clean.
The test is axis aligned rather than a true line intersection, which is why a diagonal pair can read as crossing when it only comes close. In a drawn puzzle that is a reasonable approximation, and it is the one this build ships.
The clean state is a total, not a per edge flag. When every entry in the intersections list reaches zero the board is solved, which is why the build can show a final image costume rather than a result screen. A puzzle that ends by arithmetic is easy to make feel instant.
A move counter, a total move counter and a score exist. The total is what a run adds up, so a level is rated by how few drags it took rather than by how fast you were. That is the classic untangling format: the puzzle is easy to finish and hard to finish in the minimum.
Two further counters exist for the drawing layer: a pen size and a node size. Both are values rather than constants, which is how the same build can draw a thin line for an edge and a fat dot for a node. A reset flag sits beside them so a level can be rebuilt without reloading the project.
Levels advance through a level value, and there is no readable list of level count. The build loads a graph into the four lists and the player solves it, so the level count is whatever the project ships as data rather than a declared constant.
Five cloud high score slots exist, each with a numeric score and a name field. The names are not plain text: the build converts a name to letter codes and back, with a letter iterator, a running decoded value and an upper case flag. A translated name like a long run of digits is the cipher output, not a bug.
The letter code list has ninety five entries and the character list has hundreds, which is the mapping table for that cipher. It exists because a Scratch cloud variable is easier to store as digits than as text, so the name is encoded before it is written and decoded when the board is shown.
The encoder keeps three index values and a source alphabet string, which is a substitution cipher rather than a hash. That matters for the leaderboard: a name is recoverable, so the board can print it back in letters, and a player cannot smuggle arbitrary text into a cloud variable through the name field.
There is no readable instruction text. The interface is three costume images — a backdrop, an entangled background and a final image — so the tutorial is drawn rather than written, and this guide does not invent it.
The level list is also absent as a readable set. The game starts with a four node graph and advances a level counter, but the rest of the graphs are built by the project’s own scripts rather than stored as a list of named stages, so the number of puzzles is not quotable here.
You drag the nodes of a graph until no two edges cross. The board counts crossings per edge as you move.
By a range overlap test on both axes, using the larger of the minimums and the smaller of the maximums. Each step is stored as its own variable.
A node drag. The build tracks current moves and total moves, and the total is the score.
The build encodes names as letter codes before writing them to a cloud variable, then decodes them for display.
The starting graph has four, named a to d, with two edges. Later levels are generated by the project scripts.
The build does not list them. It advances a level counter and loads a graph, so the count is data rather than a declared number.
Not as text. The instructions are costume images, so the build contains no readable tutorial copy.











