Contents
1 Overview
Slice Parade is a complete HTML5 cake sorting puzzle. Plates with cake slices wait on a tray; the player drags each plate to an empty spot on a table of 4 x 5 spots. Slices of the same flavor jump between plates that touch (up, down, left and right), and six slices of one flavor make a whole cake, which leaves the table and scores points.
There are 50 levels in 5 worlds of 10: Seaside Terrace, Beach Boardwalk, Garden Party, Old Town Square and Mountain Lake, each with its own background. A level is won when the score reaches its goal and lost when no empty spot is left. The levels start with 2 flavors and reach 8; glass domes close some spots from level 15, and from level 21 some plates are already on the table at the start.
Three helpers come with the levels: the hammer removes a plate from the table, swap brings 3 new plates to the tray and move takes a plate to another empty spot. A red panda baker reacts to the game. The game has sound effects and two music loops, vibration on phones, a reduced motion option, full screen, 14 interface languages and layouts for phone, tablet and desktop. Progress is saved 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
slice-parade-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/slice-parade/. -
3. Upload only the contents of the
game/folder, so thatindex.htmlsits directly inside the target folder. -
4. Keep
assets/,css/,fonts/andsrc/besideindex.html, with names and letter case unchanged. - 5. Open
https://your-domain.example/games/slice-parade/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. The game uses HTML, CSS and 2D canvas and needs no WebGL.
-
About 6 MB of space on the server. The game makes no request to other websites: the fonts, 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
Play: drag a plate from the tray to an empty spot on the table and let go. While you drag, the plate floats a little above the finger, so the finger does not hide it. On a computer the mouse works the same way.
When the plate lands, slices of the same flavor jump between it and the plates that touch it. Six slices of one flavor make a cake: it leaves the table and adds points to the bar at the top. Several cakes in one move are a combo and give more points. When the three plates of the tray are used, three new ones arrive.
Helpers: tap the hammer and then a plate to remove it; tap swap to get three new plates on the tray; tap move, then a plate, then an empty spot. The number on each helper is how many are left in the level. A short line explains each helper the first time it appears.
The pause button at the top left opens Resume, Restart, Levels and How to play. Escape closes the open panel. Sound and Settings stay at the top right on every screen. Progress, the unlocked levels and the settings are saved automatically.
5 Screens
Marks on the screenshot
- Play: the next level
- Levels
- How to play
- Sound: music and effects volume
- Settings
Marks on the screenshot
- Back to the menu
- World and its name
- Next world
Marks on the screenshot
- Level and goal bar
- Pause
- Hammer
- Swap
- Move
Marks on the screenshot
- Next level
- Replay
- Level list
Marks on the screenshot
- Try again
- Level list
Marks on the screenshot
- Resume
- Restart
- Level list
- How to play
Marks on the screenshot
- Vibration
- Reduce motion
- Full screen
- Language
Marks on the screenshot
- Music volume
- Effects volume
6 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 dependency.
game/ upload these contents to your web host
index.html every screen and panel
src/config.js START HERE: LAYOUT (sizes) and FEEL (motion and effects)
src/main.js starts everything: screens, panels, the game, DEBUG_MODE
src/game/rules.js the rules: 4 x 5 table, 6 slices make a cake, points, helpers
src/game/levels.js the 50 levels (written by tools/generate-levels.mjs)
src/game/bot.js the simple player the generator uses
src/render/ the game screen: plates, slices, panda, HUD, effects
src/ui/ menu, level list, panels and their motion
src/lib/ saving, languages, full screen, 9-slice pictures
src/audio/ music and sound effects, volume of each sound
src/locales/ the 14 languages (one file each)
css/ look of the interface
assets/bg/ the 5 worlds (w1..w5, -pc wide and -pe upright)
assets/game/ plates, tray, cart, glass dome, cake slices
assets/panda/ the poses of the red panda
assets/ui/, icons/, fx/ interface, icons, particles
assets/sfx/, music/ sounds and music (MP3)
assets/AUDIO-AND-ART-CREDITS.txt credits of the sounds, music and art
fonts/ Fredoka and Nunito (Cyrillic) with their license
DOCUMENTATION.txt short note that points to this guide
source/ the same editable files, plus:
package.json, package-lock.json
README.md, DO-NOT-UPLOAD.txt
tests/ npm test (32 checks)
tools/generate-levels.mjs npm run levels: writes src/game/levels.js
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/customization.html step-by-step customization guide
documentation/img/ the screenshots of the guides
DOCUMENTATION.html shortcut to this guide
CUSTOMIZATION.html shortcut to the customization guide
START-HERE.txt, CHANGELOG.txt
THIRD-PARTY-LICENSES/ Fredoka and Nunito license, credits
-
src/config.js: the first file to edit.LAYOUThas the sizes of the game screen (tray, table, plates, helpers, panda) andFEELevery number of the motion and the effects (drag, landing, slices flying, cakes, combos, hammer, win and lose). -
src/game/rules.js: the rules (the table of 4 x 5 spots, 6 slices make a cake, the points, the tray and the helpers).src/game/levels.js: the 50 levels, written bytools/generate-levels.mjs.src/game/bot.js: the simple player the generator uses to check that each level can be won. -
src/main.js: starts everything and connects the screens, the panels and the game.src/render/: the game screen (plates, slices, the panda, the HUD and the effects).src/ui/: menus, the level list, the panels and their motion. -
index.html: the page with every screen and panel.css/: the look of the interface.src/locales/: one file per language.src/lib/: saving, languages, full screen and the button pictures.src/audio/: music and sound effects. -
assets/bg/: the backgrounds of the 5 worlds.assets/game/: the plates, the tray, the cart and the cake slices.assets/panda/: the poses of the panda.assets/ui/,assets/icons/,assets/fx/: interface, icons and particles.assets/sfx/andassets/music/: sounds and music.fonts/: the fonts and their license.
7 Internal names in the code
Some names in the files are not the words on the screen. They are only names: players never see them. The table of this section tells you which file is which.
-
The 8 flavors are numbers from 0 to 7 in the code. Their slices are
assets/game/slices/f<flavor>-p<position>.webp: one picture for each of the 6 positions of a slice on the plate. -
The backgrounds end in
-pc(wide screens) or-pe(upright screens):assets/bg/w1-pc.webpis the first world on a computer. Each sound file ends in-1:assets/sfx/win-1.mp3. -
Some names in the code are Portuguese: the test parameters
fase(level),tela(screen) andpainel(panel), the settingcalmis Reduce motion, and the sound groups insrc/audio/ids.js(jogada= move,marco= milestone,ajuda= helper,aviso= warning,efeito= effect).
8 Customizing
CUSTOMIZATION.html in the main folder of the download, or documentation/customization.html.
Brand: the name in the browser tab is the <title> line of index.html. The logo is
assets/ui/logo.webp (with the subtitle Cake Sort Puzzle drawn in it, transparent background). The page icons are
favicon.png, favicon.ico and assets/ui/icon-180.png.
Pictures: replace a file in assets/ with another WebP of the same name and the same size. The size of each picture
is listed in assets/manifest-jogo.json and assets/manifest-ui.json; the game reads these lists to
place the pictures.
Levels: src/game/levels.js is written by tools/generate-levels.mjs. In the generator,
FLAVORS is the number of flavors of each level, BLOCKS the patterns of glass domes, and
design() sets the goal, the helpers, the domes and the starting plates. Run npm run levels in
source/ after a change (see the development section).
Feel: FEEL in src/config.js. drag is how the plate follows the finger,
fly how the slices jump between plates, cake the moment a cake is made, combo the rising
notes of a combo, hammer the hammer, win and lose the end of a level.
Sounds and music
The sounds are MP3 files in assets/sfx/, one per event (for example pick-1.mp3,
drop-1.mp3, slice-1.mp3, cake-1.mp3, combo-1.mp3, win-1.mp3).
Replace a file and keep its name; if the new one is louder or softer, change its number in ID_GAIN or its group in
GROUP_GAIN in src/audio/ids.js.
The music is assets/music/menu.mp3 (menus) and assets/music/game.mp3 (levels), both playing in a loop.
src/audio/music-meta.js lists the music files and the length of each loop: update it if you change the length of a
music file.
slice-parade-v1 (in src/lib/storage.js)
and the helper explanations already shown under slice-parade-intro-v1 (in src/render/hint.js). If
you host two copies of the game on the same domain, change these names in one of them.
9 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.
Each language is one file in src/locales/ (for example en.js, pt.js,
zh-Hans.js) with the same keys as en.js. Change the text and keep the key. A text that is missing in a
language shows the English one. The list of languages shown in Settings is LANGS in
src/locales/index.js.
The first visit uses the language of the browser and the player changes it in Settings, where it is remembered. To open the game
in one language, add ?lang= and the code to the address, for example ?lang=pt. Russian uses the Nunito
font included for Cyrillic letters; Japanese, Korean and Chinese use the fonts of the device.
10 Saving and resetting
- The highest unlocked level, the volumes, vibration, reduce motion and the language are saved automatically in the browser of each player (localStorage). Nothing is sent to a server.
- Everything is stored under these two keys:
- To start over, delete this key in the developer tools (F12), under Application, Local Storage, or clear the site data in the browser.
slice-parade-v1
slice-parade-intro-v1
11 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 npm 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 32 checks: the rules, the 50 levels, the level generator, 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
Levels: npm run levels writes src/game/levels.js again from tools/generate-levels.mjs. It
prints one line per level (goal, flavors, domes, starting plates and how often its simple player wins) and stops with an error
if a level cannot be won. Run npm test after it.
npm run levels
6. Build: npm run build empties source/dist/ and copies index.html, the two favicons,
css/, src/, assets/ and fonts/ 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.
DEBUG_MODE to true at the top of src/main.js. Then
?fase=12 in the address opens level 12, ?tela=fases the level list and
?painel=ajustes the settings panel. Set it back to false before you publish.
12 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.
13 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 parts, with their complete license text in THIRD-PARTY-LICENSES/: the Fredoka font and the Cyrillic
letters of the Nunito font (SIL Open Font License 1.1, also fonts/OFL.txt). The sound effects, the music and the
artwork were made for this game; their note is THIRD-PARTY-LICENSES/AUDIO-AND-ART-CREDITS.txt.
14 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, click or key press. Check both volumes in the Sound panel and the volume of the device.
-
A blank page after you edit a code file: there is a typo in the file. Open the browser console (F12) to see the line, and run
npm testbefore publishing. - The game feels slow on an old phone: turn on Reduce motion in Settings.
- The old version still appears after an update: clear the cache (see the section above). Two copies on the same domain share their progress: give each copy its own save keys.
-
A level that feels too hard: the generator checks that its simple player can win every level, but a player may still need the
helpers. Lower the goal or the flavors of the level in
tools/generate-levels.mjsand run it again.
15 FAQ
Does the game need a database or a server language?
Does it use a game engine?
Can I make a level easier or harder?
tools/generate-levels.mjs, design() sets the goal, the helpers, the domes and the starting
plates, and FLAVORS the flavors of each level. Run npm run levels to write
src/game/levels.js again.
Can I add more levels?
50 in the loop of tools/generate-levels.mjs, add values to FLAVORS, set
MAX_LEVEL in src/lib/storage.js to the new number and run npm run levels. The level
list shows 10 levels per world: a new world also needs a background in assets/bg/ and its name
(world_6) in the 14 languages.
Does it work on phones?
Can I change the number of helpers?
helpers in design() of tools/generate-levels.mjs sets how many hammers, swaps and
moves each level gives. Run npm run levels after the change.
16 For AI assistants
If you ask an AI assistant to help you change this game, give it the prompt below together with your request. It describes the project so the assistant works on the right files and does not break the rules of the game.
You are helping me change "Slice Parade: Cake Sort Puzzle", a finished HTML5 cake sorting puzzle (version 1.0.0). Read these facts before you edit anything.
PROJECT
- Plain JavaScript ES modules, HTML and CSS, with a 2D canvas for some pictures and Web Audio for sound. No bundler, no compile step, no library, no npm dependencies.
- The editable project is source/ (the same files as game/, plus tests and tools). Edit source/, never game/ or source/dist/.
- npm run build copies index.html, favicon.ico, favicon.png, css/, src/, assets/ and fonts/ into source/dist/ and nothing else. Upload the CONTENTS of dist/ (or game/) to a static web host.
- Node.js 26.13.0 or newer is needed only for: npm ci, npm test, npm run dev (http://localhost:5180/), npm run levels, npm run build, npm run preview.
GAME
- Rules: src/game/rules.js. A table of COLS x ROWS = 4 x 5 cells; a tray of 3 plates; a plate holds up to FULL = 6 slices; slices of one flavor move between plates that touch (up, down, left, right); 6 slices of one flavor make a cake (CAKE_POINTS = 10, x its place in the chain of one move). Win when score >= goal; lose when no free cell is left. Helpers: hammer (remove a plate), swapTray (3 new tray plates), shift (move a table plate).
- Levels: src/game/levels.js is GENERATED by tools/generate-levels.mjs (npm run levels) (FLAVORS per level, BLOCKS = glass dome patterns, design() = goal, helpers, blocked cells, starting plates). Never edit levels.js by hand. The generator checks every level with the greedy bot of src/game/bot.js and fails if one cannot be won. WORLD_SIZE = 10 levels per world; MAX_LEVEL = 50 in src/lib/storage.js.
- src/main.js connects the screens (start, menu, level list, game) and the panels (pause, sound, settings, language, how to play, win, lose). DEBUG_MODE at the top of src/main.js enables the test address parameters (?fase=N, ?tela=..., ?painel=...); keep it false when publishing.
- src/config.js: LAYOUT (sizes of the game screen) and FEEL (every motion and effect number). src/render/ draws the game, src/ui/ the menus and panels, css/ the look.
- Pictures: assets/game/slices/f<flavor>-p<position>.webp (8 flavors x 6 positions), assets/bg/w<world>-pc.webp and -pe.webp, assets/panda/*.webp. assets/manifest-jogo.json and assets/manifest-ui.json list the picture sizes the game reads.
- Texts: src/locales/<lang>.js (14 files, same keys as en.js); LANGS in src/locales/index.js. A missing key falls back to English. Add every new text to the 14 languages.
- Saving: localStorage keys slice-parade-v1 (src/lib/storage.js: cur = highest unlocked level, lang, music, sfx, vib, calm) and slice-parade-intro-v1 (src/render/hint.js).
- Sounds: assets/sfx/<id>-1.mp3 (24 effects) and assets/music/menu.mp3, game.mp3; volumes in src/audio/ids.js (GROUP_GAIN, ID_GAIN).
- Some code names are Portuguese (fase = level, tela = screen, painel = panel, calm = reduce motion, sound groups in ids.js). Keep them unless you rename every use.
RULES FOR YOU
1. Make the smallest change that does what I ask. Do not rename or move files.
2. Run npm test after every change and fix what it reports. Run npm run build at the end.
3. Test through a web server (npm run dev), never from file://. If you change the levels, change tools/generate-levels.mjs and run npm run levels; never edit src/game/levels.js by hand.
4. Add no network request, CDN, analytics, advertising or external font. Keep THIRD-PARTY-LICENSES/, fonts/OFL.txt and assets/AUDIO-AND-ART-CREDITS.txt.
5. Keep comments in English and keep the last line of each own JavaScript and CSS file: // End of <path> (complete file).
MY REQUEST:
(write what you want here)
Replace the last line with what you want, for example: add a sixth world, change the colors of the buttons or make the first levels easier.
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.