Contents
1 Overview
Lucky Dragon Escape is a complete HTML5 dragon tap puzzle game. Colorful dragons are tucked into a festival board, each one pointing the way it will fly. The player taps a dragon and it flies out of the board head first, but only if no other dragon is in its path. The goal is to send every dragon home. Tapping a blocked dragon costs a mistake, and finishing a level with no mistakes earns 3 stars.
It has 100 levels in 5 worlds of 20 levels: Lantern Festival, Bamboo Grove, Jade Lake, Blossom Mountain and Moonlit Temple. The boards grow from a few dragons to dozens, and many boards are shaped like a picture. New pieces arrive with the worlds: sleepy dragons that need one extra tap (from level 21), lucky clouds, where what is under the cloud blocks nobody (from level 41), pairs tied with lucky knots that only leave together (from level 61) and gong dragons that must leave before their number runs out (from level 81).
Around the puzzle: free undo and hint, a daily challenge on a new board every day, a level select with one page per world, a final screen after level 100, festival fireworks when you clear a level, petals and leaves that drift across each world (with a switch to turn them off), painted dragons in 6 colors, a mascot that reacts, combo words and rising notes when dragons leave in a row, 12 sound effects, 2 festival music tracks, vibration, a less-motion option, full screen, 14 interface languages and layouts for phone, tablet, desktop and ultrawide screens, in portrait and landscape.
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
lucky-dragon-escape-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/lucky-dragon-escape/. -
3. Upload only the contents of the
game/folder, so thatindex.htmlsits directly inside the target folder. -
4. Keep
assets/,css/andsrc/besideindex.html, with names and letter case unchanged. -
5. Open
https://your-domain.example/games/lucky-dragon-escape/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: Chrome, Edge, Firefox, Safari or Opera, on desktop or mobile.
-
About 6 MB of space on the server. The game makes no request to other websites: 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
Tap a dragon and it flies out of the board head first. If another dragon is in its way, it bumps into it, the dragon in the way flashes, the tap costs one mistake and nothing moves. Tap the dragon that is in the way first. Every board can be solved: there is always a dragon that can leave.
Every level gives 1 to 3 stars: 3 for no mistakes, 2 for one or two mistakes and 1 for more. Finishing a level opens the next one whatever the stars. Undo takes back the last dragon and Hint makes a dragon that can leave right now glow. Both are free and unlimited.
New pieces: a sleepy dragon (closed eyes and Zzz) needs one tap to wake up, which costs nothing, and then a tap to leave. A lucky cloud floats over some cells: a dragon under it blocks nobody. Two dragons tied with lucky knots are chained: they leave together, when the way is clear for the pair. A gong dragon wears a number: it must leave before that many other dragons have left, or the game says Too slow! and the level starts again.
During a level, Pause (top left) opens Resume, Restart, Levels and Home. The sound button (top right) opens the music and effects volume sliders and the gear opens Settings. The Daily button on the menu opens a new board every day; it never changes the progress of the 100 levels, which is saved automatically after every level. The game is played with a finger or a mouse.
5 Screens
Marks on the screenshot
- Logo
- Start prompt
- Sound: music and effects volume
- Settings
Marks on the screenshot
- Play
- Level select
- Daily challenge
- How to play
Marks on the screenshot
- World name
- Levels of this world
- Next level
- Change world
- World pages
Marks on the screenshot
- Pause
- Level number
- Stars
- Undo
- Hint
Marks on the screenshot
- Stars
- Replay
- Next level
Marks on the screenshot
- Vibration
- Less motion
- Wind and leaves
- Full screen
- Language
6 Files and folders
game/ is the ready-to-host game. source/ has the same editable files plus the
tests, a local preview server, the level generator 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: every screen and panel
css/ layout and look (base.css, screens.css)
src/config.js START HERE: layout, colors, game feel, volumes
src/main.js start-up, loop, input, saving, flow between screens
src/app/ the board scene (game.js) and the screens (ui.js)
src/game/ rules, level generator, worlds, difficulty
src/game/levels/ the 100 levels (pack-1.js to pack-5.js)
src/render/ dragons, painted skin, board tray, particles, ambient petals
src/audio/ sound effects and music
src/lib/ languages, text fitting, fullscreen, vibration, saving
src/lib/locales/ interface texts, one file per language
assets/ backgrounds, dragons, interface art, mascot (WebP), icon
assets/sfx/, assets/music/ sound effects and music (MP3)
assets/fonts/ Lilita One, Fredoka and their licenses
DOCUMENTATION.txt short note that points to this guide
source/ the same editable files, plus:
package.json, package-lock.json
README.md
tests/ npm test (25 checks)
tools/build.mjs copies the game into dist/
tools/serve.mjs local preview server (npm run dev, npm run preview)
tools/generate-levels.mjs the level generator (npm run levels)
tools/check-node.mjs checks the Node.js version before the commands
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/ Lilita One and Fredoka licenses
-
src/config.js: the first file to edit.LAYOUT(board and screen sizes),COLORS(the 6 dragon colors),FEEL(every animation and game-feel number, including the festival fireworks),AUDIO(volumes and pitch steps) andSTARS(the mistakes allowed for 3 and for 2 stars). -
src/game/:rules.js(the rules, with no drawing and no sound),levels/pack-1.jstopack-5.js(the 100 levels),generator.js(the level generator, also used for the daily challenge),difficulty.jsandworlds.js. -
src/main.js: start-up, the main loop, input, saving and the reaction to each event.src/app/game.js: the board scene.src/app/ui.js: screens, panels, level select, settings and the mascot. -
src/render/: dragons, painted skin, board tray, particles, ambient petals and leaves and the pictures of How to play.src/audio/: sound effects and music. -
index.html: every screen and panel.css/: layout and look.src/lib/: languages, text fitting, fullscreen, vibration and saving.src/lib/locales/: one text file per language. -
assets/: backgrounds, dragon pictures, interface art and the mascot (WebP),assets/sfx/andassets/music/(MP3) andassets/fonts/(fonts with their licenses).tools/generate-levels.mjs: the level generator.
7 Internal names in the code
A few names in the code differ from the words on screen. They are only names: players never see them. In the
code the dragons are called snakes (you will see snake in file and function names
such as snakes.js), and the lucky cloud is a bridge.
-
The board under the dragons is the
tray, the painted head, body and tail of a dragon are itsskin, a gong dragon is arushdragon (rin a level) and a lucky-knot pair is achain(cin a level). -
In a level,
wandhare the board size,slists the dragons,solis the stored solution (the order of the dragons) andtlists the lucky cloud cells. A dragon is a short text such as2a3DDLLU: color, x, y and then the moves from the head to the tail. -
Sounds are named by what happens:
slide,pop,bump,star,winand so on. The files areassets/sfx/<name>-1.mp3,-2.mp3. - Levels are numbered 1 to 100 in order. The save keeps the stars by level number (0 to 99).
- The game has no debug links and no test hooks: what players see is the whole game.
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 is assets/logo.webp (1000 x 591 pixels, transparent background) and the page icon is
assets/icon-180.png. The mascot is assets/mascot-idle.webp and its four other
poses.
Pictures: replace a file in assets/ with another WebP of the same name and a similar size. The
5 world backgrounds are assets/bg-portrait.webp, bg-landscape.webp and the same
with bg-w2 to bg-w5.
Levels: src/game/levels/pack-1.js to pack-5.js, 20 levels each. They are made by
npm run levels from the recipe in tools/generate-levels.mjs, which writes the
packs again (about 45 seconds); you can also edit a pack by hand. Run npm test after every
change: it plays the stored solution of every level and tells you which one no longer wins.
Difficulty and feel: COLORS, LAYOUT and FEEL in
src/config.js, and the recipe of each level (board size, dragon length, free dragons at the
start, how deep the blocking chains are) in tools/generate-levels.mjs.
Sounds and music
Every effect is an MP3 in assets/sfx/, named with its id and a number, for example
slide-1.mp3. Most sounds have two versions and the game alternates them. Replace a file keeping
its name. The music is assets/music/menu.mp3 and game.mp3.
To add a version, put the file in the folder and raise its number in SFX_FILES in
src/audio/sfx-files.js. The volume of each sound is in AUDIO.gains in
src/config.js.
dragon-escape.template: (STORAGE_PREFIX
in src/config.js). If you host more than one copy of the game on the same domain, change the
prefix in each copy.
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 add
its code and name to LANGS in src/lib/i18n.js (and to the list in
tests/locales.test.js). The Settings panel shows it by itself.
The titles use the Lilita One font and the texts use Fredoka, both included (Latin alphabets). Cyrillic, 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.
-
The progress is stored under the prefix below:
levelis the furthest level andstarsholds the stars of each level. The language is stored underdragon-escape.template:lang. - To start over, delete these keys in the developer tools (F12), under Application, Local Storage, or clear the site data in the browser.
dragon-escape.template:level
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 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 25 checks on the 100 levels, the rules, the 14
languages 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,
css/, src/ and assets/ 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 Lilita One
and Fredoka fonts (SIL Open Font License 1.1, also in assets/fonts/). The project has no other
third-party library.
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 or click (cutting the rope on the title screen does this). Check both volumes in the Sound panel and the volume of the device.
-
A blank page after you edit a level pack: a typo made the file invalid JavaScript. Run
npm testbefore publishing. - The game feels slow on an old phone: turn on Less motion and turn off Wind and leaves in Settings to reduce the effects (Less motion also turns off the fireworks).
-
The old version still appears after an update: clear the cache (see the section above). Two copies on the
same domain share their saved games: give each copy its own
STORAGE_PREFIX.
15 FAQ
Does the game need a database or a server language?
Does it use a physics engine or a library?
Can I make my own levels?
npm run levels, or write levels by hand (see the Customization
Guide) and run npm test. A level also needs a stored solution (sol): the tests
and the hint use it.
Does it work on phones?
Does it have ads, accounts or an online ranking?
16 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.