Underground 2 Revived
Play Need for Speed: Underground 2 (2004) in Chrome and Firefox with WebGPU graphics, Web Audio, up to 120 fps widescreen, controller support, free roam and Online races with friends. Fan project, not
Printable picture Numberlink puzzles for young kids
Translation pending
GamesHTML · JavaScriptGitHub @tb-xOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗A maker for printable picture puzzles for young kids (around age 5). Each puzzle is a grid of squares with pairs of matching pictures in it (two suns, two fish, two cars…), and the child joins each pair with a line. The sheets have no words, so they work for kids who can't read yet, and they're made for a black-and-white printer. The answer is hidden in a QR code: scan it with a phone camera to watch coloured lines draw each pair's way.
Live at https://tb-x.github.io/connect-the-pairs/
How a puzzle is made: a random path that runs through every square once (a snake, shuffled with hundreds of "backbite" moves), cut into lines of at least 3 squares. The cuts are placed so that no line runs alongside itself, which keeps the lines simple, and the two ends of a line are never next to each other. The ends of each line become a pair of pictures. A solver then checks that, with every square used, the puzzle has exactly one answer; if not, it tries again. A puzzle takes a few milliseconds, so even 20 pages of 7 × 7 come up in well under a second.
The QR code holds the whole puzzle in the link: the grid size, then five digits for each pair (its picture, then
its two squares, numbered row by row), e.g. #5x5.10712505132…. The digits go into the QR code in its numeric
mode, which packs them tightly, and every QR dot is at least 0.4 mm. The answer page solves the puzzle again from
the link. Nothing is stored anywhere, so a printed sheet keeps working for as long as this page is online. The QR
always points at the published page on GitHub Pages, even when the maker runs on a local server.
It's a single index.html with no build step. Serve the folder and open it:
python -m http.server 5219
Then go to http://localhost:5219/. Opening index.html straight from disk works too. The QR codes are made
by qrcode-generator 1.4.4 (MIT), loaded from cdnjs.
After the first visit the page also works offline and can be added to a phone's Home Screen.
Named constants at the top of the script in index.html:
| Constant | Default | What it does |
|---|---|---|
DEFAULTS | 5 × 5, 1 a page, 1 page | Starting settings |
PAIRS | 4: 3–4, 5: 4–5, 6: 5–6, 7: 6–8 | The sizes in the Size list, and how many pairs each has |
MIN_LINE | 3 | Fewest squares in one pair's line, counting both pictures |
BACKBITES | 20 | Shuffling moves per square for the random path through every square |
TRIES | 400 | Paths to try before giving up on a puzzle (one is nearly always found in the first few) |
SHEETS_MAX | 20 | Most pages printed at once |
GRID | 1, 2 (stacked), 4 (2 × 2) | How the grids sit on a page |
MAX_CELL | 36 mm | Biggest square on the sheet |
PIC | 0.78 | A picture's size, as a share of its square |
QR_SIZE | 24 / 22 / 20 mm | Answer QR code with 1, 2 or 4 grids a page |
QR_MODULE | 0.4 mm | Smallest QR dot: the QR code grows if it would be smaller |
LINE_W | 0.3 | Answer line thickness, as a share of a square |
DRAW_SPEED | 0.11 s | Time per square while the answer page draws a line |
COLOURS | red, blue, green, orange, purple, pink, teal, brown | One line colour per pair on the answer page |
PUBLIC_URL | https://tb-x.github.io/connect-the-pairs/ | Where the QR codes point |