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
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 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 |