Contents
1 Overview
Tumble Lodge: Hamster Resort Tycoon is a complete HTML5 tycoon game seen from the side, like a building cut open. The player runs a resort for hamsters: builds rooms, hires staff, upgrades everything and keeps the guests happy. Nobody walks: every guest rolls inside a transparent ball, rides glass tubes between the floors and waits in a queue of balls in front of each room.
The resort grows up to 6 floors of 5 rooms, with 24 room types in five groups (rest, food, fun, wellness and service), from Nap Pods and the Seed Buffet to the Glitter Ball Disco, the Tube Coaster and the Tiny Cinema. 24 different guests arrive with their own wishes, and 7 staff roles run the rooms: Receptionist, Cook, Trainer, Therapist, Housekeeper, Handyman and Guard. Each day ends with a newspaper, The Daily Squeak, that shows the income, the happy and grumpy guests and the stars of the resort.
There are 40 goals with a bronze, a silver and a gold trophy; the gold trophy completes the campaign and the resort stays open. Golden seeds buy 10 permanent upgrades, the Album collects the 24 guests, and 6 random events (a tube jam, a seed thief, a golden roller, a VIP guest, a birthday party and an inspector) keep the days different. The game has zoom and pan, touch, mouse and keyboard controls, 14 interface languages, music and sound effects, no ads and no server: it works offline and keeps the progress in the browser.
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
tumble-lodge-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/tumble-lodge/. -
3. Upload only the contents of the
game/folder, so thatindex.htmlsits directly inside the target folder. -
4. Keep
assets/andsrc/besideindex.html, with names and letter case unchanged. -
5. Open
https://your-domain.example/games/tumble-lodge/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. The building is drawn on a 2D canvas, the interface is HTML and the sound plays with Web Audio, all built into these browsers.
-
About 35 MB of space on the server. The game makes no request to other websites: the fonts, pictures,
sounds and music 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
A new resort starts with an empty ground floor. Biscuit, the hamster mascot, explains each step: build the Reception (free), hire a receptionist and open a room that earns seeds. The clock and the guests start after these three steps.
Build: open Build, choose a room in one of the five tabs and tap an empty slot. Tap a room to see it, upgrade it (up to level 3), move it, sell it or see its staff member. Staff hires a team member for each role; every candidate has a trait, such as Speedy or Thrifty, and a daily salary. When the floors are full, buy the next floor, up to 6.
Guests pay in seeds when they finish a visit; tap the seeds to collect them, or keep Auto-collect seeds on in Settings. A guest who waits too long leaves grumpy. Tap a ball to give its guest a little push and to see its name; tap a jammed tube, a seed thief or a golden roller to deal with it. At the end of each day the newspaper opens and Next day starts the next one. Goals give golden seeds, which buy the permanent Upgrades. If the seeds run out, a Seed Loan without interest keeps the resort going.
Camera: drag to look around, pinch or use the mouse wheel to zoom, and use the zoom and fit buttons at the top. Keyboard: arrow keys or WASD move the camera, + and - zoom, F, 0 or Home show the whole resort, Space pauses, 1, 2 and 3 set the speed, B opens Build and Escape goes back. The game is saved automatically in the browser.
5 Screens
Marks on the screenshot
- Play
- Sound: music and effects volume
- Settings
Marks on the screenshot
- Seeds
- Golden seeds
- Manager level
- Resort stars
- Day and phase
- Goals list
- Build
- Staff
- Upgrades
- Album
- Sound: music and effects volume
- Settings
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: canvas, interface layers, loading screen
src/config.js name, look-and-feel numbers (FEEL), sound mix (MIX), DEBUG_MODE
src/data/ START HERE: rooms, guests, staff, goals, upgrades, events, economy
src/data/text/ names and descriptions in the 14 languages
src/game/ the rules: simulation, actions, day, guests, staff, events
src/render/ drawing: camera, input, building, balls, guests, staff, rooms
src/ui/base/ panels, buttons, the font (fonts/)
src/ui/front/ start screen, menu, settings, language
src/ui/game/ HUD, build, room, staff, upgrades, goals, album, newspaper
src/lib/ languages (i18n.js, locales/), saving (storage.js), device
src/audio/ the sound engine
src/main.js starts the game and connects everything
assets/rooms/ the 24 rooms (+ animation frames, spots.json)
assets/guests/ the 24 guests
assets/staff/ the 7 staff roles and their tools
assets/building/, assets/ball/ the building, the glass tubes, the balls
assets/events/, assets/fx/ events and effects
assets/ui/, assets/mascot/ interface, icons, goal pictures, Biscuit
assets/audio/ sounds and music (MP3) + manifest.json
assets/logo.webp, favicon.png, apple-touch-icon.png
assets/AUDIO-AND-ART-CREDITS.txt credits of the sounds, music and art
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
test/ npm test (automated checks)
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/sim.mjs robot player used by the 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/ the Fredoka license and the credits
-
src/data/: the first folder to edit.rooms.jshas the 24 rooms (price, guests at once, visit time, pay, the level that opens them),guests.jsthe 24 guests,staff.jsthe 7 roles and the 8 traits,progression.jsthe manager levels, the 40 goals, the trophies and the 10 upgrades,events.jsthe 6 events andbalance.jsthe economy (starting seeds, floor prices, day length, loan, costs). -
src/data/text/: the names and descriptions of rooms, guests, staff, goals, events and the newspaper headlines, one file per language.src/lib/locales/: the texts of the buttons and panels, one file per language. -
src/game/: the rules.sim.jsis the simulation andactions.jseverything the player can do (build, upgrade, move, sell, hire, buy floors and upgrades). The day, guests, staff, events, goals and newspaper each have their own file. -
src/render/: the drawing of the building, the balls, the guests, the staff, the room animations and the effects, plus the camera and the input.src/ui/: the interface (base/panels and buttons,front/start screen, menu and settings,game/the HUD and every game panel).src/audio/: the sound engine. -
index.html: the page.src/config.js: the name, the look-and-feel numbers (FEEL,LAYOUT), the sound mix (MIX) and the developer test mode.src/main.jsstarts the game and connects everything.src/lib/storage.js: saving. -
assets/: rooms (rooms/), guests (guests/), staff (staff/), the building and tubes (building/), the balls (ball/), events (events/), effects (fx/), interface and icons (ui/), the mascot (mascot/), the logo, sounds and music (audio/).assets/audio/manifest.jsonlists every sound andassets/rooms/spots.jsonthe places inside each room.
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.
-
Rooms, guests and roles have ids in English that are also their picture names:
seed-buffetis the Seed Buffet (assets/rooms/seed-buffet.webp),wheel-gymthe Gym,discothe Glitter Ball Disco,juice-barthe Carrot Juice Bar,lamp-loungethe Warm Lamp Lounge;goldie,big-gusandmamaare guests. -
Seeds are
moneyin the code and golden seeds aregolden. Events arehappeningsin the rules:tubeJam,thief,goldenRoller,vip,birthdayandinspector. The newspaper ispaperin the interface andreportin the rules. -
A floor is a
floorfrom 0 (ground) to 5, and a room place is aslotfrom 0 to 4. The manager level islevel(1 to 20). - The rules never write texts: they send a text key and the interface finds the words in the language files. This is why a new name always goes into the 14 language files.
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, and
the name of the game in the code is TITLE in src/config.js. The logo is
assets/logo.webp (1200 x 460 pixels, transparent background); the tab icon is
assets/favicon.png and the phone icon assets/apple-touch-icon.png.
Pictures: replace a file in assets/ with another WebP of the same name and the same size. Each
room is one picture of 768 x 512 pixels in assets/rooms/; each guest is one sheet of poses in
assets/guests/.
Balance: room prices, pay and visit times are ROOMS in src/data/rooms.js; salaries
are ROLES in src/data/staff.js; the economy (starting seeds, floor prices, daily
costs, loan) is BAL in src/data/balance.js; goals and upgrades are in
src/data/progression.js.
Feel: FEEL in src/config.js holds the camera, the springs, the motion and the
timings of the interface and the scene; LAYOUT holds the size of the building. Do not change
the rules to change how something looks.
Sounds and music
The sound effects are the MP3 files of assets/audio/sfx/, listed in
assets/audio/manifest.json by name. Replace a file and keep its name. The volume of each sound
is MIX.gains in src/config.js.
The music is in assets/audio/music/: menu-a.mp3 plays in the menu,
day-a.mp3 during the day and night-a.mp3 at night. Which file each track uses is
music in assets/audio/manifest.json; the starting volumes of music and effects are
MIX.music and MIX.sfx.
tumble-lodge.save (with a backup copy,
tumble-lodge.save.bak), the settings under tumble-lodge.prefs.v1 and a few
interface choices under tumble-lodge.ui.v1. All of them come from saveKey in
TITLE in src/config.js: if you host two copies of the game on the same domain,
change saveKey in one of them.
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.
Each language has two files: src/lib/locales/<code>.js (buttons and panels) and
src/data/text/<code>.js (names of rooms, guests and staff, goals, events and headlines).
Change the text after the colon and keep the key and the words between braces such as {n}. A
key that is missing in a language shows the English text. The list of languages is LANGS in
src/lib/i18n.js.
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. Japanese, Korean, Chinese and Russian use the fonts of the device.
10 Saving and resetting
- The resort, the seeds, the staff, the goals, the trophies, the album and the upgrades are saved automatically in the browser of each player (localStorage). Nothing is sent to a server. When the player comes back, the resort shows the seeds earned while away.
-
The game is stored under the key below, with a backup copy under
tumble-lodge.save.bak. The settings usetumble-lodge.prefs.v1and a few interface choicestumble-lodge.ui.v1. Reset progress in Settings starts a new resort. - To start over, delete this key in the developer tools (F12), under Application, Local Storage, or clear the site data in the browser.
tumble-lodge.save
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 of the rules, the robot player, the 14
languages and the package; it takes a few seconds.
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/ 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.
DEBUG_MODE to true at the
top of src/config.js. On your own computer this turns on the test address parameters (for
example ?skip=game to open the resort directly, or ?debug for the test objects
used by automated checks); the list is in the comment above the switch. Set it back to
false before you publish: then the game never reads its address.
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 the complete license text in THIRD-PARTY-LICENSES/: the Fredoka font
(SIL Open Font License 1.1, also in src/ui/base/fonts/OFL.txt). The game uses no library. The
sounds, the music and the artwork were made for this game; see
assets/AUDIO-AND-ART-CREDITS.txt.
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 code file: there is 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: turn on Less motion in Settings, and keep the speed at 1x.
- The old version still appears after an update: clear the cache (see the section above). Two copies on the same domain share their progress: give each copy its own save keys.
-
The game asks to try again while loading: a picture could not be loaded. Check that the whole
assets/folder was uploaded, with the same names and letter case, and reload.
15 FAQ
Does the game need a database or a server language?
Does it use a game engine?
Is there online play or a ranking?
Can I add a room or a guest?
src/data/rooms.js and guests in src/data/guests.js. Changing
their numbers is easy (see the Customization Guide). A new room or guest also needs its pictures in
assets/, its places in assets/rooms/spots.json and its name in the 14 language
files, so it is a job for a programmer.
Does it work on phones?
Can I change the prices and the difficulty?
ROOMS in src/data/rooms.js, salaries in
src/data/staff.js, and the starting seeds, floor prices, daily costs and arrivals in
BAL in src/data/balance.js.
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 "Tumble Lodge: Hamster Resort Tycoon", a finished HTML5 side-view tycoon game (version 1.0.0). Read these facts before you edit anything.
PROJECT
- Plain JavaScript ES modules, HTML and CSS. The building is drawn on a 2D canvas, the interface is HTML (DOM), sound through Web Audio. No bundler, no compile step, no library, no npm dependencies.
- 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/ and assets/ 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
- Data: src/data/. rooms.js has ROOMS (24 rooms: price, cap, time, pay, unlock level, tab, staff role), guests.js GUESTS (24 guests), staff.js ROLES (7 roles, salary) and TRAITS.
- More data: progression.js has the manager levels, GOALS (40), TROPHIES (bronze 12, silver 26, gold 40), UPGRADES (10, paid with golden seeds) and UPGRADE_COST, events.js EVENTS (6), balance.js BAL (starting seeds, day phases, floor prices, costs, loan, arrivals, patience), headlines.js the newspaper headlines.
- Rules: src/game/. sim.js is a pure, deterministic simulation (createGame, step, actions, serialize, restore). It never touches the DOM, Math.random or the clock (a test checks this). actions.js holds every player action and returns { ok, reason }. The rules never write texts: they emit a text key and parameters.
- Drawing: src/render/ (scene.js, building.js, guests.js, ball.js, staff.js, room-animations.js, camera.js, input.js). The scene only reads game.state; it never changes it.
- Interface: src/ui/ (base/ panels and buttons, front/ start screen, menu, settings, language, game/ HUD and every game panel). The interface calls the actions.
- Names in the code: seeds = money, golden seeds = golden, events = happenings, the newspaper = paper (interface) and report (rules), a floor = floor 0..5, a room place = slot 0..4. Room and guest ids are also their picture names in assets/rooms/ and assets/guests/.
- Look-and-feel numbers: FEEL and LAYOUT in src/config.js; the sound mix is MIX in the same file. Do not change the rules to change how something looks.
- Texts: src/lib/locales/<lang>.js (interface) and src/data/text/<lang>.js (content), 14 languages, with {placeholders}. A missing key falls back to English. Add every new text to the 14 files of both folders.
- Saving: localStorage keys tumble-lodge.save (+ tumble-lodge.save.bak), tumble-lodge.prefs.v1 and tumble-lodge.ui.v1, built from TITLE.saveKey in src/config.js (src/lib/storage.js, src/ui/game/memory.js).
- Developer test mode: DEBUG_MODE in src/config.js (false). Only when true does the game read address parameters (?debug, ?skip=menu|game, ?test, ?langs=14, ?debug=play) and create window.__casca, window.__ui and window.__uiOpen. Keep it false when publishing.
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 the license in src/ui/base/fonts/.
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 the Disco cheaper, give more seeds per visit or
change the color of the buttons. 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.