From e2e1dda94858e0d58f2c10fa359d3f706357b0df Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Tue, 10 Nov 2026 15:33:25 +0700 Subject: [PATCH 1/2] Publish the online edition (beta) and link to it from the free edition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - README: "Play online (beta)" and "Free edition" buttons at the top, and both editions with their links in "Where it runs" - The free edition (GitHub Pages) now shows "🌐 Play online with friends" in the menu, linking to the online edition for Play Together and accounts. The link comes from site-config.json (onlineUrl); the online site's own config has none, so it isn't shown there - sw.js v25 Co-Authored-By: Claude Opus 5.5 --- README.md | 12 +++++++++--- index.html | 1 + site-config.json | 2 +- src/main.js | 2 ++ src/together.js | 3 ++- style.css | 5 +++++ sw.js | 2 +- 7 files changed, 21 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 93e87e6..b234e56 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,13 @@

- Play now + Play online (beta) + Play the free edition +

+ +

+ 🌐 Online edition (beta): Play Together with friends, optional accounts  Β·  + β–Ά Free edition: the whole game, offline, no account

@@ -371,8 +377,8 @@ src/noise.js Seeded Perlin noise and hashes | Edition | What | How it's updated | |---|---|---| -| **Free** ([GitHub Pages](https://dynamic-web-lab.github.io/MiniCrafter/)) | The whole game, offline-ready, no server features. It will be retired once the online edition launches. | Automatically from `main` | -| **Online** (our own server) | The same game plus server features: Play Together now, then accounts (register / log in). Those features need a login. | `tools/deploy-site.sh` | +| **🌐 Online (beta)**: [portal.dynamicweblab.com](https://portal.dynamicweblab.com/) | The same game plus server features: Play Together and optional accounts (Play Together needs a login). | `tools/deploy-site.sh` | +| **β–Ά Free**: [GitHub Pages](https://dynamic-web-lab.github.io/MiniCrafter/) | The whole game, offline-ready, no account and no server features. It links to the online edition, and will be retired once the online edition launches. | Automatically from `main` | The online features switch on through `site-config.json`: the copy in Git keeps them off, and the deploy script uploads an "on" version to our site. The relay ([`server/`](server/README.md)) only accepts the site that hosts the game. diff --git a/index.html b/index.html index f0a77e2..761829e 100644 --- a/index.html +++ b/index.html @@ -78,6 +78,7 @@

MiniCrafter

Generating world…

+
World
β€”
diff --git a/site-config.json b/site-config.json index 3eaddb8..6691512 100644 --- a/site-config.json +++ b/site-config.json @@ -1 +1 @@ -{ "online": false } +{ "online": false, "onlineUrl": "https://portal.dynamicweblab.com/" } diff --git a/src/main.js b/src/main.js index ee8d002..9df1871 100644 --- a/src/main.js +++ b/src/main.js @@ -964,6 +964,8 @@ $('btn-together').addEventListener('click', openTogether); $('btn-together').classList.add('hidden'); loadSiteConfig().then(() => { $('btn-together').classList.toggle('hidden', !SITE.online); + // The free edition links to the online edition for Play Together and accounts. + if (!SITE.online && SITE.onlineUrl) { $('btn-online').href = SITE.onlineUrl; $('btn-online').classList.remove('hidden'); } account.enabled = SITE.accounts; $('btn-account').classList.toggle('hidden', !SITE.accounts); if (SITE.accounts) account.refresh(); diff --git a/src/together.js b/src/together.js index 1b06884..0d8dc24 100644 --- a/src/together.js +++ b/src/together.js @@ -35,7 +35,7 @@ export function saveProfile(p) { try { localStorage.setItem(PROFILE_KEY, JSON.st // Online features (Play Together, and accounts later) only run on our own hosted site. // ./site-config.json says whether they're on: the copy in Git (and so on GitHub Pages) says // off, and tools/deploy-site.sh uploads an "on" version to our own site. -export const SITE = { online: false, rooms: '', accounts: false }; +export const SITE = { online: false, rooms: '', accounts: false, onlineUrl: '' }; const isDev = () => ['localhost', '127.0.0.1'].includes(location.hostname); export async function loadSiteConfig() { @@ -43,6 +43,7 @@ export async function loadSiteConfig() { const r = await fetch('./site-config.json', { cache: 'no-cache' }); if (r.ok) { const c = await r.json(); + if (c && typeof c.onlineUrl === 'string' && /^https:\/\/[\w.-]+\/$/.test(c.onlineUrl)) SITE.onlineUrl = c.onlineUrl; // free edition: where the online one is if (c && c.online === true && typeof c.rooms === 'string' && /^\/[\w/-]*$/.test(c.rooms)) { SITE.online = true; SITE.rooms = c.rooms; SITE.accounts = c.accounts === true; } } } catch { /* offline or no config: free edition */ } diff --git a/style.css b/style.css index d2463f9..f9fc014 100644 --- a/style.css +++ b/style.css @@ -450,3 +450,8 @@ label.check input { width: 22px; height: 22px; flex: none; margin: 0; accent-col .legal-links a, .acc-privacy a { color: #9cc3ff; } #account a { color: #9cc3ff; } #account .hint { color: #9aa3b5; font-size: .85em; } + +/* Free edition: link to the online edition */ +a.online-link { display: block; text-align: center; text-decoration: none; color: #fff; padding: 8px 14px; border-radius: 6px; border: 2px solid #3b82f6; background: #24324f; font-weight: 600; margin-top: 8px; } +a.online-link:hover { background: #2c3d60; } +a.online-link small { display: block; font-weight: 400; color: #9cc3ff; } diff --git a/sw.js b/sw.js index cd41f84..62e8a4a 100644 --- a/sw.js +++ b/sw.js @@ -1,6 +1,6 @@ // Service worker: caches the whole game so it works offline once loaded. // Bump VERSION whenever files change so players get the update. -const VERSION = 'minicrafter-v24'; +const VERSION = 'minicrafter-v25'; const CORE = [ './', './index.html', './style.css', './privacy.html', './terms.html', './legal.css', './manifest.webmanifest', './site-config.json', './icons/icon-192.png', './icons/icon-512.png', './icons/icon-maskable-512.png', './icons/apple-touch-icon.png', './icons/favicon-32.png', From 7a0fa0e549c60039b08d475c33a4d35c4a339c3f Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Tue, 10 Nov 2026 15:36:05 +0700 Subject: [PATCH 2/2] README: add the Discord community (parents, teachers and players 13+) The invite is only in the README and labelled 13+, because Discord requires users to be 13 or older and is open chat; the game itself doesn't link to it. Co-Authored-By: Claude Opus 5.5 --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b234e56..e40d729 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,8 @@ Parents & teachers Β· Controls Β· Run it yourself Β· - Roadmap + Roadmap Β· + Community

--- @@ -388,6 +389,12 @@ Next up are flowing water and slides, marble runs, music boxes, smoother tablets Have an idea? [Open an issue](https://github.com/Dynamic-Web-Lab/MiniCrafter/issues). +## πŸ’¬ Community + +Join us on **[Discord](https://discord.gg/RPWMmJSJqd)** to share builds, report bugs, suggest features and follow the beta. + +> **For parents, teachers and players aged 13+.** Discord requires users to be at least 13, and it is open chat, so the game itself never links to it. Younger players: ask a grown-up to share your ideas for you, or use the **πŸ’¬ feedback** in the game. + ## πŸ™ Credits Built by [Dynamic Web Lab](https://dynamicweblab.com) and released under the [MIT License](LICENSE). Made with [three.js](https://threejs.org/) and [Blockly](https://developers.google.com/blockly). MiniCrafter is an original game inspired by block-building sandboxes, with its own code, art and sounds.