Skip to content

About

A Wikidata puzzle game

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

 
 

Repository files navigation

Everything is connected

A knowledge puzzle game powered by Wikidata. Drag tiles onto a grid; two tiles "fit" when Wikidata knows a real-world relation between the entities they represent.

Play it: eicgame.toolforge.org · Guide: about.html · Editor: editor.html

Originally by Denny Vrandečić (Google, 2016). This fork is a vanilla-JS rewrite maintained by Ranjithsiji with support from the Wikimedians of Kerala User Group. Not an official Google product.

Highlights

  • No build step. Static site, vanilla ES modules, mobile-first CSS. Open the folder in any file server and play.
  • No backend of our own. Data comes from public Wikimedia CORS APIs (Wikidata, Wikipedia, Commons).
  • Puzzle in the URL. The whole board is encoded as a ?board=… query parameter, so sharing a puzzle is sharing a link.
  • Visual editor (editor.html) — search Wikidata, drag or swap tiles, edge-resize the grid, load and remix existing puzzles.
  • Live scoring with best-per-level times persisted in localStorage.
  • Explain-connections panel — every green ✓ badge tells you which Wikidata property links the two entities.

Architecture

Only static assets. No bundler, no transpiler, no package.json.

Layer Choice
DOM Vanilla ES modules, IIFE-wrapped, 'use strict'
Drag & drop SortableJS (game board + deck) + native HTML5 DnD (editor)
Layout CSS Grid for boards, Flexbox for the deck
Styling Single mobile-first style.css (Wikidata blue / green / red palette); editor adds editor.css
Data Wikidata wbgetentities, Wikipedia extracts, Commons imageinfo — all origin=* CORS, no JSONP
Storage localStorage for scores and theme preference

File map

File Purpose
index.html Game shell — board, deck, HUD, side panels, levels dialog
main.js Game logic: board model, fetchers, SortableJS wiring, scoring, panels
editor.html · editor.css · editor.js Standalone puzzle editor (no dependency on main.js)
about.html User-facing guide + puzzle-creation walkthrough
style.css Single stylesheet, mobile-first, auto/light/dark themes
third_party/ SortableJS, "Powered by Wikidata" logo

Puzzle format

The ?board= URL parameter encodes rows and cells:

  • Rows are separated by /
  • Each cell is a Wikidata Q-ID (e.g. Q60 for New York City)
  • Q0 = empty cell
  • Append + to a Q-ID to lock that tile in place

Example — Q0/JFK/USA row with Jackie Kennedy, JFK, USA and Harvard locked:

Q0Q165421Q60/Q13371+Q9696Q30

Try it: index.html?board=Q0Q165421Q60/Q13371+Q9696Q30

Note: The parser preserves + as a literal — URLSearchParams would decode it as space and corrupt the locked-tile marker. See urlParam in main.js.

Terminology

  • tile — a single puzzle piece (in the deck OR on the board)
  • board — the grid of slots tiles land in. Locked (+) tiles cannot be moved.
  • deck — the shuffled pool of movable tiles below the board

Running locally

Any static file server works:

python3 -m http.server 8000
# then open http://localhost:8000/

To try a specific puzzle: http://localhost:8000/?board=Q0Q165421Q60/Q13371+Q9696Q30

Repositories

The legacy branch on GitHub preserves the previous jQuery + jQuery-UI implementation for reference.

Sharing puzzles

If you build a puzzle, please add it to the community list at https://www.wikidata.org/wiki/Wikidata:Everything_is_connected so other players can find it.

Contributing

See CONTRIBUTING.md.

License

Licensed under the Apache License, Version 2.0 — see LICENSE.

Third-party assets (SortableJS, the "Powered by Wikidata" logo) are covered by their own licenses; see third_party/README.

About

A Wikidata puzzle game

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages