diff --git a/README.md b/README.md index 5ee5d37..1fbd995 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@

🌐 Online edition (beta): Play Together with friends, optional accounts  ·  - ▶ Free edition: the whole game, offline, no account + ▶ Free edition: the whole game, offline, no account  ·  + ✨ All features

diff --git a/docs/screenshots/course.jpg b/docs/screenshots/course.jpg new file mode 100644 index 0000000..ac82b50 Binary files /dev/null and b/docs/screenshots/course.jpg differ diff --git a/docs/screenshots/photo.jpg b/docs/screenshots/photo.jpg new file mode 100644 index 0000000..b13c271 Binary files /dev/null and b/docs/screenshots/photo.jpg differ diff --git a/docs/screenshots/together.jpg b/docs/screenshots/together.jpg new file mode 100644 index 0000000..c0ff9ab Binary files /dev/null and b/docs/screenshots/together.jpg differ diff --git a/features.css b/features.css new file mode 100644 index 0000000..5658c22 --- /dev/null +++ b/features.css @@ -0,0 +1,21 @@ +/* Features page (builds on legal.css) */ +.features { max-width: 1040px; } +.f-hero { text-align: center; } +.f-logo { border-radius: 22px; box-shadow: 0 6px 20px rgba(0, 0, 0, .45); } +.f-hero h1 { font-size: 2.6rem; margin-top: 10px; } +.f-tagline { max-width: 720px; margin: 10px auto; font-size: 1.1rem; } +.f-cta { margin: 18px 0; text-align: center; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; } +.f-btn { display: inline-block; padding: 12px 22px; border-radius: 10px; background: #3f7d2a; border: 2px solid #66b043; color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; } +.f-btn:hover { background: #4a9132; } +.f-btn.alt { background: #24324f; border-color: #3b82f6; } +.f-shot { width: 100%; height: auto; border-radius: 12px; margin-top: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); } +.f-why li { margin: 8px 0; } +.f-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; } +.f-grid article { background: rgba(255, 255, 255, .04); border: 1px solid #2c3446; border-radius: 12px; overflow: hidden; } +.f-grid article img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; } +.f-grid article h3 { margin: 12px 14px 4px; font-size: 1.05rem; color: #9be06a; } +.f-grid article p { margin: 0 14px 14px; font-size: .95rem; } +.f-grid .f-text { grid-column: 1 / -1; padding-bottom: 4px; } +#faq h3 { margin: 18px 0 4px; font-size: 1.05rem; color: #9be06a; } +#faq p { margin: 0; } +section { margin-top: 8px; } diff --git a/features.html b/features.html new file mode 100644 index 0000000..b17f395 --- /dev/null +++ b/features.html @@ -0,0 +1,193 @@ + + + + + + MiniCrafter: free, kid-safe block-building game in your browser · All features + + + + + + + + + + + + + + + + +

+ ← Play MiniCrafter + +
+ +

MiniCrafter

+

A free, kid-safe block-building game that runs right in your browser. Build worlds, make your own games, learn to code with a robot and play together, with no ads, no install and no chat with strangers.

+

▶ Play now, free Questions? Read the FAQ

+ A MiniCrafter world with snowy mountains, forests and a sandy beach under a blocky sun +
+ +
+

Why MiniCrafter is different

+ +
+ +
+

All features

+
+
A floating obstacle course with a start pad, trampolines, neon blocks, speed strips and gold coins +

🏁 Course Maker: build your own games

+

Place a Start pad, Checkpoints and a Finish pad, scatter coins, then race the clock. Fall off and you return to your last checkpoint. Finishing celebrates with confetti and saves your best time. Mix in trampolines, speed strips, ice, fans and portals for wild obstacle courses.

+
Another player, Purple Turtle, waving with a hand emoji above their head in a shared world +

👫 Play Together, safely

+

Up to 4 players build in one world with a room code. Players pick names like "Blue Fox", send emoji instead of chatting, and the host lets each player in. Animals, day and night and circuits are shared. (Online edition, with a free account.)

+
Bit the robot building a brick wall while its block-code program runs in the side panel +

🤖 Learn to code with Bit

+

Drag Blockly blocks to make Bit move, build, dig, wait and flip circuit levers, using loops, if/else and sensors. Starter programs to remix, and a "see the code" view.

+
Photo Mode with a Polaroid frame, stickers and the caption Our sky obstacle course +

📷 Photo Mode

+

Snap your builds, then add a frame, a filter, stickers and a caption, and save or share the picture. Photos stay on your device.

+
A cat called Luna wearing sunglasses and a dog called Toby in a party hat next to a firefly lantern and a frog +

🐶 Friendly animals and pets

+

Pat, feed and shear animals, watch babies grow, and tame a dog or cat as your pet. Pets get name tags and can wear party hats, crowns and sunglasses. Frogs, butterflies and fireflies appear around your builds.

+
A flower garden next to rows of wheat growing from green to golden +

🌾 Farming and gardens

+

Plant flowers, water your garden, grow wheat and bake bread. A watering can makes things bloom.

+
Rainbow music stones, trampolines, neon blocks, a confetti pad, a speed strip, ice and a fan vent +

🎉 Fun blocks

+

Trampolines, speed strips, slippery ice, fan vents, glowing neon, music stones you can play by walking, confetti pads, colourful portals and a Hidden Star to hide for someone to find.

+
A village with a stone well, plank houses and named villagers +

🏘️ Villages and trading

+

Visit villages with named farmers, builders and smiths, and trade with them.

+
The inventory and crafting screen with planks, sticks, a crafting table and pickaxes +

⛏️ Creative and gentle Survival

+

Build freely with unlimited blocks and power tools, or collect, craft tools and look after your hearts in a gentle Survival mode with no monsters.

+
A Quest complete banner showing two stars and 3 + 4 = 7 +

⭐ Quests that teach

+

64 quests with stars guide new players and practise counting, adding, times tables, colours and shapes, plus a coding track.

+
Tablet layout with a joystick, jump and backpack buttons and a tappable hotbar +

📱 Tablets, phones and Chromebooks

+

Touch controls with a joystick, compact layouts for phones, install it as an app, and play offline.

+
+

⚡ Spark circuits

+

Redstone-style wires, levers, buttons, pressure plates, batteries, inverters, delays, lamps, doors and pistons. Build blinking lights, secret doors and piston elevators, and let Bit flip the levers.

+

🪄 Power tools

+

Bridge wand, box builder, house walls, dome maker, paint roller and rainbow brush, with undo and redo.

+

⚔️ Adventure mode (teens and grown-ups)

+

Behind a grown-up check: hunger, XP and levels, cartoon night creatures, swords, bows, shields, armour, a Lost Items Chest and an optional Hardcore mode.

+

🌍 Endless worlds

+

Procedural biomes, caves, lakes, day and night with torch lighting, several saved worlds, world files and share links.

+
+
+
+ +
+

Two ways to play

+ + + + +
EditionWhat you get
Online edition (beta)Everything, plus Play Together with friends and optional accounts.
Free editionThe whole game in your browser with no account, working offline. No server features.
+
+ +
+

Safety and privacy

+ +
+ +
+

For parents and teachers

+ +
+ +
+

Frequently asked questions

+

Is MiniCrafter free?

+

Yes. MiniCrafter is completely free: no ads, no in-game purchases and no subscriptions. It is open source under the MIT License.

+

Is MiniCrafter safe for kids?

+

Yes. There is no text chat, no ads and no tracking. In Play Together, players only see picked names like "Blue Fox" and talk with emoji, and the host lets each player in. Accounts need only a made-up username and password, and players under 13 need a grown-up to help.

+

Do I need to download or install anything?

+

No. MiniCrafter runs in any modern web browser on computers, Chromebooks, tablets and phones. You can also add it to your home screen like an app, and it keeps working offline.

+

Does MiniCrafter need an account?

+

No. You can play without an account. An optional account, with just a made-up username and a password and no email, unlocks Play Together.

+

Can I play MiniCrafter with friends?

+

Yes. Play Together lets up to 4 players build in the host's world with a room code. Players need an account, talk with emoji only, and connect through a safe relay rather than directly to each other.

+

Does MiniCrafter work on iPad, Chromebook and phones?

+

Yes. It has touch controls with a joystick, works on iPad, Android tablets, phones and school Chromebooks, and adjusts its layout for small screens.

+

How is MiniCrafter different from Minecraft?

+

MiniCrafter is free and runs in the browser with no install. It is designed for children first, with no chat with strangers, built-in learning quests, a codable robot called Bit, a Course Maker for building your own obstacle-course games, and a Photo Mode. It is an original game, not affiliated with Minecraft or Mojang.

+

What age is MiniCrafter for?

+

Creative and gentle Survival modes suit children from about 6. Teens and grown-ups can switch on Adventure mode, behind a grown-up check, for monsters, combat, hunger and Hardcore.

+

Can kids learn to code in MiniCrafter?

+

Yes. Kids program Bit the robot with drag-and-drop Blockly blocks (loops, conditions and sensors) to build, dig and flip circuit levers, and can view the matching JavaScript-style code.

+

Can teachers use MiniCrafter in class?

+

Yes. It needs no installs or student accounts, works offline on school Chromebooks, and its quests practise counting, times tables, colours, shapes and coding.

+
+ +

▶ Play MiniCrafter now

+ +

Made by Dynamic Web Lab FZE LLC, Sharjah, UAE · Privacy Policy · Terms of Use · GitHub · Discord (13+) · MiniCrafter is an original game and is not affiliated with Minecraft or Mojang.

+
+ + diff --git a/index.html b/index.html index 74555dc..49ccddb 100644 --- a/index.html +++ b/index.html @@ -157,7 +157,7 @@

MiniCrafter

Touch: left stick walks, drag to look, tap to place or flip, hold to mine or attack. Holding a bow or shield? Hold to draw or block.

Your world is saved automatically in this browser.

- + diff --git a/llms.txt b/llms.txt new file mode 100644 index 0000000..5b9c1b4 --- /dev/null +++ b/llms.txt @@ -0,0 +1,24 @@ +# MiniCrafter + +> MiniCrafter is a free, kid-safe block-building game that runs in any web browser (computers, Chromebooks, tablets and phones) with no install, no ads and no tracking. Players build worlds, make their own obstacle-course games, learn to code with a robot called Bit, raise animals and play together with friends using emoji only. It is an original open-source game (MIT License) by Dynamic Web Lab FZE LLC, not affiliated with Minecraft or Mojang. + +Key facts: +- Price: free. No ads, no in-game purchases, no subscriptions. +- Ages: Creative and gentle Survival suit children from about 6; an optional Adventure mode (monsters, combat, hunger, Hardcore) for teens and grown-ups sits behind a grown-up check. +- Safety: no text chat; Play Together uses picked names (like "Blue Fox") and emoji; the host lets each player in; players connect through a relay, never directly. +- Accounts: optional; only a made-up username and a password (no email); players under 13 need a parent or guardian; accounts can be deleted any time. +- Platforms: any modern browser; installable as an app; works offline. +- Multiplayer: Play Together, up to 4 players, in the online edition. +- Learning: 64 quests (counting, times tables, colours, shapes, coding) and Blockly coding for Bit the robot. + +## Features +- [All features, with screenshots and FAQ](features.html): Course Maker, Play Together, Bit coding, Photo Mode, animals and pets, farming, fun blocks, villages, quests, Spark circuits, power tools, Adventure mode, tablets and phones +- [Play the game](./) + +## Policies +- [Privacy Policy](privacy.html): what is kept (a private username, a password hash, 30-day sessions, a consent record), what is not, and how to delete an account +- [Terms of Use](terms.html) + +## Project +- [Source code on GitHub](https://github.com/Dynamic-Web-Lab/MiniCrafter) +- Contact: info@dynamicweblab.com diff --git a/server/dev.mjs b/server/dev.mjs index 3614493..7656353 100644 --- a/server/dev.mjs +++ b/server/dev.mjs @@ -10,7 +10,7 @@ import { attachRelay } from './rooms.mjs'; const ROOT = fileURLToPath(new URL('..', import.meta.url)); const TYPES = { '.html': 'text/html', '.js': 'text/javascript', '.mjs': 'text/javascript', '.css': 'text/css', '.json': 'application/json', '.webmanifest': 'application/manifest+json', '.png': 'image/png', '.jpg': 'image/jpeg', '.svg': 'image/svg+xml' }; -const SERVE = ['index.html', 'style.css', 'privacy.html', 'terms.html', 'legal.css', 'sw.js', 'manifest.webmanifest', 'icons', 'src', 'vendor']; +const SERVE = ['index.html', 'style.css', 'privacy.html', 'terms.html', 'legal.css', 'features.html', 'features.css', 'llms.txt', 'docs', 'sw.js', 'manifest.webmanifest', 'icons', 'src', 'vendor']; /** Starts the dev server. Returns { server, port, url }. */ export async function startDevServer(port = 8770) { diff --git a/sw.js b/sw.js index 8a04702..963892a 100644 --- a/sw.js +++ b/sw.js @@ -1,8 +1,8 @@ // 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-v26'; +const VERSION = 'minicrafter-v27'; const CORE = [ - './', './index.html', './style.css', './privacy.html', './terms.html', './legal.css', './manifest.webmanifest', './site-config.json', + './', './index.html', './style.css', './privacy.html', './terms.html', './legal.css', './features.html', './features.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', './vendor/three.module.js', './vendor/blockly.min.js', './vendor/media/sprites.png', './src/adventure.js', diff --git a/tools/deploy-site.sh b/tools/deploy-site.sh index b6002c1..d3c8c12 100755 --- a/tools/deploy-site.sh +++ b/tools/deploy-site.sh @@ -1,23 +1,55 @@ #!/usr/bin/env bash -# Deploys the current checkout to our hosted MiniCrafter site (the online edition with -# Play Together; accounts later). Where it goes lives in tools/.deploy.env, which is not in Git: +# Deploys the current checkout to our hosted MiniCrafter site (the online edition: Play Together +# and accounts). Where it goes lives in tools/.deploy.env, which is not in Git: # DEPLOY_SSH=my-server-alias # DEPLOY_DIR=/var/www/minicrafter-site -# SITE_URL=https://example.com/ (only used for the message at the end) -# The repo's site-config.json keeps the online features off (the free copy); this script -# uploads an "on" version to our site instead. +# SITE_URL=https://example.com/ (the site's public address, with a trailing slash) +# It builds the site in a temporary folder (your checkout is never changed), then: +# - uploads an "on" site-config.json (the copy in Git keeps the online features off), +# - adds the site's address to features.html (canonical and social-sharing tags), +# - writes sitemap.xml and robots.txt for search engines. set -euo pipefail cd "$(dirname "$0")/.." [ -f tools/.deploy.env ] || { echo "Create tools/.deploy.env first (see the top of this script)"; exit 1; } # shellcheck disable=SC1091 source tools/.deploy.env -: "${DEPLOY_SSH:?}" "${DEPLOY_DIR:?}" -cp site-config.json "${TMPDIR:-/tmp}/site-config.json.keep" 2>/dev/null || true -printf '{ "online": true, "rooms": "/rooms", "accounts": true }\n' > site-config.json -trap 'mv -f "${TMPDIR:-/tmp}/site-config.json.keep" site-config.json 2>/dev/null || true' EXIT -rsync -az --delete \ - --include='index.html' --include='style.css' --include='privacy.html' --include='terms.html' --include='legal.css' --include='sw.js' --include='manifest.webmanifest' --include='site-config.json' \ - --include='icons/***' --include='src/***' --include='vendor/***' --exclude='*' \ - ./ "$DEPLOY_SSH:$DEPLOY_DIR/" +: "${DEPLOY_SSH:?}" "${DEPLOY_DIR:?}" "${SITE_URL:?set SITE_URL in tools/.deploy.env}" +case "$SITE_URL" in */) ;; *) SITE_URL="$SITE_URL/" ;; esac + +BUILD=$(mktemp -d "${TMPDIR:-/tmp}/minicrafter-site.XXXXXX") +trap 'rm -rf "$BUILD"' EXIT +rsync -a \ + --include='index.html' --include='style.css' --include='sw.js' --include='manifest.webmanifest' \ + --include='privacy.html' --include='terms.html' --include='legal.css' \ + --include='features.html' --include='features.css' --include='llms.txt' \ + --include='icons/***' --include='src/***' --include='vendor/***' \ + --include='docs/' --include='docs/screenshots/***' --exclude='*' \ + ./ "$BUILD/" + +printf '{ "online": true, "rooms": "/rooms", "accounts": true }\n' > "$BUILD/site-config.json" + +# Site-specific tags on the features page (absolute addresses for search engines and link previews). +META="\n \n \n " +python3 - "$BUILD/features.html" "$META" <<'PY' +import sys +p, meta = sys.argv[1], sys.argv[2].replace('\\n', '\n') +s = open(p).read() +assert '' in s +open(p, 'w').write(s.replace('', meta, 1)) +PY + +TODAY=$(date +%Y-%m-%d) +cat > "$BUILD/sitemap.xml" < + + ${SITE_URL}${TODAY}1.0 + ${SITE_URL}features.html${TODAY}0.9 + ${SITE_URL}privacy.html${TODAY}0.3 + ${SITE_URL}terms.html${TODAY}0.3 + +EOF +printf 'User-agent: *\nAllow: /\nDisallow: /api/\nDisallow: /rooms\nSitemap: %ssitemap.xml\n' "$SITE_URL" > "$BUILD/robots.txt" + +rsync -az --delete "$BUILD/" "$DEPLOY_SSH:$DEPLOY_DIR/" ssh "$DEPLOY_SSH" "chmod -R a+rX $DEPLOY_DIR" -echo "Deployed $(git rev-parse --short HEAD) to ${SITE_URL:-$DEPLOY_SSH:$DEPLOY_DIR}" +echo "Deployed $(git rev-parse --short HEAD)$(git diff --quiet HEAD -- . 2>/dev/null || echo ' (+ uncommitted changes)') to $SITE_URL"