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

Customization Guide

Make Tenfloe Puzzle your own game: your own levels and worlds, difficulty and helpers, pictures, logo, texts, music and colors. 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:

Make a backup first. Copy the whole game/ folder (or source/) to a safe place before you change anything. If something breaks, put the backup back.

Which folder do I edit? The simplest way: edit the files inside game/ and upload that folder. If you use the developer tools, edit source/ instead and run npm run build, which copies everything to source/dist/ (the same as game/). Both folders have the same file names, so every recipe below works in either one. The tests and the level generator are only in source/.

2. Where everything is

Each number on the screenshot matches a line of the table next to it, with the exact file to change. Interface texts are in src/locales.js (English, Portuguese, Spanish) and src/locales-more.js (the other 11 languages); the table gives the key of each text. Pictures are in assets/art/.

Title screen

Title screen, real screenshot with numbered parts 1 2 3 4
# What you see File to change
1 Play button Text: key play in src/locales.js and src/locales-more.js. Button picture: assets/art/btn-green.webp (recipe G).
2 Levels button Text: key levels. Button picture: assets/art/btn-amber.webp.
3 Sound button Icon: assets/art/b-music.webp. Opens the Sound window (music and effects volumes).
4 Settings button Icon: assets/art/b-gear.webp. Opens vibration, reduced motion, language (and Sound and Home during a level).

World map

World map, real screenshot with numbered parts 1 2 3 4 5 6 7 8 9
# What you see File to change
1 Stars of the world Icon: assets/art/star.webp. Counted by the game: 3 stars per level.
2 Settings button Icon: assets/art/b-gear.webp. Opens vibration, reduced motion, language (and Sound and Home during a level).
3 Sound button Icon: assets/art/b-music.webp. Opens the Sound window (music and effects volumes).
4 Current level Stone: assets/art/stone-now.webp; the penguin on the map is penguin-run.webp.
5 Finished level Stone: assets/art/stone.webp; stars: star.webp and star-off.webp.
6 Locked level Same stone, drawn paler by the styles. Path positions: POS in src/map.js.
7 World chest assets/art/chest.webp and chest-open.webp. What it gives: chests in src/main.js and the text key chestText (recipe D).
8 Gate to the next world assets/art/gate.webp; padlock lock.webp.
9 Play the current level Text: key level. Button picture: assets/art/btn-green.webp.

A level

A level, real screenshot with numbered parts 1 2 3 4 5 6 7 8 9 10
# What you see File to change
1 Moves left Icon: assets/art/steps.webp; text: key movesLeft. The limit is a formula in RULES_UI (recipe D).
2 Stars you would get now assets/art/star.webp and star-off.webp. Star limits: star3 and star2 in RULES_UI (recipe D).
3 Settings button Icon: assets/art/b-gear.webp. Opens vibration, reduced motion, language (and Sound and Home during a level).
4 The penguin Poses assets/art/pip-idle.webp, pip-think.webp, pip-cheer.webp, pip-run.webp, pip-wave.webp and pip-oops.webp (recipe E).
5 Door A colored bar on the snow rim, drawn by the styles in the color of COLORS (src/config.js). Position and size: the gates of the level (recipe A).
6 Numbered ice block Ice: assets/art/paper-r.webp … paper-k.webp (one per color); scarf: scarf-r.webp … scarf-k.webp. Gifts: bow.webp and the color (recipe E).
7 Undo Icon: assets/art/p-undo.webp; name: key pUndo; 3 per level: undoPerLevel (recipe D).
8 Brush Icon: assets/art/p-brush.webp; name: key pBrush; opens on level 6 (unlockAt).
9 Shovel Icon: assets/art/p-shovel.webp; name: key pShovel; opens on level 12.
10 Extra moves Icon: assets/art/p-plus.webp; name: key pPlus; +5 moves (plusMoves) or +20 seconds (plusSeconds).
A level on a computer, real screenshot
On a wide screen the level name, moves and stars sit on the left and the helpers with their keyboard keys on the right.
A level of Glass Pond, real screenshot
World 4 (Glass Pond): crystal blocks (crystal.webp, type pin) and the world backgrounds w4-bg-port.webp / w4-bg-land.webp.
A level of Aurora Bay, real screenshot
World 5 (Aurora Bay): surprise boxes (surprise.webp, type box).
The card of a new element, real screenshot
The card of a new element: title tBox, text dBox, picture surprise.webp. Shown by card in the level.
The win window, real screenshot
Win window: the stars, the moves used, the total of stars, Replay and Next. Penguin: penguin-win.webp.
The settings window, real screenshot
Settings during a level: vibration, reduced motion, Sound, Language and Home.

4. Recipe A: change a level or make a new one

All 50 levels are in src/levels.js, in five lists (W1 to W5, one per world), one line per level. A level looks like this:

{ size: [4, 4], blocks: [[0, 2, 1, 1, 6, 'r'], [3, 2, 1, 1, 4, 'r']], gates: [['t', 1, 2, 'r']], par: 2, tut: ['tut1', 'tut2'] },
  1. Copy a line of a level that looks like what you want and change its values. Every number must have a partner that adds up to 10 with it (directly or after merging), and every color of gift must have a door of that color.
  2. In source/, run npm test. If the level cannot be won the test says "fase N sem saida" (level N has no solution). If only the par is wrong, it shows the right number (expected); write that number in par and run the test again.
  3. Open the level in the browser to play it: http://localhost:5196/?level=12 (works only on your computer).
Each world shows 10 stones on its map. Keep 10 levels per world; to change the number of worlds see recipe C.

5. Recipe B: create random levels with the generator

source/tools/gen-levels.mjs makes random levels and keeps only the ones the solver can win, with a par inside the range you ask for. It prints ready-to-paste lines.

Windows (Command Prompt), inside source/:

node tools/gen-levels.mjs "{\"size\":[5,5],\"groups\":3,\"gates\":2,\"colors\":2,\"par\":[5,9]}" 3

macOS and Linux (Terminal), inside source/:

node tools/gen-levels.mjs '{"size":[5,5],"groups":3,"gates":2,"colors":2,"par":[5,9]}' 3

6. Recipe C: worlds, their names and backgrounds

7. Recipe D: difficulty, stars, helpers and chests

Open src/config.js and find RULES_UI:

The chest at the end of each world gives 1 Brush, 1 Shovel and 1 Extra moves (in src/main.js, search for chests). If you change that, change the text chestText too.

8. Recipe E: replace pictures (blocks, penguin, logo, buttons)

Keep the same file name and a similar size and shape, with a transparent background where the original has one.

Frames, bars and buttons are stretched pictures cut in nine pieces: the corners keep their size and the middle stretches. Keep the corners of a new picture about where they are in the original.

9. Recipe F: change texts, the game name and translations

  1. Open src/locales.js. Each language is a block of key: 'text' lines; English is en, Portuguese pt, Spanish es. The other 11 languages are in src/locales-more.js.
  2. Change only the text between the quotes. Keep words in braces such as {n}: the game puts a number there. If the text has an apostrophe, write it as ’ or \'.
  3. Change the same key in every language you use. A key missing in a language shows the English text.
  4. Game name: the page title is <title> in index.html, the logo is a picture (recipe E), and the end screen text endText names the game.

10. Recipe G: change colors and the font

11. Recipe H: replace or remove the music and sounds

12. Check and publish your changes

  1. If you edited source/: run npm test, then npm run build, and use source/dist/.
  2. Play the levels you changed in the browser on your computer.
  3. Upload the contents of the folder (game/ or dist/) to your web host, keeping the folders. Then clear the browser cache (see the main guide) to see the new version.

13. If something goes wrong