Puzzle Parcel

How the puzzle works

The puzzle is generated and played with browser code. This page explains the main processing steps and practical trade-offs.

1. Image decoding

When a user selects a photo, the browser decodes it into an image object. The site reads its width and height to create a board with the same aspect ratio. The selected file is not posted to a Puzzle Parcel image server.

2. Exact grid selection

A piece count is defined by columns multiplied by rows. Presets include 12, 24, 48, 96, 150, 300, 500 and 1,000 pieces. Custom grids are also allowed as long as the total is no more than 1,000. A 40 × 25 grid produces exactly 1,000 pieces.

3. Matching curved boundaries

Every internal boundary is generated once from a seeded random sequence. One side receives a tab and the neighbouring side receives the mirrored slot. Outer edges stay flat. Because both pieces reference the same boundary decision, their curves match.

4. Lazy piece rendering

Generating a large bitmap for every one of 1,000 pieces at startup would waste memory. Puzzle Parcel creates piece images when they are first needed in the visible tray or on the board, then caches them for later draws. The loose-piece tray is paginated for the same reason.

5. Dragging, zooming and snapping

Board coordinates are separate from screen coordinates. Zooming and panning change the camera view without changing the target positions. When a dragged piece is released near its correct target, the program snaps it exactly into place and locks it. Pieces may also be returned to the tray without rebuilding the puzzle.

6. Shareable HTML files

The share command compresses the current image, stores the title, completion message, grid and shape seed, and combines them with a compact offline player. The result is one HTML file. The recipient opens that file in a modern browser; no Puzzle Parcel account is required.

Performance limits

A 1,000-piece puzzle is intentionally heavy. Performance depends on image dimensions, browser, available memory and device graphics. Older phones may provide a better experience at 300–500 pieces. Closing other memory-intensive tabs can help.