Polar Games

A rope cutting puzzle game for the web · 1.0.0

Snipfin

This guide explains how to install, play, customize and update the game. Pick your language at the top; screenshots stay in English.

Version 1.0.0 Edition Standalone buyer edition

This guide works without internet. Images, styles and scripts are already inside this file.

Contents
  1. Overview
  2. Installing on your website
  3. Requirements
  4. How to play
  5. Screens
  6. Files and folders
  7. Internal names in the code
  8. Customizing
  9. Languages
  10. Saving and resetting
  11. Development (optional)
  12. Updating and clearing the cache
  13. Licences and credits
  14. Common problems
  15. FAQ
  16. Support

1 Overview

Snipfin is a complete HTML5 rope cutting puzzle game. A dumpling hangs from one or more ropes. The player swipes a finger or the mouse across a rope to cut it, collects up to 3 stars on the way down and drops the dumpling into the mouth of a koi.

It has 60 levels in 4 worlds of 15 levels: Moon Pond, Bamboo Falls, Lantern Harbor and Frost Lake. Each world brings new things: bubbles, urchins, lotus flowers, pegs that slide on a rail, whirlpools, elastic ropes, lily pads and a moon that flips gravity. A world opens when you have enough stars.

The physics is original code written for this game, with no engine and no library. Around it: a world map, level select with stars, pause, a retry that rewinds the level, hints for players who get stuck, sound effects and music, vibration, 14 interface languages and layouts for phone, tablet and desktop, in portrait and landscape.

2 Installing on your website

Installing takes a few minutes if you have FTP access or a file manager in your hosting panel.

  1. 1. Extract snipfin-static-1.0.0.zip on your computer.
  2. 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/snipfin/.
  3. 3. Upload only the contents of the game/ folder, so that index.html sits directly inside the target folder.
  4. 4. Keep assets/, src/ and data/ beside index.html, with names and letter case unchanged.
  5. 5. Open https://your-domain.example/games/snipfin/ in a modern browser.
Warning Do not upload the 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.html directly 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 10 MB of space on the server. The game makes no request to other websites: fonts, pictures, sounds and level data 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

Swipe a finger or the mouse across a rope to cut it. The dumpling falls (or swings), collects the stars it touches and must reach the mouth of the koi. The koi also swims a little to the side to catch a dumpling that falls close. Falling into the water or touching an urchin loses the level.

Tap a bubble to pop it, tap a lotus flower to make it puff and tap the moon to flip gravity. A swipe that cuts two ropes at once shows Double! Every level gives 0 to 3 stars, and finishing it opens the next one even without stars.

Buttons during a level: Pause (Escape on a keyboard) opens Resume, Restart and Levels. Restart, and Retry after a loss, rewind the level. Players who fail the same level twice see a ring that closes on the next cut at the right moment, and a new player who waits on the title screen sees a hand showing the swipe.

On the title screen, cutting the rope starts the game (Enter or Space also cut it). Progress is saved automatically after every level, so the player can close the page and come back later.

5 Screens

Title screen: the dumpling hangs from a rope under the logo. Cut it to start. Sound and Settings stay in the
top corner of every screen.
Title screen: the dumpling hangs from a rope under the logo. Cut it to start. Sound and Settings stay in the top corner of every screen.

Marks on the screenshot

  1. Logo
  2. Start prompt
  3. Sound: effects and music volume
  4. Settings
World map: four worlds in glass bubbles. A locked world shows how many stars it needs. The star counter at the
top is your total.
World map: four worlds in glass bubbles. A locked world shows how many stars it needs. The star counter at the top is your total.

Marks on the screenshot

  1. Back
  2. Total stars
  3. Open world
  4. Locked world
Level select: 15 levels per world, each with 0 to 3 stars. The next level to play glows.
Level select: 15 levels per world, each with 0 to 3 stars. The next level to play glows.

Marks on the screenshot

  1. World name
  2. Levels
  3. Next level
  4. Total stars
  5. Back
A level with a bubble and an urchin. Pause, Restart, your stars and the level number are on the side.
A level with a bubble and an urchin. Pause, Restart, your stars and the level number are on the side.

Marks on the screenshot

  1. Pause
  2. Restart
  3. Stars collected
  4. Level number
Bamboo Falls: a lotus flower puffs the dumpling to the side when you tap it.
Bamboo Falls: a lotus flower puffs the dumpling to the side when you tap it.
A peg that slides on a rail: the rope moves with it.
A peg that slides on a rail: the rope moves with it.
Lantern Harbor: whirlpools come in pairs. The dumpling goes into one and comes out of the other.
Lantern Harbor: whirlpools come in pairs. The dumpling goes into one and comes out of the other.
An elastic rope (pink) stretches and bounces back.
An elastic rope (pink) stretches and bounces back.
Frost Lake: a lily pad is a trampoline.
Frost Lake: a lily pad is a trampoline.
The moon button flips gravity when you tap it.
The moon button flips gravity when you tap it.
Level complete: stars, a rating, then Levels, Retry and Next.
Level complete: stars, a rating, then Levels, Retry and Next.

Marks on the screenshot

  1. Result
  2. Stars collected
  3. Level select
  4. Retry
  5. Next level
Settings: vibration, reduced motion, full screen, language and How to play.
Settings: vibration, reduced motion, full screen, language and How to play.

Marks on the screenshot

  1. Vibration
  2. Reduced motion
  3. Full screen
  4. Language
  5. How to play
  6. Close
A phone in portrait: the level fills the screen, with the buttons above it.
A phone in portrait: the level fills the screen, with the buttons above it.

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 command. The code is plain JavaScript ES modules with no compile step and no npm dependency.

game/                        upload these contents to your web host
  index.html                 the page: every screen and panel
  style.css                  layout and look
  data/levels.json           the 60 levels
  src/config.js              START HERE: physics, game feel, worlds, volumes
  src/rules.js               the rules and the physics
  src/main.js                screen flow, loop, input, saving, reactions
  src/ui.js                  screens, panels, world map, level grid
  src/render.js              draws the level
  src/koi.js                 the koi
  src/fx.js                  shake, particles, flying stars
  src/juice/                 scenery, water effects, hints, retry rewind, bubble transition
  src/audio/                 sound effects and music
  src/lib/                   languages, fullscreen, 9-piece panels
  src/lib/locales/           interface texts, one file per language
  assets/img/                backgrounds and objects (WebP)
  assets/ui/                 interface art (WebP)
  assets/fx/                 koi parts, rope textures, particles (WebP)
  assets/sfx/, assets/music/ sound effects and music (MP3)
  assets/fonts/              Fredoka, Nunito and their licenses
  assets/icon-192.png        page icon
  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 (141 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 and Nunito licenses
  • src/config.js: the first file to edit. PHYS (physics and difficulty), FEEL (every animation and game-feel number), WORLDS (the text key of each world, the stars needed to open it, its music and water color) and AUDIO (volumes).
  • data/levels.json: the 60 levels. src/rules.js: the rules and the physics, with no interface code.
  • src/main.js: screen flow, the 60 Hz loop, drag input, saving and the reaction to each event. src/ui.js: screens, panels, world map, level grid and settings. src/render.js: draws the level. src/koi.js: the koi.
  • src/fx.js and src/juice/: shake, particles, scenery, water effects, hints, the retry rewind and the bubble transition. src/audio/: sound effects and music.
  • index.html: every screen and panel. style.css: layout and look. src/lib/: languages, fullscreen and the 9-piece panels. src/lib/locales/: one text file per language.
  • assets/img/: backgrounds and objects. assets/ui/: interface art. assets/fx/: koi parts, rope textures and particles. assets/sfx/ and assets/music/: sounds in MP3. assets/fonts/: fonts with 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 dumpling is candy, the urchin is a burr (also spikes in the level data), the lotus flower is a puff, the whirlpools are portals, the lily pad is a pad and the moon button is a moon.
  • In a level, a is where a rope is tied, mouth is where the koi waits and sol is the stored solution used by the tests and by the hint ring.
  • Sounds are named by what happens: cut, star, bite, bubble-pop, victory and so on. The files are assets/sfx/<name>-1.mp3, -2.mp3.
  • Level ids are world and number: 2-6 is the sixth level of the second world. The save keeps stars by id.
  • The game has no debug switches and no test hooks: what players see is the whole game.

8 Customizing

Note Not a programmer? The Customization Guide shows the most common changes step by step. Open CUSTOMIZATION.html in the main folder of the download, or documentation/customization.html.

Customizing

Brand: the name in the browser tab is the <title> line of index.html. The logo is assets/img/logo.webp (with a transparent background) and the page icon is assets/icon-192.png. The words under the logo come from the subtitle text of each language file.

Pictures: replace a file in assets/ with another WebP of the same name and a similar size. The 4 world backgrounds are assets/img/bg-portrait.webp, bg-landscape.webp and the same with bg2, bg3 and bg4.

Levels: data/levels.json. Each level lists the candy, the ropes, the stars, the mouth and the obstacles. Run npm test after every change: it replays the stored solution (sol) of every level and tells you which level no longer wins with 3 stars.

Difficulty and feel: PHYS in src/config.js has the physics and how helpful the game is (koiReach, mouthR, cutNear). FEEL has every animation and hint number.

Sounds and music

Every effect is an MP3 in assets/sfx/, named with its id and a number, for example cut-1.mp3. Frequent sounds have two versions and the game alternates them. Replace a file keeping its name. The music is assets/music/menu.mp3 and world1.mp3 to world4.mp3.

To add a version, put the file in the folder and raise its number in SFX_FILES in src/audio/sfx-files.js. The volume of each sound is in AUDIO.gains in src/config.js.

Warning Save keys: the progress is saved under snipfin.template.save.v1 and the language under snipfin.template.lang.v1. If you host more than one copy of the game on the same domain, change them in src/config.js and src/lib/i18n.js, otherwise the copies share progress and language.

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/locales.js and add its code to LANGS and its name to LANG_NAMES.

To open the game in a given language, add ?lang=pt (or another code) to the address. Russian uses the included Nunito font and Fredoka covers the Latin alphabets. Japanese, Korean and Chinese use the fonts of the device.

10 Saving and resetting

  • Stars, unlocked levels and worlds, settings, volumes and language are saved automatically in the browser of each player (localStorage). Nothing is sent to a server.
  • The progress is stored under the key below. The language is stored under snipfin.template.lang.v1.
  • To start over, delete these keys in the developer tools (F12), under Application, Local Storage, or clear the site data in the browser.
snipfin.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 141 checks on the 60 levels, the game elements, 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, style.css, src/, data/ 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.

Note Troubleshooting: ENOENT or a missing package.json means the terminal is in the wrong folder. EBADENGINE, or the Node.js message printed before 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 and Nunito 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 to index.html.
  • No sound: browsers start audio only after the first tap or click (cutting the rope on the title screen does this). Check both volumes in the Sound panel and the volume of the device.
  • A blank page after you edit data/levels.json: a typo made the file invalid JSON. Validate the JSON and run npm test before publishing.
  • The game feels slow on an old phone: it lowers its own quality after a moment. Turn on Reduced motion in Settings to make it lighter.
  • The old version still appears after an update: clear the cache (see the section above). Two copies share their saved games: give each copy its own save keys.

15 FAQ

Does the game need a database or a server language?
No. It is a static website: HTML, CSS, JavaScript, pictures and sounds. The level data is a JSON file next to the game.
Does it use a physics engine or a library?
No. The ropes, the elements and the koi catch are original code written for this game, in src/rules.js, and the tests replay every level.
Can I make my own levels?
Yes. Edit or add levels in data/levels.json (see the Customization Guide) and run npm test. A level also needs a stored solution (sol): the tests and the hint ring use it.
Does it work on phones?
Yes, in portrait and landscape, with touch and drag. It also works with a mouse on desktop.
Does it have ads, accounts or an online ranking?
No. There is no ad, account, payment or online service in this edition: progress stays in the browser of the player.

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.