Christmas Globe: Customization Guide

The most common changes, step by step, for people who do not program.

Back to the main guide

1. Before you start

2. See your changes on your computer

Open a terminal in the source/ folder and run npm run dev, then open http://localhost:5180/ in the browser. After each change, reload the page. Node.js 26.13.0 or newer is needed for this command (see the Development section of the main guide). Opening index.html directly from the disk does not work.

npm run dev

3. Name and logo

3. Name and logo
  1. Open src/config.js and change GAME_TITLE, GAME_SUB (leave it empty if you do not want a subtitle) and GAME_DESC.
  2. Open index.html and write the same name in <title> and in the alt of the two logos, and the same description in the description line. Write & as &amp;.
  3. Replace assets/ui/logo.webp (900 x 571 pixels, transparent background), assets/icons/favicon.png (64 x 64) and assets/icons/app-icon.png (180 x 180).

4. Make your own theme: the pictures

Keep each file name and size, and keep the drawing in the same place inside the picture. Always use WebP. Start with the items and the backgrounds: they change the look the most.

Files in assets/ Size and what to keep in place
xmas/ (the 16 items and rainbow.webp) 448 x 448, transparent. A round shape without a face, centered, filling almost the whole picture: the game adds the face. Use clearly different colors and shapes.
xmas/mystery.webp 320 x 320, transparent. A centered ball with a question mark.
bg/*-portrait.webp, bg/*-landscape.webp, bg/*-wide.webp 1024 x 1536, 1536 x 1024 and 2826 x 768. Files starting with bg are world 1; w2, w3 and w4 are the other worlds. Keep the sky calm behind the globe and the details low. In the wide picture, the landscape background is exactly in the middle.
mascot/*.webp 360 x 458, transparent. Use the same character size in every pose and put the lowest part of the feet at about pixel 450 from the top, so it stands on ui/branch.webp (600 x 208).
ui/ice.webp, ui/ice-badge.webp, ui/vine.webp, ui/vine-knot.webp, ui/hint-ring.webp 448 x 442, 160 x 160, 479 x 479, 263 x 263 and 256 x 256, transparent. They are drawn over the items: keep the center empty or see-through, as in the original.
ui/panel.webp, ui/tray.webp, ui/btn-big.webp, ui/pill.webp, ui/hud-pill.webp Frames and buttons cut into 9 pieces. Keep the size and the corners; recoloring the original file is the safest way. The cuts are the border-image values in css/.

Also replace the pictures of How to play and of the rules: ui/how-1.webp, ui/how-2.webp, ui/how-3.webp, ui/rule-ice.webp, ui/rule-vine.webp and ui/rule-wild.webp.

5. Texts and languages

5. Texts and languages

Every text is in src/locales/, one file per language. Change only the text on the right of each line. Keep the key on the left, the quotes and what is inside braces, such as {n}.

6. The items: names, colors and faces

6. The items: names, colors and faces

The items are in the FRUITS list, in src/config.js. id is the file name of the picture, body and dark are its colors, and bits are the colors and the shape of the pieces that fly on a match. Keep 16 items in the same order, because the levels use their position in the list. The last 4 only appear from world 2 on.

{
  id: 'name-of-the-picture',
  body: '#ffa62b', // main color
  dark: '#e46f12', // shadow color
  bits: [['#ffb43d', '#ffd36b'], 'wedge'], // colors and shape of the pieces
  persona: { blink: 1, idle: 'happy' }, // how the face behaves
},

If you change an id, also rename its touch sound: assets/sfx/f-<id>-1.mp3, and its name in src/audio/sfx-files.js. The face of each item is set by FACE_Y (height) and FACE_W (width) in src/render/face.js, in the same order: 0 is the center, and a bigger FACE_Y moves the face down.

7. Sounds and music

Replace an MP3 file and keep its name. Some of the files in assets/:

File When it plays
sfx/pegar-1.mp3, sfx/pousar-1.mp3 An item is picked, and lands in the tray
sfx/trinca-1.mp3, sfx/perfeito-1.mp3 A match, and a perfect match
sfx/ice-crack-1.mp3, sfx/vine-snap-1.mp3, sfx/rainbow-1.mp3 The special rules of worlds 2, 3 and 4
sfx/vitoria-1.mp3, sfx/derrota-1.mp3 The level is won, or lost
music/m-menu.mp3 Music of the start screen, the menu and the level select
music/m-w1.mp3 to music/m-w4.mp3 Music of each world

8. Difficulty

8. Difficulty

Open src/config.js and change these values:

export const HELPERS = { undo: 3, hint: 3, shuffle: 2 };
export const PLUS_TIME = 30;
Value What it changes
HELPERS How many times Undo, Hint and Shuffle can be used in each level
PLUS_TIME Extra seconds offered when the time runs out
timeBase, timePerFruit The time of each level: a fixed part, plus some seconds for each item
OUTFITS Stars needed for each outfit. The picture of an outfit is idle-<id>.webp; also add it to POSES in src/ui/app.js

WORLD_PLAN, in the same file, sets the size, the number of item types, the shapes and the mystery items of each world. Keep 15 shapes per world. After a change, run npm test: it plays all the levels.

9. Publish your version

  1. In the source/ folder run npm test (every check must pass), then npm run build.
  2. Upload the contents of source/dist/ to your web host, in place of the old files.
  3. Clear the cache of the browser if you still see the old version (see the main guide).
  4. Questions: write to willian@polargames.com.br with your purchase code.
npm test
npm run build