📚 Encyclopedia

Games & Graphics · updated 2026-11-16

Static trivia and quiz games (daily sets, question banks, fact checking)

triviaquizstatic-siteseeded-randomlocalstoragequestion-bankfact-checking

A trivia game needs no backend: a question bank in one JavaScript file, a seeded random number generator for the shared daily round, and localStorage for scores. Two sites were built this way in November 2026 from one engine: Rewind (90s movie trivia, trivia.jhampton.io) and D'oh! (a fan-made Simpsons quiz, simpsons.jhampton.io). The engine is plain HTML, CSS and JS with no build step (see Zero-build web apps (vanilla JS, localStorage, single file)). What makes or breaks such a game is the question bank, not the code.

The question bank

Fact-check the bank with a second pass

A bank written from memory (by a person or a language model) needs an independent check before it goes public. For the Simpsons bank, a second agent with web search verified all 251 rows: every answer held, but three fun facts were wrong and two more had to be softened. The pattern is general: the answer to a question is usually a famous, well-rehearsed fact, while the supporting trivia is the kind of half-remembered detail that gets embellished. Check the side facts at least as hard as the answers, and prefer cutting a fact to hedging it. The movie bank launched with self-review only, which is the weaker position.

A daily round everyone shares

Everyone who plays on the same day should get the same ten questions, without a server: 1. Build a key from the local date (YYYY-MM-DD). 2. Hash a namespaced string ("rewind-daily-" + key) to 32 bits with FNV-1a and use it to seed a small PRNG (mulberry32). 3. Shuffle the whole bank with that PRNG (Fisher-Yates), bucket by difficulty, and take a fixed ramp: 4 easy, 4 medium, 2 hard. 4. Use the same PRNG for the order of the answer choices, so two players comparing notes saw the same screen.

Math.random cannot be seeded, which is why the game carries its own generator. The first run of the day is the saved score and later runs are practice; otherwise the daily score means nothing. A streak counter walks backward through the saved days, starting from yesterday if today has not been played yet, so the streak does not read zero every morning.

Limits: the daily set changes when the bank changes (new rows reshuffle everything), so add questions between days if comparisons matter, and "the same day" follows each player's own clock. Both are fine for a casual game. General rules for seeded content are in Deterministic seeds for procedural worlds.

Other modes from the same bank

Scoring and feel

Reskinning for a second subject

The second site was a copy of the first with a new theme, question bank, storage key and icon script; it took a fraction of the first build. The copies are independent repos, so a fix in one does not reach the other. That is acceptable for two small games; a third copy would be the point to factor the engine out.

For a fan quiz about someone else's property: draw all the art yourself (CSS shapes and generated icons), use no show artwork or logos, and say on the page that it is an unofficial fan quiz, not affiliated with the owner.

Testing a quiz without clicking through it

Gotchas

See also

Sources: trivia memory, simpsons memory, trivia repo (app.js, questions.js, tools/), tldr posts #1899, #1900