The screen is just HTML
Court Command's scoring screen is an ordinary web page stored on the controller. Its buttons call the controller's API; the controller drives the scoreboard. You can use our layouts, change them, or write your own.
Three ways to get the screen you want
1. Pick a layout
The controller offers layouts for phones and tablets, for basketball and volleyball. Choose one in settings and it becomes the controller's page. New layouts will be offered as downloads.
2. Change one
Every layout is a single file with its colours at the top. Download one, change the colours, rename HOME to your mascot, remove buttons your scorer never uses, and upload it.
3. Write your own
Anything that can make a web request can run the board: a page, a tablet app, a streaming overlay, a script. The API reference is one page long.
The layouts today
| Sport | Layout | For | |
|---|---|---|---|
| Basketball | Classic The original Court Command basketball page, every control on one dark page. Tap a score to add 1, or use +2, +3 and −1. Set the clock from the presets, then tap Run. |
phone or tablet | Try it · Download |
| Basketball | Console Landscape scorer's console for a tablet: clock in the middle with big Run and Stop, a team on each side with +1 +2 +3, possession, bonus and player fouls, time-outs and presets along the bottom. |
tablet | Try it · Download |
| Basketball | Daylight Portrait page for a phone in a bright gym. Tap the clock to set it, then Run. Run, Stop, Time-out and Horn sit in a thumb bar at the bottom; More opens period, player fouls and the rest. |
phone | Try it · Download |
| Volleyball | Classic The original Court Command volleyball page. Tap a score to add a point, −1 to take one back. Set, horn and clock presets below. |
phone or tablet | Try it · Download |
| Volleyball | Match Landscape match view for a tablet: tap either half to score, serve indicator, sets won, two time-outs per team, end-of-set in one tap. |
tablet | Try it · Download |
| Volleyball | Two Zones Portrait page for a phone: the top half scores for Home, the bottom half for Visitor, with serve, set and time-outs in the strip between. |
phone | Try it · Download |
A complete page in 40 lines
This is a whole, working scoring screen. It shows the clock and the scores, and has buttons for the clock, the points and the horn. Run it in the demo, or download it as a starting point.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="cc-style" content="custom/starter/1.0">
<title>My scoreboard page</title>
<style>
body { font-family: sans-serif; background: #102a43; color: #fff; text-align: center; margin: 0; padding: 16px; }
.score { font-size: 5rem; font-weight: bold; }
.teams { display: flex; gap: 12px; }
.teams > div { flex: 1; background: #243b53; border-radius: 12px; padding: 12px; }
button { font-size: 1.3rem; padding: 12px 18px; margin: 4px; border: 0; border-radius: 10px; background: #f0b429; }
</style>
</head>
<body>
<h1 id="clock">-:--</h1>
<button onclick="send('ClockRun')">Run</button>
<button onclick="send('ClockStop')">Stop</button>
<button onclick="send('Clock', '', 8 * 60000)">Set 8:00</button>
<div class="teams">
<div>HOME<div class="score" id="home">-</div><button onclick="send('Score', 'Home', 1)">+1</button><button onclick="send('Score', 'Home', -1)">-1</button></div>
<div>VISITOR<div class="score" id="visitor">-</div><button onclick="send('Score', 'Visitor', 1)">+1</button><button onclick="send('Score', 'Visitor', -1)">-1</button></div>
</div>
<button onclick="send('Horn', '', 10)">Horn</button>
<script>
// Every control is one request to the controller. With no action it just reads the board.
async function send(action, team, value) {
let url = 'api/score';
if (action) url += '?Action=' + action + (team ? '&Team=' + team : '') + (value !== undefined ? '&Value=' + value : '');
const board = await (await fetch(url)).json();
document.getElementById('home').textContent = board.Home.Score < 0 ? '-' : board.Home.Score;
document.getElementById('visitor').textContent = board.Visitor.Score < 0 ? '-' : board.Visitor.Score;
const c = board.Clock;
document.getElementById('clock').textContent = c < 0 ? '-:--' : Math.floor(c / 60000) + ':' + String(Math.floor(c % 60000 / 1000)).padStart(2, '0');
}
setInterval(send, 1000); // keep the page in step with the board
send();
</script>
</body>
</html>
The rules for a page
- One file. Styles and scripts go inside the page. The controller may be on its own Wi-Fi with no internet, so a page must not load anything from elsewhere.
- Talk to
api/score. Send an action to change the board; send nothing to read it. Read it about once a second so several devices stay in step. - Let the controller keep time. Start and stop the clock with a request and show the clock value that comes back. Do not count down in the page.
- Upload it in settings. Your page replaces the basketball or the volleyball screen. Removing it brings the built-in screen back.