HTML5 Game Source Code: We Opened a Real Package to Show What Is Inside
A look inside real packages from the Polar Games Marketplace: folders, files, build steps, licences and the questions worth asking before you pay.

HTML5 game source code can mean three different things: a build that is ready to upload, the developer files you edit, or a project that opens only in one particular editor. An HTML5 game template with source code from our marketplace is the first two together, as plain web files, and this guide opens real packages to show what that looks like.
We sell these templates, so read this as a tour of our own packages, not a neutral survey of the market. We went through several editions, mainly Velvet Pool, Puttide and Sunset Rally, read their public manuals and the store terms, and wrote down what is in the box, what you need to run it and what is not there. Each manual is linked from its item page, so you can check every line before you pay.
What “HTML5 game source code” can mean
Sellers use the words source code loosely. Three questions sort out what is actually being sold.
A build, a developer source, or both?
A build is the finished game as the browser loads it: an index.html, scripts, images and sound files. You can host it as it is. Developer source is the version made for people to edit, with files split by job. A package with only the build is something you can upload but not comfortably change. A package with only source may need tools before it runs at all. The editions in this guide put both in one ZIP: usually a game/ folder to publish and a source/ folder to edit (in Ricopop, game/ is itself the source).
Readable or minified?
Minifying squeezes scripts into a few dense lines with short names, which downloads faster and reads terribly. Obfuscation goes further and scrambles names on purpose. Neither hurts a live site. Both hurt if you bought the code to change it. Before paying, open one script of the live demo in your browser's developer tools and see whether you could follow it.
Plain files or an editor project?
Some templates arrive as a project for a specific game editor, and you can open them only in that editor. Others are plain web files that any code editor opens. The editions in this guide are the second kind: HTML, CSS, JavaScript and JSON, with TypeScript in some of them.
What is in a Polar Games package
Take Velvet Pool, our 8-ball pool edition. Its manual describes four folders in the ZIP:
- game/ is the ready-to-upload edition and the only folder you publish.
- source/ is the same game as an editable developer edition, with a README, a package.json and tests.
- documentation/ holds the illustrated guide and its images.
- THIRD-PARTY-LICENSES/ holds the font licence texts and a README.txt summary.
In your library the same package is offered as two downloads: the complete package (source and manual) or the game only, ready to host.

game/ and source/ share the same layout. For Velvet Pool the manual says to edit files in source/ and copy the changed ones to the same path in game/. Nothing is compiled in between.
Inside Velvet Pool: the file map
A file map is the cheapest way to judge a codebase before you buy it. This is the one in the Velvet Pool manual, with paths relative to source/ or game/:
- src/core/physics.js: ball simulation, spin and cushion response.
- src/core/rules.js: 8-ball rules and foul decisions.
- src/core/ai.js: how the CPU chooses a shot.
- src/game/controls.js: aiming, power and spin input.
- src/game/progress.js: achievements, cloths, cues and match scoring.
- src/game/i18n.js: the text in 14 languages.
- src/game/localRecords.js: the local score history.
- src/game/audio.js: sound effects and music playback.
- css/style.css and css/fonts.css: theme, responsive layout and font declarations.
- assets/: art, audio and fonts, with a logo/ subfolder.
Notice the split. Rules, physics and the CPU live in src/core. Input, saves, texts and sound live in src/game. The manual asks you to change one feature at a time, and this layout makes that realistic: a cushion tweak and a translation fix touch different files.
The manual also states that the code in source/src and game/src is plain, formatted JavaScript, with no minified or bundled files. Velvet Pool is Vanilla JavaScript on WebGL2 and uses no code library, Three.js included. The changelog backs the claim: version 1.0.1 split long single-line strings in audio, translations and shaders into readable lines, with behaviour unchanged.
Puttide: the same layout, plus libraries
Puttide, our 3D mini golf edition, uses the same four folders and adds one thing: two third-party libraries the game needs. Three.js r186 (MIT) and Rapier 3D 0.21.0 (Apache-2.0) sit in lib/three/ and lib/rapier/, and the import map in index.html tells the browser where to find them. The Puttide FAQ states that nothing loads from a CDN, so the game needs only your own host. The manual adds that the library files are formatted so they can be read, with behaviour unmodified.
Its file map, again relative to source/ or game/:
- src/course/courses.js: course order and unlock requirements.
- src/course/holes.js: geometry, par and obstacles of the Ruins course. pier.js, ice.js, lava.js and sky.js hold the other four.
- src/sim/constants.js: physics tuning.
- src/game/economy.js: ball, trail and outfit definitions and prices.
- src/ui/i18n.js and three more dictionary files: the language text.
- css/style.css: interface colours, fonts and responsive styles.
- fonts/ and music/: the web fonts with their licences and two music tracks.
The manual's recipe for a new hole: duplicate a definition in the right course file, give it a unique id, set par, tee and cup positions, add it to the course, then add its name and tip to the language dictionaries. Read a recipe like that before you buy. If it looks like work you can do, the package fits you.
When the source needs a build step
“No build step” is true of some editions and not of others, so check the edition, not the store. Here are five of ours side by side, with their list prices. Our own store currently shows 10% off the list price, the studio direct offer on each item page: Velvet Pool, for example, shows $35.10 instead of $39.
- Velvet Pool, list price $39: plain JavaScript modules on WebGL2. Edit source/, copy to game/. Node.js 20+ only for the optional tests.
- Puttide, $39: plain JavaScript modules with Three.js and Rapier in lib/. No build step. Node.js is optional and only for managing the library versions.
- Ricopop, $39: plain HTML, CSS and JavaScript modules, and game/ is itself the source. Optional developer tools (Node.js 20+): a local server, a level checker and tests.
- Pinloop, $24: TypeScript with Vite. The game/ folder has readable JavaScript and CSS. Node.js 22.12+ and npm only to edit and rebuild the source.
- Sunset Rally, $39: TypeScript with Three.js r184 and Vite. The game/ folder is already built and unminified. Node.js only if you rebuild.
For Sunset Rally the manual recommends Node.js 24 LTS. Inside source/ you run npm ci, npm run typecheck and npm run build, then publish only the contents of dist/. It also asks you to keep minify and cssMinify switched off when you rebuild, because the delivered runtime is formatted for reading. Upload the result, never node_modules/.
Hosting it: what “static” means in practice
Static hosting means your host only serves files. The manuals of Velvet Pool and Puttide give the whole install in three steps:
- Extract the ZIP.
- Upload everything inside game/ to a folder on your site, for example public_html/velvet-pool/, by FTP or your host's file manager, keeping the subfolders.
- Open that address in a browser.
No npm, terminal, build step, PHP, database or account is involved. What does trip people up, according to the same manuals:
- Do not double-click index.html. Browsers block game modules on file://. For a local test, run python -m http.server 8765 inside game/ and open http://localhost:8765/.
- Your server must send .js files with a JavaScript MIME type and .wasm as application/wasm. A wrong MIME type shows up as a module refused error.
- Use HTTPS for public hosting.
- Saves belong to the browser origin (protocol, host and port). Move the game to another domain and players start from zero.
- A fresh page load still needs your host, so this is not an installable offline app.
Where the logo, colours, rules and translations live
Every manual has a customisation section, and what it covers differs from edition to edition. This is what each one says.
Velvet Pool
- Logo and branding: replace the files in assets/logo/ and adjust the matching dimensions in the CSS.
- Cloth and cue styles: their definitions are in progress.js. Keep the item IDs stable so saved cosmetics keep working.
- CPU behaviour in ai.js, physics in physics.js. After changing rules or physics, run the 8-ball tests.
- Translations: src/game/i18n.js, with the language list in LANGS.
Puttide
- Colours and fonts: css/style.css.
- Physics: src/sim/constants.js. Cosmetic prices: src/game/economy.js, keeping existing IDs.
- Music: copy a licensed file into music/ and update the track mapping in src/audio/audio.js.
- Holes, par and unlocks: the course files described above.
Gridspark and Sunset Rally
In Gridspark, per its item FAQ, interface text lives in src/locales.js, rule constants and palette in src/config.js, and the puzzle rules in game.js, board.js, generator.js and shapes.js. In Sunset Rally the campaign matches and star conditions are in Campaign.ts, the locations in Places.ts, physics in physics.ts and scoring in match.ts. Its English and Portuguese strings are in src/i18n.ts, the other 12 languages in src/locales/.

Notice what the manuals leave out. The Puttide manual covers colours, physics, holes, prices and music, but it has no step for swapping the logo, and the Sunset Rally manual has no dedicated branding section. If branding is the first thing you will change, ask before you buy.
Automated tests: what they check and what they do not
Velvet Pool's source/ folder includes a test suite. With Node.js 20 or newer, open a terminal inside source/ and run npm test, which is the same as node tests/run.js. No dependency installation is needed. According to the manual, the suite checks physics, 8-ball rules, CPU matches and translation-key consistency, and it does not replace testing in browsers and on real devices.
A translation-key check is the kind of test a game with 14 languages needs: add a key in one language, forget another, and a human may not notice for weeks.
Not every edition has tests. The Puttide manual describes none, only manual checks. Pinloop and Beep Out list npm test among their developer commands, and Ricopop's developer tools include a level checker.
Licence, third-party notices and the changelog
Under the store terms, each purchase gives a perpetual, non-exclusive licence to use the edition in one end product, yours or one client's. You can change the code, art and audio inside it, and players may use it free or through advertising. You may not resell, share or redistribute the template, its source or its assets on their own, as a template, kit or asset pack, or inside another product meant for developers. The licence does not expire when support ends.
Third-party parts keep their own licences, and you keep their notices with your product. In Velvet Pool that means two fonts, Manrope and Fraunces, under the SIL Open Font License 1.1, with the texts in THIRD-PARTY-LICENSES/ and next to the fonts. In Puttide the list adds Three.js (MIT), Rapier (Apache-2.0) and the Rubik and Fredoka fonts (OFL 1.1).
The changelog shows how a package is looked after. Velvet Pool 1.0.1 (18 October 2026) split long strings into readable lines and gathered the licence notices in one flat folder. Version 1.1.0 (22 October 2026) brought the interface to 14 languages. Those entries are on the item page. The terms say updates to the same edition appear in your library when published, with no promise of updates for a fixed period.
How to read the code of a game you bought in an hour
This is a suggested plan, not a promised timing. It follows the Velvet Pool layout and uses only what the package gives you.
- Minutes 0 to 10: extract the ZIP, skim the README in source/ and the manual's file map. Open index.html and see which scripts and stylesheets it loads.
- Minutes 10 to 20: run npm test inside source/ (Node.js 20+) to get a green baseline.
- Minutes 20 to 35: read src/core before src/game. Start with rules.js, then ai.js, then physics.js. That is the game itself. Controls, progress, texts and sound are the plumbing around it.
- Minutes 35 to 40: note that item IDs and save keys must stay stable, or players lose their saved cosmetics.
- Minutes 40 to 55: make one small change, such as a cloth definition in progress.js. Copy the file to the same path in game/, serve game/ with python -m http.server 8765 and look at the result. Never open it through file://.
- Minutes 55 to 60: run the tests again.
ES modules name what they need in their import lines, so you can follow the chain from the first script the page loads. That is why a plain-file edition can be read at this pace.
Questions to ask before you buy source code
- Can I read the manual and play a demo before paying? For our editions, both are linked from the item page.
- Is there a ready-to-host build and a separate developer source?
- Is the code readable or minified? Open one script and look.
- Do I need Node.js, npm, PHP or a database, and which versions?
- Does the game load anything from a CDN or another site?
- Which third-party libraries are inside, and under which licences?
- How many projects may I use it in, and may I redistribute it?
- How long does support last and what does it cover? Ours is 6 months, or 12 with the extension chosen at checkout, covering questions about installing and using the files and reproducible defects.
- What is left out?
- Is there a changelog and a recent release?
- What is the refund rule? Ours: templates are digital products, so we refund only if you have not downloaded the template yet, or if it has a defect we cannot fix. You ask by writing to the studio with your licence number.
What these editions do not include
Some editions add optional extras. Ricopop and Zabum include a one-file PHP leaderboard that is off by default. It is a casual shared scoreboard that stores scores in a file, not a cheat-proof ranking, and not live multiplayer.
Support covers questions about installing and using the supplied files and the correction of reproducible defects in the supplied game. That is a boundary, and it is better to know it on day one.
FAQ
What is the difference between the game folder and the source folder?
game/ is the build you upload to your host. source/ is the editable developer edition of the same game. In Velvet Pool and Puttide they share the same layout, so a file you edit in source/ is copied to the same path in game/. In TypeScript editions such as Sunset Rally, source/ is a project you rebuild, and you publish the new output.
Do I need npm or Node.js to use the game?
Not to host it. Node.js shows up only for the optional tests in Velvet Pool (20 or newer) or to rebuild TypeScript editions such as Sunset Rally (24 LTS recommended) and Pinloop (22.12 or newer).
Is the source code minified?
Not in the editions covered here. Velvet Pool and Puttide are plain formatted JavaScript, and version 1.0.1 of both split long single-line strings into readable lines. The Sunset Rally runtime is delivered formatted, with minification off.
Can I use one purchase for several projects or clients?
The licence covers one end product, yours or one client's. A second product is outside it.
Can I resell or share the source code?
No: not on its own, not as a template, kit or asset pack, and not inside another product meant for developers. You may change the code, art and audio inside your own end product.
Can I read the manual before I buy?
Yes. Each item page links to its manual and to a playable demo of the same edition.
Open a package before you buy one
Pick an edition, open its manual from the item page, play the demo, and read the file map against the questions above. If the manual answers them, the package should too. If it does not, write to the studio before paying.
