Before you start
You can change the look, the sound, the texts and the levels of Lumi without programming. Work in the source/ folder, test, and copy what you changed to game/ (or upload source/ without the tools/ folder).
- Keep a copy of the original package.
- Change one thing at a time and reload the page (Ctrl+F5) to see it.
Free tools
| For | Tool |
|---|---|
Text files (.js, .css, .html) | Visual Studio Code, Notepad++ |
Pictures (.webp, with transparency) | GIMP, Krita, Photopea (in the browser), Squoosh to convert PNG to WebP |
Sound (.mp3) | Audacity |
Where each part of the screen comes from
| What you see | Where it is |
|---|---|
| Lumi's head and body | assets/lumi-cabeca.webp, lumi-cabeca-feliz.webp, lumi-cabeca-ai.webp, lumi-gomo.webp |
| Ground and rock | assets/bloco.webp, bloco-pedra.webp (world 1), -w2, -w3 versions, ilha-base.webp |
| Berry, spikes, portal | assets/fruta.webp, espinhos.webp, portal-fechado.webp, portal-aberto.webp |
| Plate, door, lantern | assets/botao-solto.webp, botao-press.webp, porta.webp, lanterna-bloco.webp, pedestal.webp, borla.webp |
| Backgrounds | assets/fundo-w1/w2/w3.webp (landscape), fundo-p1/p2/p3.webp (portrait) |
| Logo | assets/logo.webp |
| Result stars | assets/hud/star-on.webp, star-off.webp |
| Buttons, panels, chips | Drawn by css/style.css (no picture) |
| Icons | The <symbol> list at the top of index.html (SVG) |
| Texts | js/config.js (English, Portuguese) and js/i18n.js (other languages) |
Recipe 1: colours of the interface
Open css/style.css. The first lines hold the palette:
--ink: #1b1147; /* outlines */
--panel: #3b2a9c; /* window, top */
--panel2: #2a1c74; /* window, bottom */
--cream: #fff6dc; /* text */
--gold: #ffd75e; /* main button, top */
--gold2: #ffa52e; /* main button, bottom */
--goldink: #5a2a08; /* text on gold */
--vio: #8468f7; /* other buttons, top */
--vio2: #5f43dc; /* other buttons, bottom */
Change the values and every button, window and chip follows. Keep a strong contrast between --gold and --goldink, and between --cream and --panel.
Recipe 2: backgrounds
Replace assets/fundo-w1.webp (landscape, about 1920×1080) and assets/fundo-p1.webp (portrait, about 1080×1920) with your pictures, keeping the names. Worlds 2 and 3 use -w2, -p2, -w3, -p3; the bonus world reuses a darker sky. The picture is cropped to fill the screen, so keep the important part near the centre.
Recipe 3: the character
Lumi is made of four pictures, all facing right, with a transparent background:
lumi-cabeca.webp(normal face),lumi-cabeca-feliz.webp(happy, on the result and ending screens),lumi-cabeca-ai.webp(hurt, on spikes);lumi-gomo.webp(one body piece, repeated).
Keep the same picture size and keep the character centred, so the pieces line up. The game mirrors the head when Lumi turns left.
Recipe 4: ground, objects and a new world look
- Ground:
bloco.webp(a square with grass on top) andbloco-pedra.webp(the rock used below the surface). The game repeats the rock as one continuous wall and runs the grass along the top. - Worlds 2 and 3 have their own
bloco-w2,bloco-pedra-w2,bloco-w3,bloco-pedra-w3. - Objects: replace
fruta,espinhos,portal-fechado,portal-aberto,botao-solto,botao-press,porta,lanterna-bloco,pedestal.
Keep square pictures square and wide pictures wide: the game scales them, it does not stretch them.
Recipe 5: logo and game name
- Replace
assets/logo.webp(transparent background, about 900 px wide). - Change the name of the browser tab in
index.html:<title>Lumi</title>. - The small "v1.0 · Polar Games" line is in
index.html(class="foot"); change or delete it.
Recipe 6: sounds and music
Replace the .mp3 files, keeping the names.
| File | When it plays |
|---|---|
sfx/step, bump, land, landbig | step, hitting a wall, landing, landing from high |
sfx/eat, drop | eating a berry (the pitch rises with each one), dropping the tail |
sfx/plate, door, doorclose | plate pressed, door opening, door closing |
sfx/gate, enter, win | portal opens, Lumi enters, level complete |
sfx/spike, undo, restart, hint | spikes, undo, restart, hint |
music/m-menu, music/m-game | menu, levels (they loop and cross-fade) |
Keep effects short (under 1 second) and at a similar loudness.
Recipe 7: texts and languages
- English and Portuguese texts:
js/config.js, insideSTR. The other languages:js/i18n.js. - Change only the text between the quotes. Keep
{n},{m}and{w}: the game replaces them with numbers. - Level names: the
nameof each level injs/levels.js(English and Portuguese) and the listNinjs/i18n.js.
Add a language
- In
js/i18n.js, copy one language block insideT(for examplees: { ... }), give it the new code (for examplesv) and translate the texts. - Do the same in
Nfor the level names (optional: a missing name falls back to English). - Add
['sv', 'Svenska']toLUMI_LANGSat the end of the file.
Long texts are fine: the letters shrink to fit the button.
Recipe 8: change or add levels
Levels are text drawings in js/levels.js; the main guide explains the characters. To add a level, copy one, give it a new id and name, draw it and choose the world. Then, in source/:
npm run solve
npm run answers
The solver says which levels cannot be finished and writes the 3-star target. A world may have more or fewer than 10 levels; the level screen shows them 5 per row.
Recipe 9: hints and rewarded video
In js/config.js, hintsPerLevel is the number of free hints on each level (0 = unlimited). rewardedAd connects your ad network: the main guide has the example.
Recipe 10: speed and game feel
The block FEEL at the top of js/config.js:
| Number | Effect |
|---|---|
moveMs | Time of one step. Smaller = faster game. |
squash | How much the body squashes on landing. |
trauma, shakeMaxPx | Screen shake strength. |
hitstopMs | The tiny pause on spikes and on the win. |
light | Light radius in dark rooms (lumi, lantern, gate), in cells. |
ceremony.pauseMs | Wait between entering the portal and the result window. |
Publish your changed game
- Test in
source/withnpm start: play a level of each world, on the computer and on a phone. - Run
npm test. - Copy the changed files to
game/(or uploadsource/withouttools/,package.jsonanddocumentation/). - Upload, then reload with Ctrl+F5. If you still see the old version, see "Updating the game and clearing the cache" in the main guide.