1. Before you start
-
Make a copy of the whole
source/folder before changing anything. If something goes wrong, copy the file back. - Text editor: any plain-text editor works. Free choices: Visual Studio Code, Notepad++ (Windows) or TextEdit in plain-text mode (macOS). Do not use a word processor.
- Pictures: the game uses WebP files. Free tools that open and save WebP: GIMP, Krita or the Squoosh website.
- Work in
source/, test, then build: the steps are at the end of this guide.
2. See your changes on your computer
Open a terminal in the source/ folder and run npm run dev, then open
http://localhost:5180/ in the browser. After each change, reload the page. Node.js 26.13.0 or newer is needed
for this command (see the Development section of the main guide). Opening index.html directly
from the disk does not work.
npm run dev
3. Name and logo
-
The name in the browser tab: open
index.htmland change the text of the<title>line. -
The logo: replace
assets/img/logo.webp(portrait screens) andassets/img/logo-wide.webp(landscape screens) with your logo, as WebP with a transparent background and a similar size. -
The
alttext of the two logo pictures inindex.htmlis the name read by screen readers: change it too.
4. Pictures
Replace a file with another of the same name, format and similar size. The most visible pictures:
File in assets/img/ |
Where it shows |
|---|---|
bg-port.webp, bg-land.webp |
The background in portrait and in landscape |
otter-idle.webp, otter-think.webp, otter-hype.webp,
otter-cheer.webp
|
The otter on the start screen and the menu (one picture per pose) |
peek-idle.webp, peek-think.webp, peek-hype.webp,
peek-cheer.webp
|
The otter on the panels and at the edge of the game screen |
a-card2.webp |
The frame of every panel (stretched in 9 pieces, keep its corners) |
a-pill-amber.webp, a-pill-navy.webp, a-round.webp,
a-bar.webp
|
The buttons, the round buttons and the bar at the top of the game |
ia-*.webp |
The icons of the buttons |
The pipes, the valve, the tub, the wheels and the water are not pictures: they are drawn in code (see the next sections).
5. Texts and languages
Every text of the game is in src/lib/locales/, one file per language (en.js,
pt.js, es.js...). Change only the text on the right of each line and keep the quotes
and the key on the left. Keep {n} where it appears: the game puts a number there.
6. Pipe and water colours
Open src/render/pipes.js. Near the top there is an object named C with the colours
of the brass rings, the cells and the two waters (1 is the cold water, 2 the hot
water, each from dark to light). Change a colour code and reload the page:
const C = {
brass: '#c8962a', // brass rings at the pipe ends
cellA: '#237492', // board cells, light
cellB: '#155574', // board cells, dark
water: { 1: ['#0e9aa0', '#29e0d0', '#b8fff4'], 2: ['#b85a07', '#ff9a28', '#ffe6a8'] }, // cold and hot water, dark to light
// ...
};
The shading of the copper and the brass of the pipes is in the RAMP object a little lower in the
same file. PIPE_W is the thickness of the pipes.
7. Sounds and music
Every sound is an MP3 in assets/audio/. Replace a file and keep its name. Some of the sounds:
| File | When it plays |
|---|---|
rotate.mp3 |
A pipe turns |
connect.mp3, disconnect.mp3 |
Water reaches a pipe, or leaves it |
locked.mp3 |
A tap on a locked pipe or a rock |
valve.mp3, tub-fill.mp3, win-chord.mp3, star.mp3
|
The level is solved: the valve, the tub filling, the win chord and each star |
tick.mp3, time-up.mp3, lose.mp3 |
Pressure Mode: the last seconds, the end of the time and the lose card |
menu.mp3, game.mp3, amb-springs.mp3 |
Music of the menu, music of the levels and the hot-spring ambience |
8. Difficulty
Open src/config.js. Inside FEEL, these values change how the game plays:
export const FEEL = {
// ...
pressureStartSec: 12,
waterCellsPerSec: 6,
particlesMax: 90,
hintsPerLevel: 3,
// ...
};
| Value | What it changes |
|---|---|
hintsPerLevel: 3 |
Hints per attempt |
pressureStartSec: 12 |
Seconds of each Pressure Mode round (the game adds 0.7 seconds per move of par) |
waterCellsPerSec: 6 |
How fast the water runs through the pipes |
particlesMax: 90 |
Number of effect particles (lower it for old phones) |
The size of the boards and the elements of each world are in buildSpec() in
src/game/generator.js (rows and cols are the size, rocks,
fixed, wheels, bridge and dual are the elements). After a
change there, run npm test: it checks that all 100 levels can still be solved at par.
9. Publish your version
-
In the
source/folder runnpm test(every check must pass), thennpm run build. - Upload the contents of
source/dist/to your web host, in place of the old files. - Clear the cache of the browser if you still see the old version (see the main guide).
- Questions: write to
willian@polargames.com.brwith your purchase code.
npm test npm run build