- JavaScript 81.3%
- CSS 15.9%
- HTML 2.2%
- PowerShell 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Deploy to Cloudflare / deploy (push) Successful in 19s
When the buzz timer ran out, or nobody was left to answer, the board showed the response straight away. The buzzers now close and the response stays hidden until the host clicks "Show the response" (Space or R). After a wrong answer the buzz timer no longer restarts on its own: the others can still ring in, and the host reopens the buzzers with "Open the buzzers again" (Space). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RHpwnfPFeXX4fTLSMrA87V |
||
| .forgejo/workflows | ||
| css | ||
| data | ||
| js | ||
| lib/katex | ||
| media | ||
| sounds | ||
| .gitattributes | ||
| .gitignore | ||
| .nojekyll | ||
| board.html | ||
| CNAME | ||
| deploy.ps1 | ||
| editor.html | ||
| favicon.svg | ||
| index.html | ||
| README.md | ||
| wrangler.jsonc | ||
JPDY
A game-show style trivia board for live, in-person play, to be published at jpdy.xyz. One screen (the projector or TV) shows the board to the room, and a separate host console runs the game.
No install and no build step. It is plain HTML, CSS and JavaScript.
Running a game
- Open
index.htmlin Chrome or Edge (or the site's address, if you put it online). This is the host console. (Double-clicking the file works. If your browser is fussy, runpython3 -m http.serverin this folder and open http://localhost:8000.) - Pick a deck (or keep the example game), enter player names, and press Start game once the media check is done.
- Click Open projector board. Drag the new window onto the projector, click Click to start the board (turns on sound and full screen; F toggles full screen).
- Run the game from the console. The board updates instantly. The correct response only appears on your console until you reveal it.
The host console saves the game as you go, so a refresh or a closed tab can be resumed from the setup screen.
Host keys
| Key | Does |
|---|---|
Space / Enter |
Next step (open buzz timer, back to board, start think music, ...) |
1 to 8 |
That player buzzed in |
C / X |
Correct / incorrect |
R |
Nobody got it, show the response |
P |
Play the clue's sound or video on the board |
Ctrl+Z |
Undo the last action (scores included) |
Players can buzz with anything: a bell, a hand, a shout. The host clicks who was first.
The host decides when the response goes on the board. When the buzz timer runs out, or nobody is left to answer, the buzzers close and the board keeps the clue up until the host clicks Show the response (or presses Space or R). After a wrong answer the others can still ring in, but the buzz timer only starts again when the host clicks Open the buzzers again (or presses Space).
What's in a game
- Two rounds of 6 categories x 5 clues. The second round doubles the values.
- Daily Doubles are placed at random each game (1 in round one, 2 in round two). Only the host sees where.
- A final round with secret wagers, a 30 second think timer with music, and one-by-one reveals. The board first shows the round's name; the host reveals the category (Reveal the category or Space), players wager, and after the wagers are locked the host reveals the clue (Reveal the clue or Space). The think music is optional: Skip the music, go to the responses moves straight on. When time is up the board keeps the clue up; the correct response only goes on the board after the last player's response is revealed (Show the correct response or Space).
- Scores can be adjusted by hand at any time.
Making your own game: the deck editor
Open editor.html (or click Deck editor in the host console). A deck is one game: its rounds, categories, clues and media.
- Your decks lists the decks saved in this browser. Start a blank deck, copy the example game, or import a deck file.
- The editor looks like the board. Type category names right on the board, set each row's value on the left, and click a tile to write its clue, correct response and optional host notes.
- Add category, Add row, + Round and the small arrows and crosses on the board change its shape. Each round can have its own number of Daily Doubles (placed at random each game), and any clue can be fixed as one.
- The final round tab has the round's name, the category, clue, response and an optional picture. Untick it for a game without a final round.
- Sounds gives the deck its own sound effects: upload a clip (or paste a link) for any cue, like the ring in, time's up or think music. They are saved in the deck and go inside its exported file. Cues left empty use whatever the host console has. In a deck file this is
"sounds": { "buzz": { "audio": ... } }, using the cue names listed under Title, labels and your own sounds. - Deck settings has the title, the timers, and the names used for the wager clue and the final round.
- Clue text normally flows like a paragraph, so extra spaces and line breaks are dropped. Tick Keep line breaks and spaces as typed under a clue's Advanced settings (or the final clue's) to show it exactly as written, or turn it on for every clue under Advanced settings in Deck settings. In a deck file this is
"keepSpacing": trueon a clue, onfinal, or insettings. - The board shows clues and responses in capitals. Tick Keep capital letters as typed in the same Advanced settings for a clue (or for the whole deck in Deck settings) when case matters, like NaClO or pH. In a deck file:
"keepCase": true. - Formatting in clues and responses (a reminder is under Formatting help, below the clue box):
*italic*(or_italic_),**bold**,~~struck out~~and`code`. Put a backslash before a mark to show it as typed, like\*. Spaced-out marks such as5 * 3are left alone. - Math and chemistry: write
\( x^2 + 1 \)within a line, or$$ \frac{a}{b} $$(or\[ ... \]) for a formula on a line of its own, and\( \ce{NaClO} \)for chemical formulas. It works in clues and responses, including the final round. A single$is never math, so dollar amounts are safe. Formulas are drawn by KaTeX (MIT license), bundled inlib/katex, so they work offline. - Everything saves as you type. Ctrl+Z and Ctrl+Y undo and redo. Things to check lists empty clues, missing responses and media problems.
Pictures, sounds and videos
Each clue can have any mix of a picture, a sound and a video:
- Upload a file (or drop it on the slot). It is stored in the deck.
- Paste a link to a file on the web. The editor checks it straight away and saves a copy.
The correct response can have its own picture, sound and video too (Response media, under the clue's media). When you reveal the response, they replace the clue's media on the board, and Play on board plays the response's sound or video. The final round can have a response picture, shown with the correct response at the end. In a deck file this is "responseMedia": { "image": ..., "audio": ..., "video": ... } on a clue or on final.
Before a game, the host console gets every file ready on this computer: uploaded files come from the deck, linked files are downloaded and kept, and files in the media folder are checked. Start game waits until that is done. If anything failed, the console lists it (which clue, which file, what went wrong) and asks before starting.
Some websites don't allow other pages to save a copy of their files. Those links still show in the game, but only while the internet is on, and the console warns about them. For game night, the safe choice is to download such a file and upload it into the deck.
Saving and restoring a deck with its settings
Save deck and settings to a file (host console, on the setup screen or under Title & sounds) and Export file (deck editor) both make one .zip file with:
- the deck, with uploaded pictures, sounds and videos inside it (linked files stay as links),
- the title, round names, final round name and wager clue name,
- the timers and the board fill timing,
- which sounds are on, the master volume, your sound clips and your logo.
Load it with Load a deck file in the host console, Load a saved file under Title & sounds, or Import a deck file in the editor. The deck is added to your decks, and you are asked whether to put the saved settings back. Saying yes replaces the names and timings in this browser, and the sound clips and logo that the file has (your other clips stay).
Inside the zip, deck.json holds the deck and settings, and the files sit in media, sounds and logo folders. A zip that was unpacked and zipped again (with Windows or macOS) still loads. Older .json deck files load too.
Clips that sit in the game's sounds folder can only go into the file when the game runs from a website or a local web server: browsers don't let a page read those files when it is opened straight from disk. In that case the console says which clips were left out. Use Import sounds folder once, then save again, to include them.
Old-style game files (just the { ... } game object, like data/example-game.js without the first line) import too:
{
"title": "MY QUIZ",
"settings": { "buzzSeconds": 5, "answerSeconds": 5, "finalSeconds": 30, "dailyDoubles": [1, 2] },
"rounds": [
{ "name": "Round One", "categories": [
{ "title": "Space", "clues": [
{ "value": 200, "text": "Clue text", "response": "What is ...?" },
{ "value": 400, "text": "Name this planet", "image": "media/mars.jpg", "response": "What is Mars?" },
{ "value": 600, "text": "Name this tune", "audio": "https://example.com/tune.mp3", "response": "..." },
{ "value": 800, "text": "Watch this", "video": "media/clip.mp4", "response": "...", "notes": "Only the host sees this" }
]}
]}
],
"final": { "category": "Geography", "text": "Final clue", "image": "media/map.png", "response": "What is ...?" }
}
Decks live in this browser's storage. Clearing the browser's site data removes them, so export the ones you care about. The editor's Your decks window shows how much space they use.
Putting it online
The game is a set of plain files, so any free static host works: GitHub Pages, Cloudflare Pages, Netlify and the like. Upload the whole folder (keep the folder structure; a subfolder address such as https://name.github.io/trivia/ is fine). There is no server and no database:
- Each visitor's decks, uploaded pictures, sounds and videos, sound clips and settings are stored in their own browser. Nobody else can see them, and nothing is uploaded to the host.
- To share a deck, export it and send the
.zip. The other person imports it. - Links to files on other websites work the same as locally: the host console saves a copy before the game when the website allows it, and warns when it doesn't. On an
https://site, links must behttps://too; browsers block plainhttp://files there. - Browsers can clear a site's stored data when the disk is nearly full, and Safari clears it after about 7 days without a visit. The game asks the browser to keep its data, but visitors should keep exported zips of decks they care about.
What not to upload:
- Anything in
sounds/(exceptREADME.txt) andmedia/logo.*becomes the default for every visitor and can be downloaded by anyone. Only publish files you have the right to share. The included.gitignorekeeps thesoundsclips out of a Git repository; visitors add their own clips under Title & sounds instead.
The game works the same way from a local folder; opening index.html from disk is still fine for your own games.
Publishing on jpdy.xyz
The folder includes a CNAME file containing jpdy.xyz, which GitHub Pages reads when it publishes from a branch.
On GitHub Pages:
- Put the folder's contents at the top of a repository (
index.htmlat the root) and push. - In the repository's Settings > Pages, choose Deploy from a branch, pick the branch and
/ (root). - Under Custom domain, enter
jpdy.xyzand save. - At your domain registrar, add the DNS records GitHub lists for an apex domain: four
Arecords forjpdy.xyz(185.199.108.153, 185.199.109.153, 185.199.110.153, 185.199.111.153), and aCNAMErecord forwwwpointing to<your-user-name>.github.io. - Once the DNS check passes, tick Enforce HTTPS. The certificate can take up to a day.
GitHub also suggests verifying the domain under your account's Settings > Pages, so nobody else can claim it.
On Cloudflare Pages, connect the repository (or upload the folder), then add jpdy.xyz under the project's Custom domains. If the domain's DNS is on Cloudflare, the records are set up for you. The CNAME file is ignored there and does no harm.
jpdy.xyz itself runs on Cloudflare as the static site "jpdy" (Cloudflare now runs new Pages sites on Workers; the settings, including the jpdy.xyz address, are in wrangler.jsonc). The source is at https://kaze.moe/kaz/jpdy, and every push to main there publishes the site through Forgejo Actions (.forgejo/workflows/deploy.yml, which needs the CLOUDFLARE_API_TOKEN Actions secret).
To publish from this computer without pushing, run deploy.ps1 (Windows PowerShell, needs Node.js and a one-time npx wrangler login). It copies the site to a clean temporary folder, leaving out your sounds clips and the repository-only files, and uploads it. .\deploy.ps1 -DryRun only lists what would go online. The next push replaces whatever you published this way.
Each address keeps its own browser storage. Decks you made while playing from the local folder do not appear on jpdy.xyz by themselves: export them from the local copy and import them on the site.
Board fill and category reveals
- When you reveal the board, the logo covers the whole board and the tiles fill in over it in six phases, one category tile per phase (D, A, F, C, E, B on a 6-category board). The default timing (first tiles at 310 ms, then every 390 ms) lines up with a fill sound whose notes fall about every 0.2 s; change it under Board fill timing in Title & sounds.
- The category names stay hidden behind the logo. Press Space (or Reveal categories) to show them full screen one at a time: the logo fades into the name, and Space swipes it off to the left as the next one slides in (logo first, then its name). After the last one you're back on the board with every name showing.
- Your own logo: choose an image under Title & sounds, or save it as
media/logo.png. Without one, the game title is used.
Title, labels and your own sounds
Click Title & sounds in the host console. It has four parts: Title and names, Logo, Sounds (grouped by when each cue plays, with How sounds are chosen and Board fill timing folded at the bottom) and Save and load.
- Set the game title, the round names, the final round name and the name of the wager clue. They show on the board right away and are remembered in this browser. Only names you change here override the deck; the rest follow the deck, so edits made later in the deck editor still show.
- Every sound cue (title theme, board fill, clue opens, ring in, correct, incorrect, time's up, wager clue, round name, category reveal, final category, think music, winner) can use your own audio clip:
- Choose file next to a cue. The clip is saved in this browser and sent to the board.
- From a link: paste the address of a sound file on the web (it must point straight at the
.mp3,.wav,.oggor.m4afile). The file is downloaded, kept in this browser and leveled like any other clip. If the website doesn't allow that, the cue plays straight from the web instead: it needs the internet during the game and isn't leveled, and the console warns about it before the game starts. - Or drop files into the
soundsfolder, named after the cue:title,boardFill,reveal,buzz,correct,incorrect,timeout,dailyDouble,roundEnd,categoryReveal,finalReveal,think,winner(.mp3,.wav,.oggor.m4a). For examplesounds/think.mp3. Reload the pages after adding files. - Which sound plays: a clip chosen here first, then the deck's own sound (from the deck editor's Sounds tab), then the
soundsfolder, then the built-in sound. Remove your clip to go back to the deck's. Test plays a cue on the board.
- Uncheck a cue to turn that sound off (built-in, the deck's or your own). The game runs the same, just silently for that moment.
- Your clips are leveled automatically: each one is measured and turned up or down so they all play at about the same loudness. The Volume slider sets the overall level.
- Import sounds folder loads every file named after a cue in one go (they get leveled too).
- Files the game finds on its own in its
soundsfolder are leveled only when the game runs from a local web server. When you openindex.htmlstraight from disk, browsers don't let the page read those files, so they show as "Not leveled". Use Import sounds folder to fix that.
- Music cues (title theme, think music, winner) fade out when the screen changes.
No sound files are bundled. Only use clips you have the right to play.
About the look and sound
JPDY is an independent project. It is not affiliated with, endorsed by or sponsored by Jeopardy Productions, Inc., Sony Pictures Television or the Jeopardy! television show. Jeopardy! is a registered trademark of Jeopardy Productions, Inc.
The design follows the classic TV quiz format (blue board, gold values, timer lights, wager splash) but all bundled assets are original: the sound effects and think music are synthesized in the browser, and the example pictures, sounds and videos were made for this project. Nothing is copied from any TV show.