Skip to content
precisitPublic

About

A phone-and-big-screen Heads Up! party game built on jsflow

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Heads Up!

A party game for phones and one big screen. The big screen hosts, shows a QR code, runs the timer and keeps score. Everyone else scans with their phone, holds it on their forehead when their turn comes, and tilts to score.

Play: https://precisit.github.io/heads-up/

How it plays

  1. Open the game on a big screen and press Host a game.
  2. Everyone else scans the QR code and picks a name.
  3. The host picks a category, a mode and a 30, 60 or 90 second turn.
  4. Each player gets one turn as the guesser. Their phone becomes the card, held facing the team; the host screen and the other phones show the word.
  5. Tilt the phone down for correct (one point and the next card) or up to pass. No motion sensor? A teammate can tap the big buttons, or the host can use the backup controls.
  6. Most points when every player has had a turn wins.

Modes:

  • Clue givers — hints, acting and humming. Never say the word, spell it, or use a rhyming word.
  • Yes/no questions — the guesser asks questions out loud and the team answers only yes or no.

How it works

There is no game server. The browsers join a jsflow room and talk directly over WebRTC. One browser is the host screen; it runs the rules, deals the cards, keeps the timer and is the single source of truth for scores. The word lists live in the page. The page is plain HTML, CSS and JavaScript with no build step.

The publishable jsflow key in app.js is public by design. The jsflow app allows https://precisit.github.io, http://localhost:* and http://127.0.0.1:*.

Run it locally

python3 -m http.server 8080
# open http://localhost:8080/ and press Host a game
# open the join link in another tab and join with the room code

For a quick two-player test, use two browser tabs on localhost: one hosts, the other joins. The jsflow app allows localhost and the published GitHub Pages origin; a phone cannot reach your computer's localhost, so use the Pages link for a real phone game.

Test

Node 22 or newer, no install needed:

npm test

The tests cover the pure game rules, the tilt detector and the word lists.

Files

File What it is
index.html, styles.css, app.js The game screen, the host screen and all networking
game.js Pure game state: turns, cards, scoring, winners
tilt.js The tilt-to-score detector
words.js Categories and cards
vendor/qrcode.mjs The QR encoder (MIT, see THIRD_PARTY_NOTICES.md)
test/ Node tests for the pure parts

Privacy

No accounts, no ads, no analytics. Names and a random player token are kept in your browser's local storage; the host keeps the game state in local storage so a reload does not lose the score. Messages go browser to browser through jsflow; the jsflow signalling service sees joins and metadata but not the game messages. As with any direct WebRTC connection, peers can see each other's IP addresses. The static page is served by GitHub Pages.

Licence

MIT, Copyright (c) 2026 Precisit AB. See LICENSE.

About

A phone-and-big-screen Heads Up! party game built on jsflow

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages