Lexika — Daily Word Puzzles
A complete, production-ready HTML5 word-puzzle game built for commercial distribution. Zero external JavaScript dependencies. Runs on any modern browser straight from a static file host with no build step required.
Overview
Lexika bundles three separate word-puzzle types in one package: Word Connections (group 16 words into 4 hidden categories), Strands (trace hidden theme words in a letter grid), and Letter Boxed (chain words around a 12-letter box using every letter). Unlike a procedurally-generated puzzle game, every puzzle in Lexika is hand-authored and shipped inside scripts/js/puzzle-data.js — there is no runtime puzzle generator. The game features Easy/Medium/Hard difficulty tiers plus a seeded Daily Challenge per mode, five selectable board themes, three selectable background images, a shared XP/rank system, a local best-times leaderboard, a 9-item achievements system, a 3-hint-per-puzzle hint system, and a full sponsor/ad integration framework — all in a single self-contained HTML5 package.
About the Game
- Entry point is
index.html — no build step, no CLI tools, no package manager required - Pure vanilla HTML5, CSS3, and ES6+ JavaScript — zero libraries, zero frameworks
- The game engine and UI for all three puzzle modes are contained in a single IIFE in
scripts/js/game.js - All puzzle content — every Word Connections, Strands, and Letter Boxed puzzle, for every difficulty and for the Daily Challenge — is pre-authored and stored as plain data in
scripts/js/puzzle-data.js. Nothing is generated algorithmically at runtime. - All CSS lives in
scripts/css/style.css; sponsor/ad placeholder in scripts/sponsor/sponsor-placeholder.html - Ads are switched on or off from a single file:
scripts/config/ads.js - Three bundled background images (
scripts/images/background.jpg, background2.jpg, background3.jpg) and one favicon (favicon.jpg), selectable from Settings - Procedural Web Audio API sound engine — no audio files bundled
- Game state (theme, background, stats/XP/achievements, leaderboard) is persisted to
localStorage with graceful degradation (try/catch) when storage is unavailable - Browser support check on boot — displays a dedicated “Browser Not Supported” screen if requirements are not met
Puzzle Modes
The mode is chosen right after the lobby, on its own dedicated screen, before difficulty.
- Word Connections — 16 words, 4 hidden categories of 4. Tap 4 words believed to belong together, then hit Check. A correct guess locks that group in with its category color and name. Four wrong guesses end the puzzle (the remaining groups are then revealed).
- Strands — A letter grid hides several theme words plus one “spangram” that sums up the theme itself. Tap connected letters (any of the 8 surrounding directions, including diagonals) to trace a word, then hit Check. The traced path must match a hidden word’s path exactly (in either direction) — partial or approximate matches are rejected as “Not a hidden word.” The puzzle finishes once every word and the spangram are found.
- Letter Boxed — 12 letters sit on the 4 sides of a box (3 per side). Words are built by tapping letters or typing on a physical keyboard; no two letters in a row may come from the same side, and every new word must start with the last letter of the previous one. A word is only accepted if it appears in that puzzle’s own
acceptedWords list. The puzzle finishes once all 12 letters have been used at least once.
Difficulty & Daily Challenge
- Easy / Medium / Hard — select a hand-authored puzzle from that difficulty’s pool for the chosen mode. Puzzle content (word length, grid size, category subtlety, par) varies by difficulty, but the hint allowance does not — every difficulty gives the same 3 hints per puzzle (see “XP and Rank System” below for how difficulty instead affects XP).
- Daily — draws from a separate pool of puzzles tagged
difficulty: "daily" for that mode, chosen with a seeded RNG keyed to the current calendar date (plus a small per-mode offset, so Word Connections, Strands, and Letter Boxed each get a different daily puzzle on the same day). A completed Daily Challenge is marked done for the rest of the calendar day and greys out on the difficulty screen with the toast “Daily Challenge already completed. Come back tomorrow!” until the next day. Losing a Daily puzzle does not mark it done — the same day’s Daily puzzle can be retried after a loss.
Bundled Puzzle Counts (as shipped)
- Word Connections — 10 standard puzzles (4 Easy, 4 Medium, 2 Hard) + 7 Daily puzzles = 17 total
- Strands — 6 standard puzzles (2 Easy, 2 Medium, 2 Hard) + 7 Daily puzzles = 13 total
- Letter Boxed — 21 standard puzzles (7 Easy, 7 Medium, 7 Hard) + 7 Daily puzzles = 28 total
Non-Daily puzzles are picked at random from the matching difficulty pool each time, with simple repeat-avoidance so the same puzzle isn’t served twice in a row for a given mode. Buyers can add further entries to puzzle-data.js at any time; nothing in the engine needs to change to support more puzzles.
Themes & Backgrounds
Five board themes are selectable from the “Board · Style” screen, shared across all three modes. The active theme is saved to localStorage and restored on every visit. The default theme is Warm Paper.
- Warm Paper — classic parchment feel (default)
- Jungle — dense canopy darkness, green accents
- Neon City — electric arcade glow
- Midnight Ink — sleek deep universe, violet accents
- Rose Gold — warm blush elegance, pink accents (marked as new)
Separately, three background images are selectable from Settings — Classic (default), Coastal, and Oasis. The chosen background is also saved to localStorage and restored on every visit.
How to Play
- From the lobby, press Play to go to the Mode Select screen.
- Choose Word Connections, Strands, or Letter Boxed.
- Select Easy, Medium, Hard, or Daily on the difficulty screen.
- In Word Connections: tap 4 words you think share a category, then hit Check.
- In Strands: trace connected letters to spell a hidden word or the spangram, then hit Check.
- In Letter Boxed: tap letters (or type on a keyboard) to build a word that starts with the previous word’s last letter, then hit Check/Enter.
- Use Hint and Undo from the sidebar as needed, then complete the puzzle to see your time and XP earned.
Game Screen Controls
All three modes share the same left-side action sidebar:
- Check — submits the current guess/selection for that mode (correctly wired to the actual submit logic for all three modes)
- Hint — uses one of 3 hints per puzzle. In Word Connections it locks in the earliest unsolved group; in Strands it reveals the next unfound theme word (and the spangram once all theme words are found); in Letter Boxed it fills in the next word from that puzzle’s intended solution path.
- Undo — in Word Connections and Strands this clears the current in-progress selection/traced path only (it does not undo an already-locked-in group or already-found word). In Letter Boxed it deletes one typed letter at a time from the word currently being built.
- Reset — opens a confirm popup titled “Clear all your entries.” As currently wired, confirming this only clears the current in-progress selection/path/typed word — it does not restart the puzzle or revert already-solved groups, already-found words, or the mistake count. The popup’s “Moves Lost” and “Mistakes” figures are also not populated by the code and always display 0. Worth reviewing before release if a true full-puzzle restart is intended.
- New — opens a confirm popup (“Start a fresh puzzle”) that, on confirmation, plays the ad popup (if enabled) and then genuinely starts a new puzzle for the current mode/difficulty. This one works as its label suggests.
- Pause — pauses the timer and opens a popup to Resume, start a New Game, or Quit to Lobby. Note: the popup’s Time/Moves/Mistakes display fields are not populated by the code and always show 0:00 / 0 / 0 regardless of actual progress.
Letter Boxed additionally has its own inline Delete and Enter buttons directly under the letter box (functionally identical to sidebar Undo and Check for that mode).
Keyboard Shortcuts
- Esc — open/close the pause popup
- Enter — submit the current guess (Check), works in all three modes
- Backspace — delete the last typed letter (Letter Boxed only)
- A–Z letter keys — type a letter directly if it exists on the box (Letter Boxed only)
There is no keyboard shortcut for Hint or Undo, and no Ctrl+Z binding, in the current build.
XP and Rank System
All three modes award XP toward a single shared rank system on every puzzle finish (win or loss):
- On a win: a base amount for the difficulty, plus a bonus for finishing with zero mistakes, plus a bonus for finishing under a configurable par time. As shipped (no overrides in
ads.js), the base is 100 XP for any difficulty, the no-mistake bonus is 100 XP, and the speed bonus is 50 XP with an effectively unreachable default par (9,999s) — so the speed bonus is awarded on essentially every win by default. - On a loss (e.g. 4 mistakes in Word Connections): a flat 15 XP consolation amount, unaffected by difficulty.
The seven rank tiers, shared across all three modes:
- Apprentice — 0 XP
- Solver — 300 XP
- Thinker — 800 XP
- Expert — 1,800 XP
- Master — 3,500 XP
- Sage — 6,000 XP
- Grand Master — 10,000 XP
The current rank and progress toward the next tier are shown as an XP bar in the lobby (hidden entirely until the player has earned at least 1 XP).
Achievements
Nine achievements are tracked and displayed as gold badges in the lobby once unlocked (the lobby shows up to 4 at a time, with a “See More” button opening a full Achievements page for the rest). Stats and achievement checks update on every puzzle finish, win or lose, across all three modes:
- First Win — complete your first puzzle
- Perfect Solve — finish a puzzle with zero mistakes
- Speed Demon — finish a puzzle in under 2 minutes (best time)
- 3-Day Streak — labeled “Play 3 days in a row,” but the underlying counter increments by 1 on every puzzle finished (win or lose, any mode) and is never reset by date. In practice this unlocks after finishing 3 puzzles total, not 3 separate calendar days.
- 7-Day Streak — same counter as above, at 7 finishes.
- Hard Mode — labeled “Complete a puzzle on Hard difficulty,” but the underlying counter increments whenever a Hard puzzle is finished, including a loss — so this can unlock from a failed Hard puzzle, not only a completed one.
- 10 Puzzles — complete (finish) 10 puzzles, win or lose
- Daily Champ — labeled “Complete a Daily Challenge,” but the underlying counter increments on every Daily puzzle finish including a loss, for the same reason as Hard Mode above.
- Word Explorer — play at least one puzzle in all 3 Lexika modes
Worth reviewing before release if “Hard Mode,” “Daily Champ,” and the two Streak achievements are intended to require an actual win / actual consecutive calendar days, since as coded they do not.
Leaderboard (Best Times)
A local best-times leaderboard is accessible from the lobby, with Easy / Medium / Hard tabs, ranked by fastest time (up to 10 entries per tab by default, configurable). Each entry records time, mistake count, and date. The leaderboard only records wins — a lost puzzle is never added. Daily Challenge wins are recorded under the Medium tab. The leaderboard can be cleared per-tab from its own screen.
Settings
All settings are accessible from the lobby settings button.
- Sound Effects — toggles the procedural Web Audio API sounds for taps, errors, and win sounds. Can also be toggled from the lobby’s sound icon. Session-only — resets to on at every page reload and is not written to
localStorage. - Animated Particles — toggles the floating background particle animation on the canvas layer. Session-only, same as above.
- Background — choose between Classic, Coastal, and Oasis background images. This one is persisted to
localStorage and restored on every visit.
Ad Monetization
The game ships with a fully integrated, configurable sponsor/ad system ready to connect to any ad network.
- Ads are displayed in a full-screen overlay popup containing a sandboxed iframe sized to the standard 300×250 Medium Rectangle format
- A countdown timer starts at 5 seconds by default (configurable via
ads.preGame.countdown). The Skip button is disabled until the countdown reaches zero - Ad content is loaded from
scripts/sponsor/sponsor-placeholder.html. The file contains clearly marked AD REPLACEMENT START and AD REPLACEMENT END comment blocks showing exactly where to paste ad code - The entire ad system can be disabled by setting
ads.enabled or ads.preGame.enabled to false in scripts/config/ads.js. As shipped, scripts/config/ads.js sets ads.enabled: true, so the sponsor popup is on by default — set it to false to turn it off - Ad trigger points: before a puzzle starts, whether from Start Puzzle (difficulty screen), Play Again (complete screen), or “Yes, New Game” (in-game New Game confirm popup)
Important: Ad network integrations such as Google AdSense, AdMob, and ironSource are third-party external services not affiliated with or included in this product. Each network operates independently and has its own account registration process, eligibility requirements, approval policies, and potentially associated costs. Lexika provides the ad slot infrastructure only — buyers are solely responsible for obtaining their own accounts, meeting each network’s requirements, and complying with their respective terms of service.
Ad Network Approval FAQ
- Do I need to register with the ad network first? Yes — every ad network requires its own account, registered and approved by that network, before real ads will show in the sponsor slot.
- Who approves my account? The third-party ad network itself, entirely on its own terms. This product only provides the ad placement/integration infrastructure — it has no role in, and no control over, that decision.
- Is approval guaranteed? No. Approval is not guaranteed by this product or its author; each network reviews applications against its own eligibility requirements and policies.
- How long does approval take? Review and approval times vary by provider and are set entirely by that provider.
- What is the buyer responsible for? Meeting the ad network’s eligibility requirements, agreeing to its terms of service, and maintaining the account — this product cannot guarantee eligibility on the buyer’s behalf.
Configuration System
Game behavior is controlled by a window.LEXIKA_CONFIG object, which scripts/config/ads.js creates and adds its ad settings to. Add further keys to that same object (or your own script loaded before game.js) to customize other behavior. All values have built-in defaults so the game runs without any config. Configurable options actually read by game.js include:
- Default theme (
defaultTheme) — note there is no equivalent defaultBackground config key; the default background is fixed in code - Show/hide timer (
showTimer) - XP base per difficulty (
xp.easy, xp.medium, xp.hard), no-mistake bonus (xp.noMistakeBonus), speed bonus (xp.speedBonus), and loss consolation XP (xp.consolation) - Par times per difficulty for the speed bonus (
parTime.easy, parTime.medium, parTime.hard) - Leaderboard max entries per tab (
leaderboardMaxEntries, default 10) - Ad system enable flags and countdown duration (
ads.enabled, ads.preGame.enabled, ads.preGame.countdown) - Confetti and particle enable/count/speed (
confetti.enabled, confetti.count, particles.enabled, particles.count, particles.speed)
Tech Stack
- HTML5 — all screens and markup for all three modes in a single
index.html - CSS3 — custom properties for theming, flexbox, keyframe animations, canvas particle layer
- Vanilla JavaScript ES6+ — single IIFE module, arrow functions, Set/Map, template literals
- Hand-authored puzzle database — Word Connections, Strands, and Letter Boxed puzzles are all pre-built data in
puzzle-data.js, not generated at runtime; a seeded RNG picks the Daily Challenge deterministically from the Daily pool - Web Audio API — procedural sound effects; no audio files
- Canvas API — floating background particles and win confetti animation
- Google Fonts CDN — Crimson Pro (400, 600), DM Sans (300, 400, 500)
- localStorage — theme, background, stats, XP, achievements, and leaderboard state
- No frameworks, no npm, no build tooling
Two items are present in the codebase but not currently active in gameplay, worth knowing about before release:
- A
wordBank object in puzzle-data.js (flat 5/6/7-letter word lists, filtered to exclude alcohol, pork, gambling, and nudity/sexual terms) is bundled but not referenced anywhere in game.js — it isn’t used for word validation or puzzle generation in the current build, despite the in-file comment describing it as being for “validation and future puzzle generation.” - A
time-attack-bar element and matching CSS exist in index.html/style.css but are never shown, filled, or otherwise referenced by game.js — inert markup left over from a shared template, not a functioning feature in this build.
Third-Party / External CDN Dependencies
This project relies on an external CDN for one resource. This dependency is third-party, hosted and operated outside of this project and outside of the seller’s control — its uptime, availability, and any future changes to its terms are the responsibility of the provider, not the seller.
- Google Fonts — loaded from
fonts.googleapis.com via an @import in scripts/css/style.css (and separately via a <link> in sponsor-placeholder.html), providing the Crimson Pro (400, 600) and DM Sans (300, 400, 500) font families.
An active internet connection is required for the browser to reach this CDN and load these fonts. Without one, the game still runs normally — text simply falls back to the browser’s default system font. Buyers who need a fully offline build can download the font files, host them locally, and replace the @import line in style.css with local @font-face rules.
No other third-party or CDN-hosted libraries (such as Chart.js, jsPDF, three.js, or html2canvas) are used anywhere in this codebase.
Requirements and Compatibility
- Any modern browser: Chrome, Firefox, Safari, Edge (browser support is checked at boot and requires
localStorage, AudioContext, document.querySelector, Promise, Set, and Array.from) - No server-side code required — deploy to any static file host (GitHub Pages, Netlify, S3, cPanel, etc.)
- Internet connection required for Google Fonts (Crimson Pro and DM Sans) to load correctly
- Fully responsive — layout adapts to desktop, tablet, and mobile screen sizes
- Internet Explorer is not supported
- All
localStorage access is wrapped in try/catch for safe degradation in private browsing mode