Polar Games

A 3D rolling puzzle game for the web · 1.0.0

Wallroll

This guide explains how to install, play, customize and update the game. Pick your language at the top; screenshots stay in English.

Version 1.0.0 Edition Standalone buyer edition

This guide works without internet. Images, styles and scripts are already inside this file.

Contents
  1. Overview
  2. Installing on your website
  3. Requirements
  4. How to play
  5. Screens
  6. Files and folders
  7. Internal names in the code
  8. Customizing
  9. Languages
  10. Saving and resetting
  11. Development (optional)
  12. Updating and clearing the cache
  13. Licences and credits
  14. Common problems
  15. FAQ
  16. For AI assistants
  17. Support

1 Overview

Wallroll is a complete HTML5 3D puzzle game. A small ball rolls on a floating toy made of wooden and painted blocks. When the ball reaches the edge of a block it does not simply fall: it rolls around the corner onto the wall or the underside, and gravity turns with it. The player collects 3 crystals to open the portal, may find a hidden golden orb and tries to finish in as few moves as possible.

It has 30 levels in 3 worlds of 10: Toy Workshop, Coral Reef and Crystal Caves. World 1 teaches golden edges, climbing stripes and the hop over a gap of one cell. World 2 adds bubbles, which carry the ball up to the underside of the block above, and crumbly coral. World 3 adds ice, where the ball slides until something stops it, and a button that makes crystal bridges appear and vanish. A level opens when the one before it is finished, also from one world to the next.

Each level gives up to 3 stars: 1 for finishing, 1 for finishing in the par number of moves or fewer, and 1 for the golden orb. Around the puzzle: hints for players who get stuck, undo, a free camera, 4 ball skins that unlock with stars, sound effects and music, vibration on phones, 14 interface languages and layouts for phone, tablet and desktop. It is drawn in real 3D with Three.js, which is included in the download.

2 Installing on your website

Installing takes a few minutes if you have FTP access or a file manager in your hosting panel.

  1. 1. Extract wallroll-static-1.0.0.zip on your computer.
  2. 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/wallroll/.
  3. 3. Upload only the contents of the game/ folder, so that index.html sits directly inside the target folder.
  4. 4. Keep assets/, src/ and data/ beside index.html, with names and letter case unchanged.
  5. 5. Open https://your-domain.example/games/wallroll/ in a modern browser.
Warning Do not upload the 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.html directly from the disk (file://) does not work, because browsers block JavaScript modules there.
  • A current browser with WebGL 2: Chrome, Edge, Firefox, Safari or Opera, on desktop or mobile. The game draws in 3D, so a phone or computer from the last few years works best.
  • About 8 MB of space on the server. The game makes no request to other websites: the Three.js library, fonts, pictures, sounds and levels 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

Goal: collect the 3 crystals of the level and roll into the portal, which opens when the last crystal is taken. A hidden golden orb is optional. The ball rolls around the golden edges of a block, and gravity follows the surface it is on. Rolling off an open edge is a fall: the ball goes back to where it was and the level adds 2 moves.

Keyboard: the arrow keys or W, A, S, D roll the ball toward that side of the screen. Q and E turn the camera by 90 degrees, C brings the default view back, V or Tab shows the whole level, Z or Backspace undoes a move (undo counts as a move), R restarts the level and Escape or P opens the pause menu.

Mouse and touch: swipe in the direction you want to roll. Hold and drag slowly to look around. With a mouse, drag with the right button to orbit the camera and use the wheel to zoom. With two fingers, drag to orbit and pinch to zoom. The round buttons on the screen turn the camera, show the whole level, undo and ask for a hint.

Stuck? After 60 seconds without a new crystal, or after 3 falls or restarts, a light bulb button appears. Each tap shows a see-through ball rolling the next 3 moves. After 3 hints the button plays the whole solution. A level finished with a hint gives at most 2 stars, and with the solution 1 star. Progress is saved automatically after every level.

5 Screens

Title screen: the logo and a level that plays itself behind it. Tap or click to start. Sound and Settings stay
in the top corner of every screen.
Title screen: the logo and a level that plays itself behind it. Tap or click to start. Sound and Settings stay in the top corner of every screen.

Marks on the screenshot

  1. Logo
  2. Start button
  3. Sound: music and effects volume
  4. Settings
World select: three worlds on cards. A locked world is dark. Each card shows the stars you have and the stars
it holds, and the counter at the top is your total.
World select: three worlds on cards. A locked world is dark. Each card shows the stars you have and the stars it holds, and the counter at the top is your total.

Marks on the screenshot

  1. Total stars
  2. Open world
  3. Locked world
Level map of a world: 10 levels, 1 to 5 over 6 to 10. The next level to play glows, finished levels show their
stars and a crown for 3 stars, and locked levels have a padlock.
Level map of a world: 10 levels, 1 to 5 over 6 to 10. The next level to play glows, finished levels show their stars and a crown for 3 stars, and locked levels have a padlock.

Marks on the screenshot

  1. Back
  2. World name
  3. Levels
  4. Total stars
World 2, Coral Reef: a bubble carries the ball up to the underside of the block above. The pills at the top
show the crystals taken and the moves against the par. The round buttons turn the camera, show the whole level and undo.
World 2, Coral Reef: a bubble carries the ball up to the underside of the block above. The pills at the top show the crystals taken and the moves against the par. The round buttons turn the camera, show the whole level and undo.

Marks on the screenshot

  1. Crystals taken
  2. Moves and par
  3. View the whole level
  4. Turn the camera
  5. Undo
World 2: cracked coral crumbles after the ball rolls off it, so it can be crossed only once.
World 2: cracked coral crumbles after the ball rolls off it, so it can be crossed only once.
World 3, Crystal Caves: on ice the ball slides until something stops it.
World 3, Crystal Caves: on ice the ball slides until something stops it.
World 3: stepping on the button makes the crystal bridges appear, and stepping on it again makes them vanish.
World 3: stepping on the button makes the crystal bridges appear, and stepping on it again makes them vanish.
The hint: a see-through ball shows the next moves. The light bulb button appears after a minute without progress
or after 3 falls or restarts.
The hint: a see-through ball shows the next moves. The light bulb button appears after a minute without progress or after 3 falls or restarts.

Marks on the screenshot

  1. Hint
  2. Crystals taken
  3. Moves and par
Level complete: 1 to 3 stars, your moves against the par, whether the golden orb was found, then Retry and
Next.
Level complete: 1 to 3 stars, your moves against the par, whether the golden orb was found, then Retry and Next.

Marks on the screenshot

  1. Stars
  2. Result
  3. Retry
  4. Next level
Settings: reduced motion, full screen (when the browser allows it), the ball skin and the language. On
phones with vibration there is also a Vibration switch.
Settings: reduced motion, full screen (when the browser allows it), the ball skin and the language. On phones with vibration there is also a Vibration switch.

Marks on the screenshot

  1. Reduced motion
  2. Ball skin
  3. Language
  4. Close
A phone in portrait: the level fills the screen and the buttons stay at the edges.
A phone in portrait: the level fills the screen and the buttons stay at the edges.

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                 the page and the import map of Three.js
  src/config.js              START HERE: game feel, hints, skins, world themes
  src/main.js                starts everything, connects the screens
  src/app/game.js            one level being played: input, undo, hints
  src/app/hud.js             every screen and panel
  src/app/input.js           keyboard, mouse and touch
  src/game/rules.js          the rules (no interface code)
  src/game/solver.js         finds the shortest solution of a level
  src/game/levels/           world-1.js, world-2.js, world-3.js: the 30 levels
  src/render/                the 3D scene: blocks, ball, camera, shaders, effects
  src/audio/                 sound effects and music
  src/lib/                   languages, saving, fullscreen, 9-piece panels
  src/lib/locales/           interface texts, one file per language
  src/styles.css             layout and look of the interface
  assets/ui/                 interface art (WebP)
  assets/tex/                block faces, ball texture, skies (WebP)
  assets/sfx/, assets/music/ sound effects and music (MP3)
  assets/fonts/              Nunito and its license
  lib/three/                 the Three.js library (MIT), unminified, 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, DO-NOT-UPLOAD.txt
  tests/                     npm test
  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
  tools/gen-lib.mjs          helpers used by the level tests
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/        Three.js and Nunito licenses
  • src/config.js: the first file to edit. FEEL has every number that changes how the game feels (move times, camera, hints, particles), SKINS the ball skins and the stars that unlock them, THEME the sky, light, block colors and music of each world.
  • src/game/levels/world-1.js, world-2.js and world-3.js: the 30 levels. src/game/rules.js: the rules, with no interface code. src/game/solver.js: finds the shortest solution of a level.
  • src/main.js: starts everything and connects the screens. src/app/game.js: one level being played (input queue, undo, hints, reactions). src/app/hud.js: every screen and panel. src/app/input.js: keyboard, mouse and touch.
  • src/render/: the 3D scene (world.js builds a level from its data, ball.js, camera.js, stage.js, shaders.js, fx.js and more). src/audio/: sound effects and music.
  • index.html: the page and the import map that points to lib/three/. src/styles.css: layout and look. src/lib/: languages, fullscreen, saving and the 9-piece panel baker.
  • assets/ui/: interface art. assets/tex/: block faces, ball textures and the sky of each world. assets/sfx/ and assets/music/: sounds in MP3. assets/fonts/: the font and its license. lib/three/: the Three.js library and its 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.

  • Many picture names are Portuguese words, because the art was made that way. In assets/ui/: painel the panel, linha and linha-sel the rows, btn-amarelo and btn-azul the yellow and blue buttons, btn-redondo* the round buttons, chave-on and chave-off the switch, vol-trilho, vol-cheio and vol-pino the volume slider, placa-titulo the title plate, pilula-hud the pill behind the counters.
  • Also in assets/ui/: estrela and estrela-vazia the big star (full and empty), estrela-p and estrela-p-vazia the small ones, selo the crown, fase-atual, fase-feita and fase-trancada the map button of the current, finished and locked level, mundo-1 to mundo-3 the world cards and mundo-trancado the locked card, nuvem the cloud curtain between screens, seta-chao the arrow on the floor, lasca-* the crystal shards, ouro-* the golden chips.
  • Icons start with ic-: ic-cristal crystal, ic-passos moves, ic-engrenagem settings, ic-som sound, ic-olho view the level, ic-dica hint, ic-play play (the solution button), ic-desfazer undo, ic-girar-esq and ic-girar-dir turn the camera, ic-voltar back, ic-fechar close, ic-cadeado padlock, ic-esfera golden orb, ic-check tick. bola-festa is the ball cheering and bola-podio the ball on the podium.
  • Block faces in assets/tex/: face-madeira wood, face-pintada painted, face-areia sand, face-coral coral, face-cristal crystal, face-gelo ice and face-ponte the crystal bridge. rampa is the climbing stripe, buraco the hole of the portal. The ball skins are azul (blue), madeira (wood), vidro (glass) and cromo (chrome): SKINS in src/config.js and skin-<name>.webp.
  • In a level file: blocks are the cubes [x, y, z], ramps, coral, bubbles, ice, buttons and bridges are the special pieces, crystals, orb and goal (the portal) are placed on a face of a block (p is the block, n the side it is on), start is where the ball begins, par is the move count for the second star, sol and solOrb are stored solutions written as direction letters (E east, W west, U up, D down, S south, N north) and meta is the checking data used by the tests. Level ids are world and number: 2-03 is the third level of the second world.

8 Customizing

Note Not a programmer? The Customization Guide shows the most common changes step by step. Open CUSTOMIZATION.html in the main folder of the download, or documentation/customization.html.

Customizing

Brand: the name in the browser tab is the <title> line of index.html. The logo of the start screen is assets/ui/logo.webp (1100 x 325 pixels, transparent background) and the page icon is assets/ui/bola-festa.webp.

Pictures: replace a file in assets/ with another WebP of the same name and a similar size. The skies are assets/tex/sky-1.webp to sky-3.webp, the block faces are assets/tex/face-*.webp and the interface art is in assets/ui/.

Levels: src/game/levels/world-1.js to world-3.js. Each level lists its blocks, special pieces, crystals, orb, portal and start, plus a stored solution (sol, solOrb). Run npm test after every change: it replays the stored solutions, checks that they are the shortest, and tells you which level broke.

Difficulty and feel: FEEL in src/config.js. The hint button appears after FEEL.hint.after seconds (60) or FEEL.hint.tries falls or restarts (3); FEEL.hint.moves is how many moves a hint shows and FEEL.hint.max how many hints come before the solution. The cost of a fall is FALL_COST in src/game/rules.js and the par of each level is par in its level file.

Sounds and music

Every effect is an MP3 in assets/sfx/, named with its id and a number, for example crystal-1.mp3. Frequent sounds have two versions and the game alternates them. Replace a file keeping its name. The music is assets/music/mundo-1.mp3 to mundo-3.mp3, one track for each world, and amb-1.mp3 is the quiet wind loop.

To add a version, put the file in the folder and raise its number in SFX_FILES in src/audio/sfx-files.js. The tracks of the worlds are listed in MUSIC_FILES in the same file and chosen by THEME in src/config.js.

Warning Save keys: everything is saved in the browser under names that start with wallroll. (for example wallroll.progress and wallroll.lang). If you host more than one copy of the game on the same domain, change PREFIX in src/lib/storage.js in one of them, otherwise the copies share progress and language.

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.

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 import it and list it in src/lib/locales/index.js (LOCALES and LANGS).

There is no address switch for the language: the first visit uses the language of the browser and the player changes it in Settings, where it is remembered. Russian uses the included Nunito font, which also covers the Latin alphabets. Japanese, Korean and Chinese use the fonts of the device.

10 Saving and resetting

  • Stars, unlocked levels and worlds, settings, volumes and language are saved automatically in the browser of each player (localStorage). Nothing is sent to a server.
  • Everything is stored under keys that start with wallroll.: progress (the stars and best moves of each level), last, skin, vibrate, reduced, lang, vol.music, vol.sfx and world1done to world3done.
  • To start over, delete these keys in the developer tools (F12), under Application, Local Storage, or clear the site data in the browser.
wallroll.progress
wallroll.lang

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 the checks: the rules, all 30 levels with their stored solutions, the 14 languages, the pieces of the three worlds 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/, assets/ and lib/ 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.

Note Troubleshooting: ENOENT or a missing package.json means the terminal is in the wrong folder. EBADENGINE, or the Node.js message printed before npm test, means Node.js is too old. If PowerShell blocks npm.ps1, use Command Prompt or run npm.cmd.

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 texts in THIRD-PARTY-LICENSES/: the Three.js library, unminified in game/lib/three/ (MIT License), and the Nunito font (SIL Open Font License 1.1, also in assets/fonts/).

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 to index.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 level or a code file: a typo in the file. Open the browser console (F12) to see the line, and run npm test before publishing.
  • The game feels slow on an old phone: it lowers its own quality when the frame rate stays low. Turn on Reduced motion in Settings to make it lighter.
  • The old version still appears after an update: clear the cache (see the section above). Two copies share their saved games: give each copy its own save prefix.
  • A black or empty 3D view: the browser has no WebGL 2 or the graphics acceleration is turned off. Turn hardware acceleration on in the browser settings or try another browser.

15 FAQ

Does the game need a database or a server language?
No. It is a static website: HTML, CSS, JavaScript, pictures and sounds. The levels are JavaScript files next to the game.
Does it use a game engine?
It uses the Three.js library for the 3D drawing (included, MIT License). The rules, the levels, the solver, the hints and the screens are original code written for this game.
Can I make my own levels?
Yes. Edit or add levels in the level files (see the Customization Guide) and run npm test. A level also needs its stored solutions (sol, solOrb): the tests, the hints and the title screen demo use them, and the solver in src/game/solver.js can find them for you.
Does it work on phones?
Yes, in portrait and landscape, with touch and swipes. It also works with a keyboard and a mouse on desktop.
Does it have ads, accounts or an online ranking?
No. There is no ad, account, payment or online service in this edition: progress stays in the browser of the player.
Can the player skip a level that is too hard?
The hint button helps and, after 3 hints, plays the whole solution. A level that is finished that way gives 1 star. The next level opens only when the one before is finished.

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 "Wallroll", a finished HTML5 3D puzzle game (version 1.0.0). Read these facts before you edit anything.

PROJECT
- Plain JavaScript ES modules, HTML and CSS. No bundler, no compile step, no npm dependencies.
- The 3D drawing uses Three.js r186, unminified, in lib/three/ and loaded through the import map in index.html. Do not upgrade, minify or reformat it.
- 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, src/, assets/ and lib/ 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 build, npm run preview.

GAME
- A ball rolls on a grid of unit cubes. At a golden edge it rolls around the corner and gravity turns with it. Pieces: climbing stripes (ramps), one-cell hops, bubbles and crumbly coral (world 2), ice, a button and crystal bridges (world 3).
- Every level has exactly 3 crystals, a start, a portal (goal) and an optional golden orb. Stars: 1 for finishing, 1 if moves <= par, 1 for the orb. A fall adds FALL_COST (2) moves.
- 3 worlds x 10 levels: src/game/levels/world-1.js, world-2.js, world-3.js. A level opens when the one before it (across worlds too) is finished.
- Rules live in src/game/rules.js (no DOM, no time). src/game/solver.js finds shortest solutions. Each level stores sol and solOrb (letters E W U D S N) and meta (opt, optOrb, counts); npm test replays and re-solves them, so change a level, then fix sol, solOrb, meta and par.
- Numbers that change how the game feels, hint timing, skins and the theme of each world are in src/config.js (FEEL, SKINS, THEME).
- Screens are built in src/app/hud.js from pictures in assets/ui/ (many file names are Portuguese words: painel = panel, fase-atual/feita/trancada = current/done/locked level, ic-* = icons).
- Texts: src/lib/locales/<code>.js, 14 languages, same keys in every file; English is the fallback. New text goes in all 14.
- Saving: localStorage keys start with the prefix in src/lib/storage.js ('wallroll.'): progress, last, skin, vibrate, reduced, lang, vol.music, vol.sfx, world1done..world3done.
- Sounds: assets/sfx/<id>-<n>.mp3 listed in src/audio/sfx-files.js; music assets/music/mundo-1..3.mp3.

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://.
4. Add no network request, CDN, analytics, advertising or external font. Keep THIRD-PARTY-LICENSES/ and lib/three/LICENSE.
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: make world 1 easier, change the ball colors or add a fourth skin. Always run npm test after the change.

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.