Blockly Games — jocs per iniciar-se en la programació
  • JavaScript 73.7%
  • HTML 18.4%
  • Python 3.6%
  • CSS 3.2%
  • Makefile 0.6%
  • Other 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Samuel Soriano 0d59220fe0
Some checks failed
CI / build-and-smoke (push) Has been cancelled
Adjust dance and music challenges
2026-09-11 14:51:01 +02:00
.github/workflows Fix clean builds and add CI with smoke tests 2026-07-17 06:48:12 +02:00
appengine Adjust dance and music challenges 2026-09-11 14:51:01 +02:00
archive Simplify SVG paths 2022-10-03 17:51:59 +02:00
build Fix clean builds and add CI with smoke tests 2026-07-17 06:48:12 +02:00
externs Reduce images by 500 kb. 2023-08-11 14:52:42 +02:00
json Redesign Dance's 10-level progression for pedagogical scaffolding 2026-09-07 17:22:46 +02:00
tests Improve accessibility and add English about page 2026-07-17 11:19:34 +02:00
third-party Move third-party-downloads into build directory 2022-09-14 15:03:26 +02:00
.gitignore Fix clean builds and add CI with smoke tests 2026-07-17 06:48:12 +02:00
LICENSE Self-closing tags don’t work when embeded in HTML. 2019-07-16 12:04:43 -07:00
Makefile Fix clean builds and add CI with smoke tests 2026-07-17 06:48:12 +02:00
messages.json Redesign Dance's 10-level progression for pedagogical scaffolding 2026-09-07 17:22:46 +02:00
package-lock.json Improve accessibility and add English about page 2026-07-17 11:19:34 +02:00
package.json Improve accessibility and add English about page 2026-07-17 11:19:34 +02:00
playwright.config.js Fix clean builds and add CI with smoke tests 2026-07-17 06:48:12 +02:00
README.md Oculta l'usuari/host intern del deploy a la documentació 2026-09-10 21:08:23 +02:00

Blockly Games for Edutictac

This repository is an Edutictac-maintained fork/deployment of Google Blockly Games, a set of educational games that teach programming with Blockly blocks.

Production site:

Repository Layout

  • appengine/: static site files served in production.
  • appengine/*.html: top-level game entry points, for example maze.html.
  • appengine/<game>/: generated assets and per-game static files.
  • appengine/<game>/index.html: Edutictac static-host redirect for /game/ URLs.
  • build/: build and compression scripts.
  • json/ and messages.json: translation sources.
  • Makefile: build targets for individual games and all games.
  • deploy.sh: compiles and uploads appengine/ to the Edutictac server.

Requirements

The Makefile expects these tools to be available:

svn
wget
java
python

The deployment script also requires rsync and SSH access to the Edutictac server.

Build

Build all games:

make games

Build a single game:

make maze
make dance
make music

The generated bundles are written under appengine/<game>/generated/.

Deploy

Deploy everything:

./deploy.sh

Deploy a single game:

./deploy.sh maze

The script compiles the requested target, then uploads appengine/ to:

user@example.org:/srv/www/blockly/

Only Catalan, English, and Spanish generated message files are included during upload:

ca.js
en.js
es.js

Service worker (PWA)

The site registers appengine/sw.js (from common/boot.js) so it can be installed on tablets and played offline. Two rules when deploying:

  • Bump the cache version in appengine/sw.js (const CACHE = 'bg-vN';) on every deploy, otherwise returning visitors may keep stale HTML/JS.

  • On nginx, serve the worker itself uncached so updates propagate quickly:

    location = /sw.js { add_header Cache-Control "no-cache"; }
    

Only games the user has visited online are available offline (runtime cache).

Static URL Handling

Blockly's original App Engine layout uses top-level entry files such as maze.html, while each game also has an asset directory with the same basename, such as maze/.

On nginx static hosting, /maze/ resolves to the directory. If that directory has no index.html, nginx returns 403 Forbidden. To keep both URL styles working, this fork includes small redirect files:

appengine/dance/index.html
appengine/puzzle/index.html
appengine/maze/index.html
appengine/bird/index.html
appengine/turtle/index.html
appengine/movie/index.html
appengine/music/index.html
appengine/pond-tutor/index.html
appengine/pond-duck/index.html

Each redirect preserves the query string and hash, so:

https://blockly.edutictac.es/maze/?lang=en

loads:

https://blockly.edutictac.es/maze.html?lang=en

Do not remove these files unless nginx is changed to rewrite /game/ URLs to /game.html.

Verification

After deployment, verify the public game URLs:

for game in dance puzzle maze bird turtle movie music pond-tutor pond-duck; do
  curl -sS -o /dev/null -w "$game/ %{http_code}\n" \
    "https://blockly.edutictac.es/$game/?lang=en"
done

Expected result:

dance/ 200
puzzle/ 200
maze/ 200
bird/ 200
turtle/ 200
movie/ 200
music/ 200
pond-tutor/ 200
pond-duck/ 200

Also check the direct .html entry points if a game fails to load:

curl -I "https://blockly.edutictac.es/maze.html?lang=en"

Notes

  • Keep changes scoped to this fork unless syncing intentionally from upstream.
  • The production deployment is static nginx hosting, not Google App Engine.
  • Avoid committing generated or downloaded dependencies unless they are already part of the repository's expected layout.