Editor's Handbook
Welcome

Start here โ€” no coding experience needed

This handbook shows you exactly which file to open and which exact line to change for every kind of edit โ€” new puzzles, new pictures, new colors, new prices, new sounds. You never need to understand the code, just find the labelled spot and swap the value.

What WordFusion is made of

WordFusion is a single small game built from five plain text files that all sit in the same folder. Nothing is compiled or hidden โ€” every file can be opened in a simple text editor.

File What lives inside it You'll open this to…
index.html The screens themselves and every piece of visible text/labels Change wording, button labels, tutorial text, shop prices
levels.json The list of puzzles (picture clues + answers) Add, remove, or edit puzzles
style.css Every color, size, spacing, and animation Change the look and feel
main.js The game's rules โ€” coins, hints, scoring Change starting coins, hint counts, rewards
audioManager.js Sound effects and background music Change music track or volume
๐Ÿ’ก
Everything below assumes you also have an assets folder next to these files, holding assets/images/ (logo, background, puzzle pictures) and assets/audio/ (background music).

Two ground rules that prevent 90% of problems

  1. Always make a copy before you edit. Duplicate the whole project folder and call it something like wordfusion-backup before you touch anything. If a change breaks the game, you can restore instantly.
  2. Change one small thing, save, then test. Don't make ten edits and then check โ€” make one, refresh the browser, confirm it still works, then move to the next.
โš ๏ธ
Use a plain-text code editor, never a word processor. Notepad (Windows), TextEdit in Plain Text mode (Mac), or the free, beginner-friendly Visual Studio Code all work. Word/Pages will silently add hidden formatting that breaks the file.

Use the numbered path on the left to jump to any topic, or use the Next button below to go through the handbook in order โ€” that's the recommended path for a first read.

Content ยท levels.json

Adding and editing puzzles

Every puzzle the player solves โ€” its clue pictures and its answer word โ€” lives in one file: levels.json. The game reads this file top to bottom and turns each entry into one level, in order.

The shape of one puzzle

Open levels.json. You'll see a list of entries that look like this. Each one needs exactly two things: the answer word, and the list of images that act as clues for it.

[ { "answer": "DOG", "images": [ "assets/images/puzzles/dog-1.png", "assets/images/puzzles/dog-2.png" ] }, { "answer": "SUNSET", "images": [ "assets/images/puzzles/sun-1.png", "assets/images/puzzles/set-2.png" ] } ]

Adding a brand-new puzzle

  1. Add your clue picture files into the assets/images/ folder first, so you know their exact file names.
  2. Open levels.json and find the closing } of the very last puzzle in the list.
  3. Type a comma , right after that closing } โ€” every entry except the last one needs a trailing comma.
  4. Paste in a new { "answer": ..., "images": [...] } block underneath, following the pattern above.
  5. Type the answer in capital letters, with no spaces (use one word, or letters only โ€” see the note below for phrases).
  6. Save the file and refresh the game in your browser to see the new level appear at the end of the list.
Before โ€” last puzzle in file
{ "answer": "SUNSET", "images": [ "..." ] } ]
After โ€” new puzzle added
{ "answer": "SUNSET", "images": [ "..." ] }, { "answer": "CAKE", "images": [ "assets/images/puzzles/cake-1.png", "assets/images/puzzles/cake-2.png" ] } ]

Rules the game expects

  • Letters only, no spaces โ€” an answer like "ICE CREAM" won't work, because the game builds one blank tile per character and one letter tile per letter. Use "ICECREAM" instead, and let the picture clue explain the two words.
  • Capitalization doesn't matter when typing it โ€” the game automatically uppercases the answer, but typing it in capitals keeps the file easy to read.
  • Any number of clue images is fine โ€” one, two, or more; each one shows in the puzzle with a + between them.
  • Decoy (wrong) letters are automatic โ€” you never add fake letters yourself. The game invents extra letters that aren't in the answer and mixes them into the tile tray for you.
๐Ÿšซ
The most common mistake: a missing or extra comma. Every puzzle block needs a comma after it except the very last one in the file. If the game stops loading puzzles after you save, this is the first thing to check โ€” compare your commas against the example above.
๐Ÿ’ก
To remove a puzzle, delete its whole { ... } block including the comma that follows it (or precedes it, if you're deleting the last one).
Content ยท assets/images/

Replacing pictures, logo, and background

Every image the game uses is just a file inside the assets/images/ folder, referenced by name. To change a picture, replace the file โ€” or point the game at a new file name.

What it is Default file Used in
Game logo assets/images/logo.png Loading screen and Level Select screen
Background assets/images/background.png Behind every screen
Browser tab icon assets/favicon.png Browser tab / bookmark
Puzzle clue pictures Any name, your choice Referenced individually from levels.json

Easiest method: keep the same file name

If you replace logo.png with a new picture but save it with the exact same file name and drop it into the same folder, nothing else needs to change โ€” index.html already points at that name.

Using a different file name

If your new file is named differently, open index.html, and use your editor's Find tool (usually Ctrl+F / Cmd+F) to search for the old file name, then replace it.

Before
<img class="logo-plaque" src="assets/images/logo.png" alt="WordFusion Logo" />
After
<img class="logo-plaque" src="assets/images/new-logo-2026.png" alt="WordFusion Logo" />

This logo tag appears twice in the file โ€” once for the Loading screen and once for the Level Select screen โ€” so repeat the change (or use "Replace All" in your editor) for both.

๐Ÿ’ก
Puzzle clue pictures work the same way โ€” their file names live in levels.json, not in index.html. See the Editing Puzzles page.
โš ๏ธ
Keep new images reasonably sized (a few hundred pixels wide is plenty โ€” this is a mobile-friendly game). Very large image files will make the game slower to load.
Content ยท index.html

Changing wording, titles, and button labels

Every word the player reads on screen โ€” button labels, tutorial instructions, shop text โ€” is plain text sitting inside index.html. You're just retyping words between tags, not writing code.

How to find and change text

  1. Open index.html in your text editor.
  2. Use Find (Ctrl+F / Cmd+F) and search for the exact words you see in the game (e.g. search for Great!).
  3. You'll land on a line like <div class="board-ribbon-text">Great!</div> โ€” only change the word between the > and <, never the tag names around it.
  4. Save the file and refresh your browser.
Before
<button class="play-btn" id="playBtn"> <span class="play-icon"></span>Play </button>
After
<button class="play-btn" id="playBtn"> <span class="play-icon"></span>Start! </button>

Common text, and where to find it

Text Search for Notes
Browser tab title <title> Near the very top of the file
"Play" button Play</button> Level Select screen
"Great!" win message Great! Win overlay ribbon
"Paused" message Paused</div> Pause overlay ribbon
"Resume" / "Home" buttons Resume</button> Pause overlay
Tutorial page 1 title/body Letter Cleaner Help popup, page 1
Tutorial page 2 title/body Letter Flash Help popup, page 2
Shop default title/subtitle id="shopTitle" See the note below โ€” this text is overwritten live
โš ๏ธ
The Shop popup's title and subtitle ("Letter Flash" / "Letter Cleaner") are set automatically by the game each time it opens, so editing the words in index.html only changes the very first instant before the game overwrites it. To rename these permanently, see Game Balance for where that same text lives in main.js.
๐Ÿšซ
Never delete or retype the parts written in angle brackets, like <div class="..."> or id="playBtn". Those connect the text to the game's logic and styling โ€” only change the plain words sitting between them.
Look & Feel ยท style.css

Changing colors and the overall theme

Every color used anywhere in the game is defined once, at the very top of style.css, in a section called design tokens. Change a color there and it updates everywhere that color is used โ€” you never need to hunt through the whole file.

Where the color list lives

Open style.css and look at the very first section, which starts with :root {. Each line inside is one named color, written as a 6-character code starting with #.

/* Panel background gradient */ --panel-blue-top: #3aa6d9; --panel-blue-bottom: #1c6fb0; /* Gold / coin / premium accents */ --gold-1: #ffd45c; --gold-2: #f5a623; --gold-3: #c97a12;

What each color group controls

Variable Controls
--panel-blue-top / --panel-blue-bottom The blue gradient behind the level/coin badges
--gold-1 / -2 / -3 Coins, the Play button glow, win-screen board, shop buy buttons
--teal / --teal-dark Small accent highlights
--pink / --pink-dark Wrong-answer feedback tones
--navy-cell / --navy-cell-dark The empty answer-blank tiles
--green-1 / -2 / -3 Letter tiles and the Play/board buttons
--card-white The Shop popup's background

Changing one color

  1. Pick the color you want to change from the table above.
  2. Find its line inside :root { ... } at the top of style.css.
  3. Replace the 6-character code after the # with a new one (use any color picker website to get a code โ€” search "hex color picker").
  4. Keep the # and the semicolon ; exactly where they are.
  5. Save and refresh โ€” the new color appears everywhere that token is used.
Before โ€” gold theme
--gold-2: #f5a623;
After โ€” purple theme
--gold-2: #8a3fd9;
๐Ÿ’ก
Changing three shades of the same color together (like all three --gold- values) keeps the light/shadow effect on buttons looking natural, instead of flat.
Look & Feel ยท style.css

Resizing the logo, tiles, and buttons

Just below the color list in style.css is a second group of tokens that control sizes โ€” how big the logo is, how big letter tiles are, how wide the popups are. These automatically scale between phones and desktops, so you only set one value per element.

Variable Controls
--logo-width-load Logo size on the Loading screen
--logo-width-level Logo size on the Level Select screen
--pic-frame-size Size of each puzzle clue picture frame
--blank-size-w / -h Size of the empty answer-blank tiles
--tile-size Size of the scrambled letter tiles
--tool-btn-size Size of the Hint / Trash power-up buttons
--puzzle-card-width Width of the level-select puzzle card
/* Format: clamp(smallest, preferred, largest) */ --tile-size: clamp(48px, 5.2vw, 70px);

Each size is written as clamp(smallest, preferred, largest). You don't need to understand the middle value โ€” just adjust the first number (smallest, used on phones) and the last number (largest, used on big screens) to make something consistently bigger or smaller.

Before
--tile-size: clamp(48px, 5.2vw, 70px);
After โ€” bigger tiles
--tile-size: clamp(58px, 5.2vw, 84px);
โš ๏ธ
Keep the middle value (with vw or cqw) untouched โ€” that's what makes the size smoothly scale between phone and desktop instead of jumping abruptly.
Gameplay ยท main.js

Starting coins, hint charges, and rewards

A handful of plain numbers near the top of main.js control the game's economy โ€” how many hints a new player starts with, and how many coins they earn per solved puzzle.

Starting hint and trash charges

Search for STARTING_HINTS near the top of main.js.

/** One-time starting balances โ€” granted ONCE, ever, never refilled per level. */ const STARTING_HINTS = 3; const STARTING_TRASH = 3;
โš ๏ธ
These are granted once, the very first time a player opens the game โ€” not refilled every level. To let players earn more later, increase the shop bundle sizes instead (see Shop & Prices).

Starting coin balance

Search for coins = 100 โ€” it appears in two places inside the loadState() function (a safety fallback and a first-time default). Change both to the same new number so they stay consistent.

coins = typeof saved.coins === "number" ? saved.coins : 100; /* ...and further down: */ coins = 100;
๐Ÿ’ก
The number shown on the Level Select screen before the game finishes loading (<span class="coin-count" id="coinCount">100</span> in index.html) is just a placeholder โ€” update it too so it matches, though it's instantly replaced with the real balance once the game loads.

Coins earned per solved puzzle

Search for COIN_REWARD inside the handleCorrectAnswer function.

const COIN_REWARD = 10; coins += COIN_REWARD;

Coins earned from watching an ad

Search for AD_REWARD_COINS inside the handleShopAdClick function โ€” this is the reward for the "Get It โ–ถ AD" button in the shop.

const AD_REWARD_COINS = 100;
Gameplay ยท index.html

Changing shop bundles and prices

The shop that opens when a player runs out of Hint or Trash charges is built from a row of bundles inside index.html. Each row is a simple, self-contained block you can copy, edit, or delete.

Anatomy of one bundle row

Search index.html for shop-row. You'll find four of them by default:

<div class="shop-row" data-power="3" data-price="400"> <div class="shop-icon" data-stack="3"></div> <div class="shop-label">3 Power</div> <button class="shop-btn shop-btn-buy" data-price="400"> 400 <div class="shop-star-icon" aria-hidden="true"></div> </button> </div>
Part What to change
data-power="3" How many charges this bundle grants
data-price="400" Coin cost โ€” appears twice in each row, on the outer <div> and again on the <button>. Change both to the same number.
3 Power text The label shown to the player โ€” keep this matching the power number
400 button text The price shown on the button itself โ€” keep this matching the price
๐Ÿšซ
The price appears twice in every row (once as data-price on the row, once on the button). If you only change one of them, the button will still charge the old price even though it displays a new number. Always update both.

Adding a new bundle

  1. Copy one entire <div class="shop-row" ...> ... </div> block.
  2. Paste it directly below another bundle row, before the closing </div> of shop-body.
  3. Update its data-power, both data-price values, and the visible label/button text to match.
  4. Save and refresh โ€” no changes are needed in any other file; the game automatically wires up any bundle row it finds.

The "watch an ad" reward

The top shop row (labelled 100 Coins with a "Get It โ–ถ AD" button) doesn't grant power-up charges directly โ€” it grants coins, which the player can then spend on a bundle below. Its coin amount is controlled by AD_REWARD_COINS in main.js (see Coins, Hints & Rewards).

Renaming "Letter Flash" / "Letter Cleaner"

Because the shop's title text is set live by the game each time it opens, permanently renaming it means editing the words inside openShop() in main.js:

document.getElementById("shopTitle").textContent = isFlash ? "Letter Flash" : "Letter Cleaner";
Audio ยท audioManager.js

Changing background music and volume

All the little sound effects (clicks, chimes, the wrong-answer buzz) are generated by the game itself and don't need any sound files. The one piece of real audio is the looping background music, controlled by two lines near the top of audioManager.js.

Changing the music track

  1. Add your new music file (an .mp3 works best) into assets/audio/.
  2. Open audioManager.js and search for BGM_SRC.
  3. Replace the file name with your new one, keeping the quotes.
  4. Save and refresh โ€” tap anywhere on the game once (browsers require a tap before audio can start).
const BGM_SRC = "assets/audio/bgm.mp3";

Changing the music volume

Search for BGM_VOLUME, just below BGM_SRC. It's a number from 0 (silent) to 1 (full volume).

const BGM_VOLUME = 0.1; // 0 = silent, 1 = full volume
Before โ€” quiet
const BGM_VOLUME = 0.1;
After โ€” louder
const BGM_VOLUME = 0.35;
๐Ÿ’ก
The sound-effect volumes (clicks, tile taps, the win chime) are also just numbers, inside functions like playClick() and playCorrect() further down the same file โ€” each one has a volume: value between 0 and 1 you can nudge up or down the same way.
โš ๏ธ
Only change the numbers inside these lines. The surrounding code (things like tone({ freq: ... })) is what actually generates each sound โ€” editing anything besides a number can silence that effect entirely.
Workflow

Previewing your edits safely

After every save, you'll want to see your change in a real browser before moving on to the next edit.

Important: don't just double-click index.html

WordFusion loads its puzzle list (levels.json) using a technique that most browsers block when a page is opened directly from your computer's file system (this shows as a blank puzzle screen with no error visible). You need a very small local web server instead โ€” it sounds technical, but it's one command.

Option A โ€” Visual Studio Code + Live Server (easiest for beginners)

  1. Install the free Visual Studio Code editor.
  2. Inside it, install the Live Server extension (search for it in the Extensions panel).
  3. Open the WordFusion project folder in VS Code.
  4. Right-click index.html in the file list and choose "Open with Live Server".
  5. Your browser opens automatically, and it refreshes itself every time you save a file.

Option B โ€” Python's built-in server (if you already have Python)

  1. Open a terminal / command prompt inside the project folder.
  2. Type python -m http.server and press Enter (on some computers, use python3).
  3. Open a browser and go to http://localhost:8000.
๐Ÿ’ก
Keep the browser tab open on a second monitor or split-screen while you edit โ€” save, alt-tab, refresh, repeat. That loop is the fastest way to catch a mistake early.

If something looks broken

  • Check the Troubleshooting page for the most common causes.
  • Undo your last edit (Ctrl+Z / Cmd+Z in your editor) and save again โ€” if the game works again, the problem was in that specific change.
  • Compare your edit character-by-character against the "Before/After" examples in this handbook โ€” a missing comma, quote, or bracket is behind almost every issue.
Help

Common problems and quick fixes

Almost every issue after an edit traces back to one of the situations below.

The puzzle screen is blank, or levels never load

  • You're likely opening index.html directly instead of through a local server โ€” see Testing Your Changes.
  • Check levels.json for a missing comma, a missing closing ] or }, or a stray extra comma after the last puzzle.

A picture doesn't show up (broken image icon instead)

  • The file name typed in levels.json or index.html doesn't exactly match the real file name โ€” check spelling, capitalization, and the file extension (.png vs .jpg).
  • The image file wasn't actually placed inside the assets/images/ folder.

A shop bundle charges the wrong price

  • You likely updated only one of the two data-price spots in that row โ€” see Shop & Prices for both locations.

My color/size change didn't do anything

  • Your browser may be showing a cached (old) version of style.css โ€” do a hard refresh (Ctrl+Shift+R / Cmd+Shift+R).
  • Double check you edited the value inside :root { ... } at the top of the file, not a similarly-named value elsewhere.

Background music won't play

  • Browsers require one tap/click on the page before any audio can start โ€” this is a browser rule, not a bug. Click anywhere on the game once.
  • Check the sound icon in the top-right of the Level Select screen isn't showing the muted ๐Ÿ”‡ state.
  • Confirm the file name in BGM_SRC matches the real file inside assets/audio/.

The game looks fine on desktop but cramped on my phone

  • Adjust the smallest (first) number in the relevant clamp() size token in style.css โ€” see Sizes & Spacing.
๐Ÿšซ
If you're ever unsure whether an edit is safe, restore from your backup copy first, then re-apply just that one change โ€” it's always faster than debugging a file with several unknown changes mixed together.
Cheat Sheet

Where everything lives, at a glance

Bookmark this page โ€” it's the fastest way to jump straight to the right file once you already know the handbook.

I want to… Open this file Search for
Add / edit a puzzle levels.json the last } in the list
Replace the logo or background index.html logo.png / background.png
Change any on-screen wording index.html the exact words shown in-game
Change a color style.css :root { at the top
Resize the logo / tiles / buttons style.css clamp(
Change starting coins main.js coins = 100
Change starting hint/trash charges main.js STARTING_HINTS
Change coins earned per level main.js COIN_REWARD
Change shop bundle prices index.html shop-row
Rename "Letter Flash" / "Letter Cleaner" for good main.js openShop
Change background music audioManager.js BGM_SRC
Change music volume audioManager.js BGM_VOLUME
๐ŸŽ‰
That's the whole game. Every visible piece of WordFusion โ€” words, pictures, colors, sizes, prices, and sound โ€” traces back to one of the five files in this handbook. Happy editing!
Section 1 of 12