1. Before you start
- Make a copy of the whole download. If something goes wrong, you can go back to it.
- Install a free code editor such as Visual Studio Code (or Notepad++ on Windows). For pictures, the free GIMP or Krita open and export WebP files. For sounds, the free Audacity exports MP3.
-
Work inside
source/. To see your changes, open a terminal in that folder and runnpm run dev, then openhttp://localhost:5180/. The game does not run by double-clickingindex.html, because browsers block JavaScript modules onfile://. -
No terminal? Edit the files of
game/directly, upload them to your host and reload the page.
2. Your brand: name, logo and icon
- The name in the browser tab is the
<title>line ofindex.html. -
The logo is
assets/logo.webp(860 x 430 pixels, transparent background). To use your own, save it at the same size with a transparent background. -
The page icon is
assets/favicon.webp, in the line ofindex.htmlthat starts with<link rel="icon". -
The menu picture is made of three layers:
assets/menu-kitchen.webp(the kitchen and the bowl),menu-apple-peel.webp(the apple peel that moves) andmenu-foreground.webp(the orange in front).
3. Colors and the look
The look of the buttons, panels and the order card is in src/peel-pass.css. Its main colors are
at the top of the file. Change a color, save and reload the page:
:root {
--paper: #fbfcff; /* panels */
--ink: #172151; /* text */
--blue: #294fc1; /* blue buttons and titles */
--blue-deep: #183277; /* dark blue edges */
--orange: #f87517; /* orange action buttons */
}
The colors of each ingredient (skin, flesh and details) are numbers in src/produce.js and
src/garden-produce.js; the pictures in assets/materials/ give some of them a real
skin.
4. Replace pictures (reskin)
Replace a file with another of the same name and the same size. Nothing else needs to change.
| On screen | File |
|---|---|
| The menu picture |
assets/menu-kitchen.webp (1671 x 941), menu-apple-peel.webp and
menu-foreground.webp
|
| The blue bistro, on wide and on upright screens |
assets/kitchen-wide-vaso.webp and assets/kitchen-portrait.webp, and the pictures
of each day in assets/shifts/
|
| The garden and market kitchens |
assets/horta/horta-amplo.webp and horta-retrato.webp,
assets/mercado/cozinha-ampla.webp and cozinha-retrato.webp (1672 x 941 and 941 x
1672)
|
| The chef of the story panels |
assets/horta/nico.webp, assets/mercado/nico.webp and
nico-servico.webp (transparent background), and assets/bench/nico-map.webp on
the map
|
| The pictures of the Kitchen Tour | assets/tour/*.webp (480 x 270), one for each day |
| The small food icons | assets/bench/<material>.webp (128 x 128), for example potato.webp |
| The skin of the 3D food |
assets/materials/<material>.webp (640 x 640). The potato and the apple also have a
-flesh picture for the inside.
|
| Order card, buttons and icons | assets/hud/*.webp |
| The pictures of the Tool Shop |
assets/upgrades/*.webp, and the special tools in assets/horta/ and
assets/mercado/
|
| The gesture videos of the shop | assets/gestos/<tool>-cozinha-mercado.mp4 (short MP4 videos without sound) |
| The opening of the campaign | assets/horta/abertura-suave.webp (1672 x 941) |
5. The campaign
Open src/campaign.js. DAYS has one line for each day: name is the key
of its title, orders the ingredients of its orders (their position in the list of
src/produce.js, starting at 0), kitchen is garden or
market (the blue bistro when it is missing) and loan the tool lent on that day.
Tokens: orderTokens (10) is paid for each order and dayBonus (10) for each finished
day. Run npm test after a change: one check counts the days and the orders and must be updated if
you add a day.
6. The Tool Shop
Open src/tuning.js. UPGRADES has the blades and tools and
ACCESSORIES the turntable, the mat and the support. cost is the price in tokens and
unlockDay the number of finished days needed to buy it.
Inside each tool, width is the width of the cut and multiplier how fast it peels.
Change one number at a time, in small steps, then run npm test and play an order.
7. Difficulty and game feel
Open src/tuning.js. The most useful numbers:
| Setting | What it does |
|---|---|
FEEL.slow and FEEL.fast |
The stroke speeds, in pixels per second, between which the cut goes from slow to fast (65 and 1150). |
FEEL.grabRadius and FEEL.touchGrabRadius |
How close to the handle a click (0.125) or a touch (0.19) picks up the peeler. |
FEEL.ribbon.desktop and FEEL.ribbon.mobile |
How many peel ribbons can stay on the board at once, on a computer (19) and on a touch screen (12). |
FEEL.lastAt |
From what part of the skin removed (0.95) the game starts to help with the last patches. |
FEEL.finish |
The burst when a food is finished: number of pieces (12) and duration in milliseconds (730). |
FEEL.audio |
The sound mix: baseGain (0.7) is the volume of the effects and
ambienceGain (0.16) the music.
|
FEEL.vibrate |
The vibration patterns, in milliseconds, for the cut, the tear, a falling peel, passing the board and finishing a food. |
8. Texts and languages
-
Most texts are in the files of
src/that end in-text.js. Each language has one line, with the texts separated by|, in the order of the list at the top of the file. Change the words between two|and keep the same number of|. - The first visit uses the language of the browser; the player changes it in Settings, under Language, and the choice is saved.
-
The texts of the main screens are in
src/peel-locale.js(English and Portuguese) andsrc/peel-translations.js(the other languages). The list of languages shown in Settings islanguagesat the top ofsrc/peel-locale.js.
9. Sounds and music
The recorded peeling sounds are MP3 files in assets/audio/. Replace a file and keep its name.
| Files | When they play |
|---|---|
dry.mp3 |
Dry skins such as carrot and potato. |
smooth.mp3 |
Smooth skins such as apple. |
wet.mp3 and tangerine.mp3 |
Citrus peels. |
paper.mp3 |
Papery skins such as onion. |
metal.mp3 |
The blade touching the food, and picking up or setting down a tool. |
board.mp3 |
The cutting board sliding away when you pass it. |
The music is assets/audio/bistro-loop.mp3. The list of the recorded sounds is
names at the top of src/foley.js:
const names = ['dry', 'smooth', 'wet', 'paper', 'metal', 'board', 'tangerine'];
10. Save keys and starting over
The progress stays in the browser of each player, under the keys peel-and-pass.save.v1,
peel-and-pass.shop.v1 and peel-and-pass.cut.v1. If you host two copies of the game
on the same domain, change these names in src/records.js and src/upgrades.js of one
of them.
To start over, delete these keys in the developer tools (F12), under Application, Local Storage, or clear the site data of the browser.
11. Publish your version
-
In
source/, runnpm testandnpm run build. This writessource/dist/. -
Back up the game on your website, then upload the contents of
dist/in place of the old files. -
Keep the folders as they are. If you added a new file or folder next to
index.html, add its name toPARTSinsource/tools/build.mjs. - Clear the browser cache to see the new version (see the buyer guide).
Support: willian@polargames.com.br