Contents
1 Overview
Otter Flow is a complete HTML5 pipe puzzle game. Tap the pipes to turn them and lead the water from the valve to the tub with no leaks. An otter engineer in a hot-spring valley cheers you on.
It has 100 levels in 5 worlds of 20 levels: Pine Springs, Cedar Dam, Mill Creek, Stone Viaduct and Twin Geysers. Each world adds something new: straight pipes and curves, then T-junctions, rocks and locked pipes, waterwheels, overpass bridges and, at the end, a cold spring and a hot spring that must each reach their own tub.
Every level gives 1 to 3 stars by the number of moves. There is also a Daily Puzzle (a new board every day, with a streak counter) and a Pressure Mode with a timer. The board, the pipes and the water are drawn in code; the levels are built by the game from fixed seeds and every one of them is checked by the automated tests.
2 Installing on your website
Installing takes a few minutes if you have FTP access or a file manager in your hosting panel.
- 1. Extract
otter-flow-static-1.0.0.zipon your computer. -
2. Connect to your hosting by FTP or its file manager and open the folder where the game should live, for
example
public_html/games/otter-flow/. -
3. Upload only the contents of the
game/folder, so thatindex.htmlsits directly inside the target folder. -
4. Keep
assets/,css/andsrc/besideindex.html, with names and letter case unchanged. -
5. Open
https://your-domain.example/games/otter-flow/in a modern browser.
source/ folder, the documentation/ folder or the ZIP itself.
Players need no Node.js, PHP, database or account.
3 Requirements
-
Any static web hosting with HTTPS (or HTTP). Opening
index.htmldirectly from the disk (file://) does not work, because browsers block JavaScript modules there. - A current browser: Chrome, Edge, Firefox, Safari or Opera, on desktop or mobile.
-
About 9 MB of space on the server. The game makes no request to other websites: fonts, pictures and sounds
are all inside
game/. -
Node.js is only needed to run the tests or to rebuild the game from
source/(see the development section).
4 How to play
Tap (or click) a pipe to turn it a quarter turn. Water runs from the valve through every pipe that is joined to it. Join the valve to the tub so that no pipe end is left open: an open end is a leak and the level is not complete. In Mill Creek every waterwheel must turn, and in Twin Geysers the cold water and the hot water must each reach the tub of their own colour.
Stars: finish at par (the number of moves shown next to yours) or below for 3 stars, up to 3 moves over par for 2 stars, and with more moves for 1 star. Rocks never move and locked pipes cannot be turned.
Buttons during a level: Pause (Escape on a keyboard) opens Resume, Restart, Levels and Menu. Hint turns one pipe into place and can be used 3 times per attempt. Reset puts the board back to the start.
Daily: Today's Puzzle is a new board each day, the same for every player on that date, and the streak counts the days you solved it. Pressure Mode is a run of boards against a timer that grows harder every few rounds; when the time runs out you can try the round again. Progress is saved automatically.
5 Screens
Marks on the screenshot
- Logo
- Start button
Marks on the screenshot
- Play
- Daily
- Levels
- How to play
- Sound: music and effects volume
- Settings
Marks on the screenshot
- Back
- World name
- Stars in this world
- A level and its stars
- Next world
Marks on the screenshot
- Level, stars and moves against par
- Pause
- Hint (3 per attempt)
- Reset the board
Marks on the screenshot
- Stars earned
- Next world
- Replay
- Levels
Marks on the screenshot
- Today's Puzzle
- Streak
- Pressure Mode
Marks on the screenshot
- Time left
Marks on the screenshot
- Vibration
- Less motion
- Full screen
- Language
- Close
6 Files and folders
game/ is the ready-to-host game. source/ has the same editable files plus the
tests, a local preview server and the build script. Plain HTML, CSS and JavaScript ES modules: there is no
compile step and no npm dependency.
game/ upload these contents to your web host
index.html the page: start screen, menu, level map, game screen
css/ layout and look of every screen and panel
src/config.js START HERE: worlds and every game feel number (FEEL)
src/main.js screen flow, modes, saving, pressure timer, main loop
src/game/ level generator, rules and the solver robots
src/app/ screens, panels, level map, layout, interface animations
src/render/ draws the board: pipes, water, valve, tub, effects, scenery
src/audio/sfx.js sound effects, music and ambience
src/lib/ languages, text fitting, full screen, saving, 9-slice panels
src/lib/locales/ interface texts, one file per language
assets/img/ backgrounds, otter, interface art and effects (WebP)
assets/audio/ sound effects, ambience and music (MP3)
assets/fonts/ Fredoka, Nunito, Rubik and their licenses
DOCUMENTATION.txt short note that points to this guide
source/ the same editable files, plus:
package.json, package-lock.json
README.md
tests/ npm test (17 checks)
tools/build.mjs copies the game into dist/
tools/serve.mjs local preview server (npm run dev, npm run preview)
tools/check-node.mjs checks the Node.js version before the commands
documentation/index.html this guide (offline, 14 languages)
documentation/customization.html step-by-step customization guide
documentation/img/ the screenshots of the guides
DOCUMENTATION.html shortcut to this guide
CUSTOMIZATION.html shortcut to the customization guide
START-HERE.txt, CHANGELOG.txt
THIRD-PARTY-LICENSES/ Fredoka, Nunito and Rubik licenses
-
src/config.js: the first file to edit.WORLDS(the 5 worlds) andFEEL(every animation, the water speed, the pressure timer, the number of hints, the sound mix and the effects). -
src/game/generator.js: builds the 100 levels, the daily puzzle and the pressure rounds.buildSpec()sets the board size and the elements of each world.src/game/rules.js: the rules (pipes, rotation, water, leaks, stars, hints), with no interface code. -
src/main.js: screen flow, the three modes, saving, the pressure timer and the main loop.src/app/: screens, panels, the level map, the layout and the animations of the interface. -
src/render/: draws the board on the canvas.pipes.jsdraws the pipes, the valve, the tub, the wheels and the rocks in code;board.jsruns the water;fx.jsandboard-fx.jsare the effects;scenery.jsthe steam and the fireflies. -
index.html: the start screen, the menu, the level map and the game screen.css/: layout and look.src/app/modals.js: the panels.src/lib/: languages, text fitting, full screen, saving and the 9-slice panels. -
assets/img/: backgrounds, the otter, interface art and effects (WebP).assets/audio/: sound effects, the ambience and the music (MP3).assets/fonts/: fonts and their licenses.
7 Internal names in the code
A few names in the code differ from the words on screen. They are only names: players never see them.
-
The valve is a
sourceand the tub is asink. Pipe kinds:straight,elbow(a curve),tee(T-junction),cross,wheel(waterwheel),bridge(overpass) androck. A locked pipe is a cell withfixed: true. -
color: 1is the cold (turquoise) water andcolor: 2the hot (amber) water of Twin Geysers. Picture names ending in-wshow a pipe with water and-awith hot water. -
In a level,
paris the number of moves for 3 stars andsolis the stored solution used by the tests and by the Hint button. -
otter-*.webpare the otter poses on the start screen and the menu;peek-*.webpare the otter poses on the panels and at the edge of the game screen.
8 Customizing
CUSTOMIZATION.html in the main folder of the download, or
documentation/customization.html.
Brand: the name in the browser tab is the <title> line of index.html. The
logo is assets/img/logo.webp (portrait) and assets/img/logo-wide.webp (landscape).
The texts on buttons and panels are in src/lib/locales/.
Pictures: replace a file in assets/img/ with another WebP of the same name and a similar size.
The backgrounds are bg-port.webp (portrait) and bg-land.webp (landscape); the
otter poses are otter-*.webp and peek-*.webp.
Pipe and water colours: the colours of the brass rings, the cells and the two waters are in the
C object at the top of src/render/pipes.js; the shading of the copper and the
brass is in RAMP in the same file, and the pipe thickness is PIPE_W.
Difficulty and levels: buildSpec() in src/game/generator.js sets the size of the
board (from 4 by 4 up to 7 by 7) and the elements of each world; the seed in
generateLevel() picks the boards. After any change, run npm test: it replays every
level and checks that it can be solved at par. The pressure timer is pressureStartSec in
src/config.js (plus 0.7 seconds per move of par) and the hints per attempt are
hintsPerLevel.
Sounds and music
Every sound is an MP3 in assets/audio/, named with its id, for example
rotate.mp3 or tub-fill.mp3. The list of ids is IDS in
src/audio/sfx.js. To change a sound, replace the file and keep the name.
The music is menu.mp3 (start screen, menu and map) and game.mp3 (levels);
amb-springs.mp3 is the quiet hot-spring ambience. The volumes the player chooses are saved; the
starting volumes are in src/lib/storage.js.
otter-flow.template.save.v1. If you host two copies of the game on the same domain, change
the key in src/lib/storage.js of one of them.
9 Languages
The game has 14 languages: English, Portuguese, Spanish, French, German, Italian, Dutch, Polish, Turkish, Russian, Indonesian, Japanese, Korean and Chinese. The first visit uses the browser language; the player can change it in Settings.
To change a text, edit the same key in src/lib/locales/<code>.js. A key missing in
another language falls back to English. To add a language, copy en.js, translate it, import it
in src/lib/i18n.js and add it to TABLES and to LANGS.
10 Saving and resetting
- Stars, unlocked levels, the daily streak, volumes, settings and language are saved automatically in the browser of each player.
- Everything is stored under one key, shown below.
- To start over, delete these keys in the developer tools (F12), under Application, Local Storage, or clear the site data in the browser.
otter-flow.template.save.v1
11 Development (optional)
This section is only for changing the code. The game/ folder already contains the finished
game, so installing it needs no Node.js. The game has no dependencies and no compile step:
npm run build only copies the files into dist/.
1. Install Node.js. Open https://nodejs.org/en/download and choose the latest Node.js 26 LTS installer for your system (minimum 26.13.0). npm is included.
Windows: run the .msi installer, keep npm and Add to PATH enabled, finish the installation and reopen Command Prompt. macOS: run the official .pkg installer and reopen Terminal. Linux: follow the instructions on the same page for your distribution.
2. Check the installation. Run node --version and npm --version separately. Both
must print a version number, and Node.js must be 26.13.0 or newer. If a command is not found, reopen the
terminal and check that Node.js is in PATH.
node --version
npm --version
3. Extract the complete ZIP first and open its source/ folder, where
package.json is. Windows: type cmd in the address bar of that folder in File Explorer. macOS
and Linux: open Terminal and use cd with the path of the folder.
4. Run the commands below one by one. npm ci checks the lock file (nothing is downloaded, the
project has no dependencies). npm test runs 17 checks: the rules, the 100 levels solved by two
robots, 30 daily puzzles and 20 pressure rounds, the 14 languages and the package.
npm ci
npm test
5. Preview: npm run dev starts a local server; open http://localhost:5180/ in your browser,
play for a while, and stop the server with Ctrl+C.
npm run dev
6. Build: npm run build empties source/dist/ and copies index.html,
css/, src/ and assets/ into it. dist/ is what you
publish; while the source is unchanged it is identical to game/.
npm run build
7. Publish: back up the game on your website, then upload the contents of dist/ in place of the
old files, keeping the folders. If you deleted or renamed a file, delete the old one on the server yourself.
Clear the cache afterwards.
npm test, means Node.js is too old. If PowerShell
blocks npm.ps1, use Command Prompt or run npm.cmd.
12 Updating and clearing the cache
Clearing the cache without losing progress
Progress is stored in this browser, not on the server. Clearing cached images and files, or doing a hard reload, keeps your progress.
Computer: press Ctrl+F5 on Windows and Linux, or Cmd+Shift+R on macOS. Phone: in the browser settings, choose the option to clear cached images and files.
Do not choose cookies and site data, or clear site data, for the game's address. That deletes the local save.
13 Licences and credits
The game code, the artwork, the sound effects and the music are supplied under the license of the item you purchased.
Third-party parts, with their complete license texts in THIRD-PARTY-LICENSES/: the Fredoka,
Nunito and Rubik fonts (SIL Open Font License 1.1, also in assets/fonts/). The project has no
other third-party library.
14 Common problems
-
Blank page or a game that never opens: the game was opened from the disk or a file is missing. Use a web
host and keep every file and folder of
game/next toindex.html. - No sound: browsers start audio only after the first tap or click (the start button does this). Check both volumes in the Sound panel and the volume of the device.
-
A level does not finish: look for an open pipe end (a leak shows drops of water) and, in Mill Creek, for a
waterwheel the water does not reach. If you changed the generator, run
npm testto find the level that cannot be solved. -
The game feels slow on an old phone: turn on Less motion in Settings, or lower
particlesMaxandparticlesMobileMaxinsrc/config.js. - The old version still appears after an update: clear the cache (see the section above). Two copies on the same domain share their saved games: give each copy its own save key.
15 FAQ
Does the game need a database or a server language?
Does it use a game engine or a library?
src/game/ and src/render/.
Can I change the levels?
buildSpec() or the seeds in
src/game/generator.js (see the Customization Guide) and run npm test, which
checks that every level can be solved at par.
Does it work on phones?
Does it have ads, accounts or an online ranking?
16 Support
Questions or problems: write to willian@polargames.com.br with your purchase code, the browser
and a short description or screenshot.
Support request
When you write to support, include the browser and device, the game version, the page address, the steps that caused the problem, a screenshot and the first error shown in the browser console. Never send passwords, payment details or secret keys.