Stillpiece Puzzle · Customization Guide · version 1.0.0 · Main buyer guide

Customization Guide

Make Stillpiece Puzzle your own game: your own photos and categories, how many puzzles are open, the piece sizes, the texts, the name and the title art, colors, music and sounds, and how the pieces feel. Every recipe below is a short list of steps and says exactly which file to open. You do not need to know how to program. All pictures on this page are real screenshots of the game in this package.

1. Before you start

Free tools you need:

Which folder to edit. The download has two copies of the game:

The paths in this guide (for example assets/pics/dogs-01.webp) are the same inside both folders.

Make a backup first. Copy the whole folder (or keep the ZIP you downloaded) before changing anything. If something breaks, you can always go back.

See your changes on your computer. The game must be opened from a web address, not by double-clicking index.html (browsers block the game that way). Two easy ways:

python -m http.server 8080

After each change, reload the page with Ctrl+F5 (Windows) or Cmd+Shift+R (Mac) so the browser does not show the old file.

On your own computer (addresses that start with localhost) you can open any puzzle directly by adding ?play=dogs-01&g=0 to the address (g is the size, from 0 for 24 pieces to 5 for 294), and ?unlock opens every puzzle. These shortcuts do not work on a published site.

2. Where everything is

The numbers on each screenshot match the table below it. Texts are named by their key in src/locales.js (recipe E).

Title screen

Title screen, real screenshot with numbered parts 1 2 3 4 5
# What you see File to change
1 Emblem assets/art/emblem.webp (recipe F). The same picture is the icon of the browser tab.
2 Game name Written in index.html: the line <h1 class="logo">Stillpiece<small>PUZZLE</small></h1> (recipe F).
3 Floating pieces assets/art/title-pieces.webp (recipe F). Shown on computers and on phones held upright.
4 Tap to start button Text: key tapToStart (recipe E). Green: --lime and --lime-2 in style.css (recipe G).
5 Background Three colors set at the top of style.css: --a1, --a2, --a3 (recipe G). On screens with a photo the game shifts them a little toward the photo.

Home screen

Home screen, real screenshot with numbered parts 1 2 3 4 5 6
# What you see File to change
1 Big photo The last puzzle in progress or, when there is none, today's daily puzzle. It is the photo itself, from assets/pics/ (recipe A).
2 Continue or Start Texts: keys continue and start. The name above it is the category name and the photo number.
3 Daily puzzle card Today's photo (thumbnail from assets/pics/t/) and the date, written in the player's language by the browser. Title: key dailyPuzzle.
4 Category card The thumbnail of photo 01 of the category, for example assets/pics/t/dogs-01.webp. Name: key cat_dogs, or a name in content.js (recipe B).
5 Home, Daily and Library Texts: keys home, daily, library. The icons are drawn by code: the list ICONS at the top of src/ui.js.
6 Options button Icon: gear in the ICONS list of src/ui.js. It opens the Options panel.

Library

Library, real screenshot with numbered parts 1 2 3
# What you see File to change
1 Category cover Photo 01 of the category (its thumbnail). To change the cover, change which photo is number 01 (recipe A).
2 Category name Key cat_<id> in the language files, or the name of the category in content.js (recipe B).
3 Finished puzzles Finished in this category / the count of the category in content.js. Counted on each device.

A puzzle in progress (computer)

A puzzle in progress (computer), real screenshot with numbered parts 1 2 3 4 5 6
# What you see File to change
1 Progress Pieces placed / pieces of the puzzle. The ring uses --lime (recipe G).
2 Picture, whole puzzle, lock and options Icons: eye, puzzle, lock, unlock and gear in the ICONS list of src/ui.js.
3 Board Drawn by src/table.js. The pieces are the photo cut by src/jigsaw.js. The green of a locked piece and of the win frame is ACCENT in src/config.js (recipe G).
4 Table grid The thin grid and its light waves: grid in FEEL, src/config.js (recipe I).
5 Tray Drawn by src/table.js. How a piece leaves the tray: tray in FEEL (recipe I).
6 Edges and Organize Texts: keys edges, shuffle, sortColor and scatter. Icons: org, shuffle, color, fit in src/ui.js.

Panels, cards and buttons are drawn by style.css (no pictures to replace): the blue glass is --glass, the cyan border and glow are --line and --glow, the green buttons are --lime. The small icons are drawn by code in the ICONS list of src/ui.js.

A category, real screenshot
A category: in progress (percentage and bar), finished (check mark and size), new, and locked. Texts: keys isNew, pieces, locked. How many are open: recipe C.
Piece choice, real screenshot
Piece choice: the six sizes come from GRIDS (recipe D). Texts: keys howMany, rotate, startPuzzle, startOver, tapAgain.
Tray options, real screenshot
The organize menu of the tray. Texts: keys shuffle, sortColor, scatter.
Spread pieces, real screenshot
Spread pieces (computers): the tray pieces are laid around the board.
Ghost picture and edges, real screenshot
The eye button turns on a faint ghost photo under the board; Edges shows only border pieces. How faint: ghost in FEEL (recipe I).
Options, real screenshot
Options: music, sound effects, vibration, less motion, language and full screen. Starting volumes: VOL in src/config.js.
Win panel, real screenshot
Win: the photo, pieces and time. Texts: keys puzzleComplete, nextPuzzle, morePieces.
Daily puzzle, real screenshot
Daily: today's photo and the calendar. The photo is picked from all photos by the date (no server).
A puzzle on a phone held upright, real screenshot
A phone held upright: the tray runs along the bottom.

4. Recipe A: replace the photos

Each puzzle is two files with the same name: the photo in assets/pics/ (1536 x 1024 pixels) and its small thumbnail in assets/pics/t/ (480 x 320 pixels). The name is the category id and a two-digit number: dogs-01.webp, dogs-02.webp and so on. Photo 01 is also the cover of the category.

Way 1: with the included converter (many photos at once)

  1. Install Python 3 from python.org, then the Pillow library: run pip install pillow in a terminal.
  2. Name your photos like the game files, for example dogs-01.jpg (JPG, PNG or WebP, any size).
  3. Put them in the folder source/photos/ (the converter creates it the first time it runs).
  4. In a terminal inside source/, run the command below. It makes both files of each photo in assets/pics/ and assets/pics/t/, cuts the photo to 3:2 at the center if needed, and skips photos that are already up to date.
npm run pics

(Without Node.js, the same converter runs with python tools/pics.py. On macOS and Linux Python is often called python3: if npm run pics says python was not found, run python3 tools/pics.py instead.)

Way 2: by hand, with an image editor

  1. Crop your photo to 3:2 and resize it to 1536 x 1024. Export it as WebP (quality about 80) with the right name, for example dogs-01.webp, into assets/pics/, replacing the old file.
  2. Resize the same photo to 480 x 320 and export it with the same name into assets/pics/t/.
  3. If you prefer JPG or PNG, export every photo and thumbnail in that format and change format in content.js to 'jpg' or 'png'. All photos must use the same format.
The 120 photos of the package are about 0.5 MB each. A player downloads a photo only when its puzzle opens.

5. Recipe B: add, remove, rename or reorder categories

The whole library is one short file next to index.html: content.js.

export const CONTENT = {
  format: 'webp',
  openPerCategory: 3,
  categories: [
    { id: 'dogs', count: 10 },
    { id: 'cats', count: 10 },
    { id: 'cars', count: 8, name: { en: 'Cars', pt: 'Carros', es: 'Coches' } },
  ],
};

The twelve categories that ship with the game already have names in all 14 languages:

id English name Text key Photos
dogs Dogs cat_dogs dogs-01.webp to dogs-10.webp
cats Cats cat_cats cats-01.webp to cats-10.webp
birds Birds cat_birds birds-01.webp to birds-10.webp
wildlife Wildlife cat_wildlife wildlife-01.webp to wildlife-10.webp
flowers Flowers cat_flowers flowers-01.webp to flowers-10.webp
landscapes Landscapes cat_landscapes landscapes-01.webp to landscapes-10.webp
coasts Coasts cat_coasts coasts-01.webp to coasts-10.webp
cities Cities cat_cities cities-01.webp to cities-10.webp
food Food cat_food food-01.webp to food-10.webp
rooms Cozy Rooms cat_rooms rooms-01.webp to rooms-10.webp
seasons Seasons cat_seasons seasons-01.webp to seasons-10.webp
underwater Underwater cat_underwater underwater-01.webp to underwater-10.webp

Puzzles are titled with the category name and the photo number ("Cars 3"), so there are no photo names to translate. If you edit source/, run npm test after any change: it checks content.js and lists every missing photo or thumbnail file.

npm test

6. Recipe C: choose how many puzzles are open

7. Recipe D: change the piece sizes

The six sizes (24 to 294 pieces) are the list GRIDS in src/config.js, written as columns and rows:

export const GRIDS = [[6, 4], [9, 6], [12, 8], [15, 10], [18, 12], [21, 14]];
export const DEFAULT_GRID = 1;
  1. Each size must be 3:2 (columns divided by rows = 1.5), because the photos are 3:2 and the pieces are square: for example [3, 2] (6 pieces), [24, 16] (384 pieces).
  2. Keep six sizes: the piece choice screen is laid out for six buttons.
  3. DEFAULT_GRID is the size chosen the first time (counting from 0, so 1 is the second size). After that the game remembers the last size each player chose.
  4. If you edit source/, open test/jigsaw.test.mjs and write your new counts in the line [24, 54, 96, 150, 216, 294], then run npm test.
Change the sizes before you publish. A puzzle in progress is saved with the position of its size in this list, so changing the list on a live site can break the puzzles players left in progress. If you must change it later, also change the save key (STORAGE_PREFIX in src/config.js): players then start fresh.

8. Recipe E: change texts and translations

All texts players read are in two files: src/locales.js (English, Portuguese, Spanish) and src/locales-more.js (French, German, Italian, Dutch, Polish, Turkish, Russian, Indonesian, Japanese, Korean, Chinese). Each language is a block of lines like these:

  tapToStart: 'Tap to start', today: 'Today', daily: 'Daily', library: 'Library', home: 'Home',
  pieces: '{n} pieces', howMany: 'How many pieces?', rotate: 'Rotate pieces',
  1. Find the text you want to change (Ctrl+F in your editor). The word before the colon is the key; never change it.
  2. Change only the words inside the quotes. If your text has an apostrophe, like Let's, put double quotes around the text: "Let's go!".
  3. Keep markers such as {n}: the game puts a number there.
  4. Change the same key in the other languages you use. A key missing in a language shows the English text.

Dates (the daily puzzle and the calendar) are not in these files: the browser writes them in the player's language.

9. Recipe F: change the name, the title art and the tab icon

  1. Name on the title screen: open index.html and find <h1 class="logo">Stillpiece<small>PUZZLE</small></h1>. Change Stillpiece (the big word) and PUZZLE (the small line under it).
  2. Browser tab name: in the same file, change the text between <title> and </title>.
  3. Emblem above the name: replace assets/art/emblem.webp with a square-ish picture with a transparent background, about 600 pixels wide.
  4. Floating pieces under the name: replace assets/art/title-pieces.webp (transparent background).
  5. Tab icon: the line <link rel="icon" href="./assets/art/emblem.webp"> in index.html uses the emblem. Some browsers also ask for favicon.ico, next to index.html: replace it with your own icon.
  6. Browser bar color on phones: the line theme-color in index.html.

10. Recipe G: change colors and the font

11. Recipe H: replace or remove music and sounds

Save your audio as MP3 with the same file name and replace the old file.

Recorded sound When it plays
assets/sfx/snap.mp3 a piece locks in on the board
assets/sfx/snapBig.mp3 the last piece of the puzzle
assets/sfx/join.mp3 two loose pieces or groups join on the table
assets/sfx/shuffle.mp3 Shuffle, Sort by color and Spread pieces
assets/sfx/ui_click.mp3 most buttons
assets/sfx/ui_back.mp3 back and close buttons

12. Recipe I: change how the pieces feel

Every number of the game feel is in FEEL at the top of src/config.js, with a comment above each group. The most useful ones:

Setting What it does Package value
snap.radius How close to its place a piece must be dropped to lock in, as a part of one piece (bigger = easier). 0.3
pick.fingerUp On touch screens, how far above the finger the piece floats, in pieces. 0.8
tray.holdMs How long to hold a tray piece before it can be dragged in any direction, in milliseconds. 220
cam.deskFit On computers, how much of the screen the whole board fills at the start. 0.72
ghost How visible the ghost picture under the board is (0 to 1). 0.22
haptic Vibration lengths in milliseconds (phones that support it). 6 to 80
win The timing of the win: pause, photo, panel (milliseconds). 950 for the panel

Change only the numbers. Keep the commas, braces and names exactly where they are. Make small changes and try them: a little goes a long way.

13. Check and publish your changes

  1. Play the parts you changed on your computer (see Before you start), in a wide window and in a narrow one (F12, then Ctrl+Shift+M shows phone sizes).
  2. If you edited source/: in a terminal inside source/, run the commands below. The first checks the library, the photo files, the piece cut and the save keys; the second copies the game to source/dist/.
npm test
npm run build
  1. Upload everything inside game/ (or source/dist/, if you built it) to your web hosting, replacing the old files. If you removed photos, delete the old files on the server yourself.
  2. Open your game address and press Ctrl+F5. If you still see the old version, read the section about updates and cache in the main buyer guide.

14. If something goes wrong