Contents
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. Extract
purr-pal-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/purr-pal/. -
3. Upload only the contents of the
game/folder, so thatindex.htmlsits directly inside the target folder. -
4. Keep
assets/andsrc/besideindex.html, with names and letter case unchanged. -
5. Open
https://your-domain.example/games/purr-pal/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 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
Marks on the screenshot
- Logo
- Start button
Marks on the screenshot
- Level and experience
- Coins
- Gauges: food, bath, sleep, fun, love
- Sound: music and effects volume
- Settings
- Tray of the room
- The four rooms
Marks on the screenshot
- Sponge, shower and towel
Marks on the screenshot
- Lamp: sleep and wake up
- Wardrobe
Marks on the screenshot
- Ball of yarn
- Mini-games
- Next page
Marks on the screenshot
- Pause
- Time and points
Marks on the screenshot
- Stars
- Coins won
- Play again
- Home
Marks on the screenshot
- Preview
- Your coins
- Clothes, prices and locks
Marks on the screenshot
- Vibration
- Less motion
- Language
- Full screen
- How to play
Marks on the screenshot
- Music
- Effects
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.FEELholds 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) andFEEL.audiothe volumes.ROOMSlists 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) andHATS(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.jsandsrc/minis/: the 6 mini-games (air.js,chef.js,tricks.js, and catcher, bubbles and memory inminigames.js).src/ui.jsandsrc/panels.js: the HUD, the trays and the panels. -
index.html: the page.src/styles.cssandsrc/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 (-pportrait,-llandscape,-xlultrawide).assets/pet/: the pieces and poses of the kitten withrig.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:
airis Catch in the air,chefis Pet chef,tricksis Rhythm tricks,catcheris Treat catcher,bubblesis Bubble pop andmemoryis Memory. -
Clothes are
HATSin the code, even the scarf and the glasses. The gauges areneeds.food,needs.bath,needs.sleep,needs.funandlove. -
The music tracks are
casa.mp3(the house),ninar.mp3(sleeping),brincar.mp3(mini-games) andritmo.mp3(Rhythm tricks). -
The pictures of a room are
assets/bg/<room>-p.webp,-l.webpand-xl.webp;stage,chefandbubblesare 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.
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.
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 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 blank page after you edit a file: a typo made the file invalid JavaScript. Run
npm testand 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?
Does it use a game engine or a library?
Can I add foods or clothes?
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?
Does it have ads, accounts or payments?
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.