Polar Games

A virtual pet care game for the web · 1.0.0

Purr Pal

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. The 6 mini-games
  6. Screens
  7. Files and folders
  8. Internal names in the code
  9. Customizing
  10. Languages
  11. Saving and resetting
  12. Development (optional)
  13. Updating and clearing the cache
  14. Licences and credits
  15. Common problems
  16. FAQ
  17. Support

1 Overview

Purr Pal is a complete HTML5 virtual pet game. The player looks after a kitten in four rooms: the Kitchen (food), the Bathroom (sponge, shower and towel), the Bedroom (the lamp puts the kitten to bed, and the wardrobe) and the Garden (a ball of yarn and the mini-games).

Five gauges show food, bath, sleep, fun and love. They go down slowly with time, also while the game is closed (up to 12 hours), and never below a floor, so the kitten is never punished. Caring gives experience: every level gives 25 coins and unlocks foods and clothes.

Around the care: 13 foods, 6 clothes to buy and wear, 6 mini-games that pay coins, a daily gift of 30 coins, a hand that teaches the first steps without text, petting, tickles and reactions with emotion balloons, music and sound effects, 14 interface languages, portrait and landscape on phone, tablet, desktop and ultrawide screens, and automatic save in the browser.

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 purr-pal-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/purr-pal/.
  3. 3. Upload only the contents of the game/ folder, so that index.html sits directly inside the target folder.
  4. 4. Keep assets/ and src/ beside index.html, with names and letter case unchanged.
  5. 5. Open https://your-domain.example/games/purr-pal/ 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 13 MB of space on the server. The game makes no request to other websites: the font, 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

Kitchen: drag a food from the tray to the mouth of the kitten, or just tap it and it flies there. A full kitten says no, and the cucumber only goes down when the kitten is hungry. Some foods cost coins or open at a higher level; the tray scrolls with its arrows.

Bathroom: rub the kitten with the sponge to make foam, rinse with the shower and dry with the towel. Bedroom: when the kitten is sleepy, the lamp puts it to bed; the lamp pulses while it sleeps and wakes it up. The other rooms open again after it wakes up.

Rub the kitten anywhere outside the bathroom to pet it (hearts and love). Tap its nose, an ear or its belly for a reaction. In the garden the ball of yarn makes it jump, and the tray opens the 6 mini-games.

Tap a gauge to see its percentage. The sound button (top right) opens the music and effects volume and the gear opens Settings. During a mini-game, Pause (top left) opens Resume, Restart and Home.

5 The 6 mini-games

  • Catch in the air (30 s): a toy mouse flies in an arc and a ring closes over the head of the kitten. Tap when the ring closes and it jumps for it.
  • Pet chef (60 s): the kitten asks for a dish in a speech balloon. Drag the right foods to the plate; a wrong food goes back to its place.
  • Rhythm tricks (36 s): trick icons travel along a track to the circle on the beat of the music. Tap when they reach the circle and the kitten does the trick.
  • Treat catcher (30 s): the kitten rides a cart that follows your finger. Catch the fish treats and avoid the wet socks.
  • Bubble pop (30 s): tap the bubbles before they float away. A gold bubble is worth 3 points.
  • Memory (60 s): 12 cards, 6 pairs. Each pair gives points.

The result gives 1 to 3 stars, 1 coin per point (up to 40), fun and experience. The first time each mini-game opens, a hand shows what to do.

6 Screens

Start screen: tap to start. The first visit of each day opens a gift with 30 coins.
Start screen: tap to start. The first visit of each day opens a gift with 30 coins.

Marks on the screenshot

  1. Logo
  2. Start button
The kitchen. At the top: level and experience, coins, the five gauges, sound and settings. On the side: the
food tray and the four rooms.
The kitchen. At the top: level and experience, coins, the five gauges, sound and settings. On the side: the food tray and the four rooms.

Marks on the screenshot

  1. Level and experience
  2. Coins
  3. Gauges: food, bath, sleep, fun, love
  4. Sound: music and effects volume
  5. Settings
  6. Tray of the room
  7. The four rooms
The bathroom: the sponge makes foam, then the shower rinses and the towel dries.
The bathroom: the sponge makes foam, then the shower rinses and the towel dries.

Marks on the screenshot

  1. Sponge, shower and towel
The bedroom: the lamp puts the kitten to bed and the wardrobe opens the clothes.
The bedroom: the lamp puts the kitten to bed and the wardrobe opens the clothes.

Marks on the screenshot

  1. Lamp: sleep and wake up
  2. Wardrobe
Sleeping: the room gets dark and the kitten snores. Tap the lamp to wake it up.
Sleeping: the room gets dark and the kitten snores. Tap the lamp to wake it up.
The garden: the ball of yarn and the mini-games, in pages with arrows.
The garden: the ball of yarn and the mini-games, in pages with arrows.

Marks on the screenshot

  1. Ball of yarn
  2. Mini-games
  3. Next page
Catch in the air. Every mini-game has Pause, the time left and the points at the top.
Catch in the air. Every mini-game has Pause, the time left and the points at the top.

Marks on the screenshot

  1. Pause
  2. Time and points
Pet chef: the dish the kitten wants is in the balloon.
Pet chef: the dish the kitten wants is in the balloon.
Rhythm tricks, on a little stage with its own music.
Rhythm tricks, on a little stage with its own music.
Treat catcher: the kitten in its cart.
Treat catcher: the kitten in its cart.
Bubble pop.
Bubble pop.
Memory: 6 pairs of cards.
Memory: 6 pairs of cards.
Result: stars, coins won and fun. Play again or go home.
Result: stars, coins won and fun. Play again or go home.

Marks on the screenshot

  1. Stars
  2. Coins won
  3. Play again
  4. Home
Wardrobe: buy a piece with coins, then tap it to wear it. A lock shows the level that opens it.
Wardrobe: buy a piece with coins, then tap it to wear it. A lock shows the level that opens it.

Marks on the screenshot

  1. Preview
  2. Your coins
  3. Clothes, prices and locks
Settings: vibration, less motion, language, full screen and How to play. Vibration and full screen appear
only where the browser supports them.
Settings: vibration, less motion, language, full screen and How to play. Vibration and full screen appear only where the browser supports them.

Marks on the screenshot

  1. Vibration
  2. Less motion
  3. Language
  4. Full screen
  5. How to play
Sound: music and effects volume.
Sound: music and effects volume.

Marks on the screenshot

  1. Music
  2. Effects
How to play: four pictures, no reading needed.
How to play: four pictures, no reading needed.
The kitchen on a phone in portrait.
The kitchen on a phone in portrait.
Bath time on a phone.
Bath time on a phone.
Pet chef on a phone.
Pet chef on a phone.

7 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 dependencies.

game/                        upload these contents to your web host
  index.html                 the page
  src/config.js              START HERE: game feel (FEEL), volumes, rooms
  src/rules.js               rules and balance (RULES), foods (FOODS), clothes (HATS)
  src/main.js                start-up, loop, touch, saving
  src/pet.js                 the kitten (pieces moved by springs)
  src/minigames.js, minis/   the 6 mini-games
  src/ui.js, panels.js       HUD, trays and panels
  src/styles.css, panels.css layout and look
  src/audio/audio.js         sound effects and music
  src/lib/locales/           interface texts, one file per language
  assets/bg/                 room backgrounds (portrait, landscape, ultrawide)
  assets/pet/                pieces and poses of the kitten, rig.json
  assets/items/, ui/, fx/    foods, clothes, tools, interface art, effects
  assets/audio/              sound effects and music (MP3)
  assets/fonts/              Nunito and its license
  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 (10 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/img/           the screenshots of the guide
DOCUMENTATION.html           shortcut to this guide
START-HERE.txt, CHANGELOG.txt
THIRD-PARTY-LICENSES/        Nunito license
  • src/config.js: the first file to edit. FEEL holds every animation and game-feel number (springs, blink, tail, shadow, how much each scrub, rinse and towel stroke counts, the tutorial, emotion balloons, foods per tray page) and FEEL.audio the volumes. ROOMS lists the rooms.
  • src/rules.js: the rules, with no drawing and no sound. RULES (how fast each gauge goes down, the floor, the daily gift, coins per level, mini-game rewards), FOODS (the 13 foods) and HATS (the 6 clothes).
  • src/main.js: start-up, the main loop, touch, saving and the reaction to each rule event. src/pet.js: the kitten, made of pieces moved by springs. src/moods.js, src/juice.js, src/fx.js, src/tutorial.js: reactions, effects, particles and the tutorial hand.
  • src/minigames.js and src/minis/: the 6 mini-games (air.js, chef.js, tricks.js, and catcher, bubbles and memory in minigames.js). src/ui.js and src/panels.js: the HUD, the trays and the panels.
  • index.html: the page. src/styles.css and src/panels.css: layout and look. src/lib/: languages, full screen and the panel frames. src/lib/locales/: one text file per language. src/audio/audio.js: sound effects and music.
  • assets/bg/: the room backgrounds (-p portrait, -l landscape, -xl ultrawide). assets/pet/: the pieces and poses of the kitten with rig.json. assets/items/, assets/ui/, assets/fx/: foods, clothes, tools, interface art and effects (WebP). assets/audio/: sounds and music (MP3). assets/fonts/: the Nunito font and its license.

8 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.

  • Mini-games: air is Catch in the air, chef is Pet chef, tricks is Rhythm tricks, catcher is Treat catcher, bubbles is Bubble pop and memory is Memory.
  • Clothes are HATS in the code, even the scarf and the glasses. The gauges are needs.food, needs.bath, needs.sleep, needs.fun and love.
  • The music tracks are casa.mp3 (the house), ninar.mp3 (sleeping), brincar.mp3 (mini-games) and ritmo.mp3 (Rhythm tricks).
  • The pictures of a room are assets/bg/<room>-p.webp, -l.webp and -xl.webp; stage, chef and bubbles are the backgrounds of three mini-games.
  • The game has no test links and no test hooks: what players see is the whole game.

9 Customizing

Brand: the name in the browser tab is the <title> line of index.html. The logo is assets/ui/logo.webp (900 x 627 pixels, transparent background).

Pictures: replace a file in assets/bg/, assets/items/ or assets/ui/ with another WebP of the same name and a similar size and shape. Backgrounds: 941 x 1672 (portrait), 1672 x 941 (landscape) and 2172 x 724 (ultrawide); the point where the kitten stands in each background is SPOT in src/main.js.

The kitten is a set of pieces (body, head, ears, eyes, mouth, tail, clothes and poses) placed by assets/pet/rig.json. Replacing it with another character means drawing every piece in the same positions, not just one file.

Texts: src/lib/locales/<code>.js. Game feel: FEEL in src/config.js. Rules and balance: RULES in src/rules.js. Mini-game times and difficulty: AIR in src/minis/air.js, CHEF in src/minis/chef.js, TRICKS in src/minis/tricks.js, and the time and best values in src/minigames.js (best is the score for 3 stars).

Prices of foods and clothes

Each food in FOODS (src/rules.js) has value (how much it fills), cost (coins, 0 is free), level (the level that opens it) and xp. Example: { id: 'cake', value: 18, cost: 8, level: 3, xp: 9, fun: 6 }.

Each piece in HATS has cost and level. Today: bow 30 coins, scarf 45, cap 60 (level 2), glasses 80 (level 3), party hat 120 (level 7) and crown 150 (level 5).

Coins come from the daily gift (RULES.gift, 30), each level (RULES.levelCoins, 25) and the mini-games (1 per point, up to RULES.miniCoinMax, 40). A new food or piece also needs its picture in assets/items/ and, for clothes, the pieces in assets/pet/.

Sounds and music

Every effect is an MP3 in assets/audio/, named with its id, for example chew.mp3. The list of effects is SFX in src/audio/audio.js. Replace a file keeping its name. The volume of each effect is in FEEL.audio.gains in src/config.js.

Music: casa.mp3, ninar.mp3, brincar.mp3 and ritmo.mp3. Rhythm tricks follow the beat of ritmo.mp3: if you replace it, set TRICKS.bpm (beats per minute) and TRICKS.offset (seconds to the first beat) in src/minis/tricks.js to the new song.

Warning Save keys: the game is saved under purr-pal.template:save (KEY in src/main.js) and the settings under purr-pal.template:prefs (src/ui.js). If you host more than one copy of the game on the same domain, change both keys in each copy.

10 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. A link can also open a language, for example index.html?lang=de.

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, and add it to STRINGS and LANG_NAMES in src/lib/i18n.js.

The texts use the Nunito font (Latin and Cyrillic), included. Japanese, Korean and Chinese use the fonts of the device.

11 Saving and resetting

  • The gauges, level, coins, clothes, settings, volumes and language are saved automatically in the browser of each player (localStorage). Nothing is sent to a server.
  • The game is saved every few seconds and when the page is hidden. The time away is added when the game opens again, up to 12 hours.
  • To start over, delete these keys in the developer tools (F12), under Application, Local Storage, or clear the site data in the browser.
purr-pal.template:save
purr-pal.template:prefs

12 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 10 checks on the rules, 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, 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.

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.

13 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.

14 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 part, with its complete license text in THIRD-PARTY-LICENSES/: the Nunito font (SIL Open Font License 1.1, also assets/fonts/OFL.txt). The project has no other third-party library.

15 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 (the start button does this). Check both volumes in the Sound panel and the volume of the device.
  • A blank page after you edit a file: a typo made the file invalid JavaScript. Run npm test and open the browser console (F12) to see the file and line.
  • The game feels slow on an old phone: turn on Less motion in Settings to reduce the effects.
  • 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 keys.

16 FAQ

Does the game need a database or a server language?
No. It is a static website: HTML, CSS, JavaScript, pictures and sounds.
Does it use a game engine or a library?
No. The kitten, the rooms and the mini-games are original code written for this game on a plain HTML canvas, with the interface in HTML and CSS.
Can I add foods or clothes?
Yes. Add an entry to FOODS or HATS in src/rules.js with its picture in assets/items/. A piece of clothing also needs its pieces on the kitten in assets/pet/ and in rig.json.
Does it work on phones?
Yes, in portrait and landscape, with touch. It also works with a mouse on desktop.
Does it have ads, accounts or payments?
No. There is no ad, account, payment or online service in this edition: coins are earned in the game and the progress stays in the browser of the player.

17 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.