Contents
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. Extract
wallroll-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/wallroll/. -
3. Upload only the contents of the
game/folder, so thatindex.htmlsits directly inside the target folder. -
4. Keep
assets/,src/anddata/besideindex.html, with names and letter case unchanged. -
5. Open
https://your-domain.example/games/wallroll/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 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
Marks on the screenshot
- Logo
- Start button
- Sound: music and effects volume
- Settings
Marks on the screenshot
- Total stars
- Open world
- Locked world
Marks on the screenshot
- Back
- World name
- Levels
- Total stars
Marks on the screenshot
- Crystals taken
- Moves and par
- View the whole level
- Turn the camera
- Undo
Marks on the screenshot
- Hint
- Crystals taken
- Moves and par
Marks on the screenshot
- Stars
- Result
- Retry
- Next level
Marks on the screenshot
- Reduced motion
- Ball skin
- Language
- Close
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.FEELhas every number that changes how the game feels (move times, camera, hints, particles),SKINSthe ball skins and the stars that unlock them,THEMEthe sky, light, block colors and music of each world. -
src/game/levels/world-1.js,world-2.jsandworld-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.jsbuilds a level from its data,ball.js,camera.js,stage.js,shaders.js,fx.jsand more).src/audio/: sound effects and music. -
index.html: the page and the import map that points tolib/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/andassets/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/:painelthe panel,linhaandlinha-selthe rows,btn-amareloandbtn-azulthe yellow and blue buttons,btn-redondo*the round buttons,chave-onandchave-offthe switch,vol-trilho,vol-cheioandvol-pinothe volume slider,placa-titulothe title plate,pilula-hudthe pill behind the counters. -
Also in
assets/ui/:estrelaandestrela-vaziathe big star (full and empty),estrela-pandestrela-p-vaziathe small ones,selothe crown,fase-atual,fase-feitaandfase-trancadathe map button of the current, finished and locked level,mundo-1tomundo-3the world cards andmundo-trancadothe locked card,nuvemthe cloud curtain between screens,seta-chaothe arrow on the floor,lasca-*the crystal shards,ouro-*the golden chips. -
Icons start with
ic-:ic-cristalcrystal,ic-passosmoves,ic-engrenagemsettings,ic-somsound,ic-olhoview the level,ic-dicahint,ic-playplay (the solution button),ic-desfazerundo,ic-girar-esqandic-girar-dirturn the camera,ic-voltarback,ic-fecharclose,ic-cadeadopadlock,ic-esferagolden orb,ic-checktick.bola-festais the ball cheering andbola-podiothe ball on the podium. -
Block faces in
assets/tex/:face-madeirawood,face-pintadapainted,face-areiasand,face-coralcoral,face-cristalcrystal,face-geloice andface-pontethe crystal bridge.rampais the climbing stripe,buracothe hole of the portal. The ball skins areazul(blue),madeira(wood),vidro(glass) andcromo(chrome):SKINSinsrc/config.jsandskin-<name>.webp. -
In a level file:
blocksare the cubes[x, y, z],ramps,coral,bubbles,ice,buttonsandbridgesare the special pieces,crystals,orbandgoal(the portal) are placed on a face of a block (pis the block,nthe side it is on),startis where the ball begins,paris the move count for the second star,solandsolOrbare stored solutions written as direction letters (Eeast,Wwest,Uup,Ddown,Ssouth,Nnorth) andmetais the checking data used by the tests. Level ids are world and number:2-03is the third level of the second world.
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 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.
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.sfxandworld1donetoworld3done. - 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.
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 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 level or a code file: 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: 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?
Does it use a game engine?
Can I make my own levels?
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?
Does it have ads, accounts or an online ranking?
Can the player skip a level that is too hard?
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.