Polar Penguin Solitaire: Customization Guide

Step-by-step changes for people who do not program. Every file named here is in the game/ folder (and the same file in source/).

1. Before you start

  1. Make a backup copy of the whole game/ folder.
  2. Use a plain text editor: Visual Studio Code (free) or Notepad++ (free, Windows). Never edit the files in a word processor.
  3. To preview your changes, the game must run from a web address, not from the disk. The simplest way: install Node.js 22 LTS or newer, open the source/ folder in a terminal and run npm run dev, then open http://localhost:5285/. Edit the files in source/ and reload the page.
  4. Images: any editor that saves WebP works, for example GIMP or Krita (free).

After every change, reload the page. If the game shows a blank screen, the last edit broke the syntax: undo it (Ctrl+Z) and check commas and quotes.

2. Replace pictures

Replace a file in assets/ with another WebP of the same name and the same size in pixels. Buttons and panels are stretched in nine pieces, so keep their borders where they are.

The Klondike table
WhatWhere
Logoassets/logo.webp
Table backgroundassets/bg-p.webp (portrait) and assets/bg-l.webp (landscape)
Card backsassets/backs/b0.webp (the default) to b5.webp, and spider.webp (the Spider back)
Card facesassets/cards/: the blank card, the rank letters r*.webp and the suits s0.webp to s3.webp
Court cards (king, queens, jack)assets/courts/k.webp, qr.webp (red suits), qp.webp (black suits), j.webp
Victory confettiassets/fx/c0.webp to c3.webp
Buttons, panels and iconsassets/ui/

3. The mascot

The mascot (an emperor penguin in a knitted beanie and scarf) has 24 poses plus the victory pose in assets/duke/; duke is simply the internal name of the mascot in the code. All the poses share one canvas of 668 x 534 pixels with the feet on the same line, so the mascot never jumps when it changes pose.

  1. Draw each new pose on a transparent canvas of 668 x 534 pixels, feet about 14 pixels above the bottom edge.
  2. Save it with the same name as the old pose (for example idle.webp, cheer.webp).
  3. If your mascot is much wider or taller, update bird in src/theme.js: the canvas size, the left and right edge of the widest pose (0 to 1) and the top of the tallest pose. The game uses these numbers to keep the mascot clear of the cards and buttons.

4. Colors and fonts

The colors of the letters, outlines and glows are in css/base.css and css/screens.css. Each button style sets its letter outline with --o next to its picture, for example .pill.green { ... --o: #2f8f05; }. Change the hexadecimal color and reload.

The fonts are at the top of css/base.css (@font-face and --font). Fredoka and Nunito are included; Japanese, Korean and Chinese use the fonts of the device.

5. Change the pace and the effects

Every number of the game feel sits in a FEEL block at the top of a file:

FileWhat it sets
src/juice.jsCard landings, sparks, points flying to the score, combos
src/hintfx.jsThe light of the hint and how long it shows
src/fx.jsVibration and the win ceremony
src/layout.jsCard sizes and how far apart the cards of a column are
src/audio.jsVolumes of effects and music, and which take of each sound plays

Times are in milliseconds (1000 = one second). Change a little at a time and test.

6. Games and rules

The menu with the three games The settings panel

7. Change texts and languages

Each language is one file in src/locales/ (en.js, pt.js, ...), and all of them use the same keys. Change the text between the quotes and keep the marks such as {n}.

The game name in the page title is in index.html and in src/theme.js.

8. Sounds and music

Sound effects are MP3 files in assets/audio/ named <sound>-a.mp3 (for example place-a.mp3); the list is FEEL.version in src/audio.js. The music is assets/audio/music.mp3, a seamless loop. Replace a file keeping its name.

9. Save key and publishing

Progress is saved in the browser with the key in store in src/theme.js. If you host two copies of the game on the same domain, give each one its own key.

  1. In source/, run npm test and then npm run build.
  2. Upload the contents of dist/ to your host, replacing the old files.
  3. Open the game and reload once without cache (Ctrl+F5) to see the new version.

Support: willian@polargames.com.br