Billiard Scoreboard Documentation v4.0

This documentation contains all installation steps as well as explanations for table control, UI logic, training features and OBS integration.

New in Version 4.0:

1 Requirements

2 System Installation

sudo apt update
sudo apt install nginx php8.3-fpm php8.3-sqlite3 -y

3 Folder Structure

/var/www/billard/ ├── index.php # Main application ├── api.php # Backend API ├── monitor.php # Live monitor (multi-table) ├── obs_small.php # OBS overlay small (Style 1) ├── obs_small_2.php # OBS overlay small (Style 2) ├── obs_small_3.php # OBS overlay small (Style 3) ├── obs_small_4.php # OBS overlay small (Style 4) ├── obs_big.php # OBS overlay large (Style 1) ├── obs_big_2.php # OBS overlay large (Style 2) ├── obs_big_3.php # OBS overlay large (Style 3) ├── obs_big_4.php # OBS overlay large (Style 4) ├── help.html # This documentation ├── scoreboard_logo.svg # Logo ├── billiard_data.db # SQLite database ├── tables.json # Live table data │ ├── /assets/ │ ├── /css/ │ │ └── styles.css # Complete CSS │ └── /js/ │ ├── app.js # Base logic │ ├── game.js # Game functions │ └── training.js # Training functions │ ├── /logos/ # Club logos for OBS │ ├── BC Berlin.png │ ├── BC Bremen.png │ └── [ClubName].png │ ├── /EO/ # Equal Offense images │ └── EO_*.svg │ └── /regeln/ # Rule graphics (SVG) ├── /8ball/ │ └── 8ball_1.svg # 8-Ball rack ├── /9ball/ │ └── 9ball_1.svg # 9-Ball rack ├── /10ball/ │ └── 10_ball.svg # 10-Ball rack └── /14_1/ └── Aufbau_[1-7]_[1-2].svg # 14/1 rerack examples
sudo mkdir -p /var/www/billard/assets/css
sudo mkdir -p /var/www/billard/assets/js
sudo mkdir -p /var/www/billard/logos

4 Set Permissions

Note: SQLite is a file. PHP needs write access to the entire folder.
sudo chown -R www-data:www-data /var/www/billard
sudo chmod -R 775 /var/www/billard

or e.g.:

sudo chown -R www-data:www-data /var/www/html
sudo chmod -R 775 /var/www/html

depending on where the files are located.

5 Nginx Configuration

Configuration path: /etc/nginx/sites-available/default

server {
    listen 80;
    root /var/www/billard;
    index index.php index.html;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
    }
}
sudo nginx -t
sudo systemctl restart nginx

6 URL Overview

ViewURLDescription
Scoreboard http://[IP]/ Main application for players
Monitor http://[IP]/monitor.php Live display of all tables
Monitor Dark http://[IP]/monitor.php?mode=dark Dark mode for monitor
OBS Small http://[IP]/obs_small.php?Tisch=1 OBS overlay small - Style 1
OBS Small 2 http://[IP]/obs_small_2.php?Tisch=1 OBS overlay small - Style 2 (black scores, red stripe)
OBS Small 3 http://[IP]/obs_small_3.php?Tisch=1 OBS overlay small - Style 3 (blue scores)
OBS Small 4 http://[IP]/obs_small_4.php?Tisch=1 OBS overlay small - Style 4 (Maroon/Bordeaux)
OBS Big http://[IP]/obs_big.php?Tisch=1 OBS overlay large - Style 1
OBS Big 2 http://[IP]/obs_big_2.php?Tisch=1 OBS overlay large - Style 2 (split stripes, logos)
OBS Big 3 http://[IP]/obs_big_3.php?Tisch=1 OBS overlay large - Style 3 (logos, blue scores)
OBS Big 4 http://[IP]/obs_big_4.php?Tisch=1 OBS overlay large - Style 4 (Maroon/Bordeaux, logos)
Help http://[IP]/help.html This documentation

7 Table Control via URL

ParameterBehavior
index.php Free selection: Tables 1-8 selectable in setup
index.php?Tisch=0 Admin mode: Table selection hidden
index.php?Tisch=1 Fixed mode: Table fixed (1-8)

8 OBS Studio Integration NEW

Setup in OBS

  1. In OBS: Sources → + → Browser
  2. Enter name (e.g. "Scoreboard Table 1")
  3. Enter URL: http://[SERVER-IP]/obs_big.php?Tisch=1
  4. Width: 1400 (big) or 700 (small)
  5. Height: 150 (big) or 100 (small)
  6. Leave "Custom CSS" empty
  7. Enable "Refresh browser when scene becomes active"

Recommended Sizes

VersionWidthHeightUsage
obs_small.php 700 px 100 px Compact display, stream corner
obs_small_2.php 700 px 120 px Separate fields, black scores, red stripe
obs_small_3.php 700 px 120 px Separate fields, blue scores
obs_small_4.php 500 px 120 px Maroon/Bordeaux design, compact
obs_big.php 1400 px 150 px Full width, bottom of screen
obs_big_2.php 1400 px 180 px Split stripes (name/club), logos, red accents
obs_big_3.php 1400 px 150 px Logos, blue score boxes
obs_big_4.php 1200 px 150 px Maroon/Bordeaux design, logos, yellow accents

Setting Up Club Logos

Logos are automatically displayed when a PNG file with the exact club name exists:

# Create logo folder
sudo mkdir -p /var/www/billard/logos

# Upload logos (examples)
/var/www/billard/logos/BC Berlin.png
/var/www/billard/logos/BC Bremen.png
/var/www/billard/logos/Imperium.png
Tip: Logo files should be square (e.g. 200x200 px) with transparent background (PNG). The filename must exactly match the club name!
OBS Troubleshooting: If the scoreboard doesn't display completely in OBS:

9 Winner/Alternate Break NEW

For 8-Ball, 9-Ball and 10-Ball, the break mode can be selected in setup:

ModeBehavior
Alternate Break The break alternates after each rack (+ or -) to the other player
Winner Break The winner of a rack keeps the break (only switches on +)

Procedure

  1. In setup select Discipline (8-Ball, 9-Ball or 10-Ball)
  2. Select Break Mode (Alternate Break or Winner Break)
  3. When clicking START GAME the popup "Who breaks first?" appears
  4. Select player - the active player is marked with a border
  5. On REMATCH you'll be asked again who breaks
Tip: At game end, all input buttons are disabled. Only Undo and Restart remain active.

10 Help Buttons (Rules & Rack) NEW

All disciplines (14/1, 8-Ball, 9-Ball, 10-Ball) have a Help Button (question mark) in the control bar.

Content per Discipline

DisciplinePagesFeatures
14/1 Continuous 5 rule pages + 7 examples Rerack examples with before/after SVGs
8-Ball 4 rule pages Rack image (SVG) directly on the "Rack & Break" page
9-Ball 4 rule pages Rack image (SVG) directly on the "Rack & Break" page
10-Ball 4 rule pages Rack image (SVG) directly on the "Rack & Break" page
Tip: Rack SVGs are located in the /regeln/ folder. The popup is scrollable and has Prev/Next buttons for navigation.

11 GD (Game Average) NEW

The GD (Game Average = Points / Innings) is displayed for 14/1 games in multiple places:

LocationDisplayDescription
Running Game GD: X.XX Live GD in the stats row below the score (Inn | Series | HS | GD)
Player Stats Best GD: X.XX Highest GD ever achieved on the player card
Champions Best GD New champion card for the player with the highest GD
History Innings: X / HS: X / GD: X.XX GD per player in each 14/1 history entry
Calculation: GD = Points / Innings (rounded to 2 decimal places). The best GD is automatically saved at game end.

12 14/1 History (Player Statistics) NEW

Each player now has a history chart for their 14/1 games. The chart shows the development of high run and GD over the last 20 matches.

How to Open History

  1. Navigate to Player Database
  2. Click on a Player Card
  3. In the popup click "14/1 History" (blue button)

Chart Explanation

ElementColorY-AxisDescription
High Run Green Left (0-100) Best run per game
GD Blue Right (0-20) Game average per match
X-Axis - - Last 20 games (-20 to 0)

Statistics Box

Below the chart the following values are displayed:

Tip: The history only shows 14/1 games. For players without 14/1 history, "No 14/1 games found" appears.

13 Multi-language Support (i18n) NEW

The scoreboard now supports full multi-language capability. The language can be switched at any time in the sidebar.

Supported Languages

LanguageCodeFile
Germande/assets/lang/de.json
Englishen/assets/lang/en.json

Language Switch

  1. Open sidebar (burger menu)
  2. Click DE or EN at the bottom
  3. The entire UI is immediately translated
Tip: The language setting is saved in the browser and automatically restored on the next visit.

14 14/1 Live Innings NEW

During a 14/1 game, an overview of all innings played so far can be displayed at any time.

How to Open the Overview

  1. During a 14/1 game
  2. Click the History Button (clock icon) in the control bar
  3. A popup shows all innings with points and intermediate scores

Displayed Information

ColumnDescription
Inn.Inning number
Points (left)Points of player 1 in this inning
ScoreCurrent score after the inning
Points (right)Points of player 2 in this inning
Tip: Ideal for checking during the game and for referees.

15 New Disciplines NEW

Rotation

61 points game with the 3-foul rule. If a player commits 3 fouls in a row, they lose the game.

One Pocket

Sink balls into your designated pocket. Default target: 8 balls.

Bank Pool 9-Ball

Only bank shots allowed. Target: 5 balls.

Bank Pool 15-Ball

Only bank shots with all 15 balls. Target: 8 balls.

Doubles Modes

8-Ball, 9-Ball and 10-Ball can be played as doubles (2 vs 2). Team names are automatically combined.

16 Equal Offense Training

Pool 14/1 Levels (1-4)

LevelErrorsGDTargetMaximum
Level 124120150
Level 216120150
Level 3012120150
Level 4017170200
Level 4 - Special Features (v3.5):

9-Ball Levels (1-3)

LevelErrorsStart BallsTargetMaximum
Level 1244090
Level 2166090
Level 3099090

Bowlliards NEW

Bowling scoring on the pool table. Single player training with classic bowling point calculation.

PropertyValue
Frames10
Balls per Frame10
Max. Attempts per Frame2 (Frame 10: up to 3)
Maximum Score300 (12 Strikes)

Scoring

ResultSymbolPoints
StrikeX (red)10 + next 2 throws
Spare/ (blue)10 + next 1 throw
OpenNumberSum of pocketed balls

10th Frame Special Rules

Tip: The bowling scorecard shows all 10 frames with running totals. The active ball is highlighted.

17 PIN System

PIN TypeDefaultUsage
Master PIN 12345 Manage players, delete stats, delete history entries
Player PIN 000000 Start training
Note: Change master PIN in assets/js/app.js (line 7): masterPin: "12345"

18 API Endpoints

EndpointDescription
api.php?action=load Load all player data
api.php?action=save Save data (POST)
api.php?action=get_tables Live table data for Monitor/OBS
api.php?action=update_table Send table update (POST)

19 Troubleshooting

ProblemSolution
HTTP 500 Check write permissions (Step 4)
OBS shows nothing Increase browser source width, leave CSS empty
Logo not visible Filename must exactly match the club name
Training buttons not responding Check browser console (F12), training.js complete?
Debug Commands:
sudo tail -f /var/log/nginx/error.log - Error log

20 Backup

# Create backup
cd /var/www
sudo tar -czf billard-backup-$(date +%Y%m%d).tar.gz billard/

# Restore backup
sudo tar -xzf billard-backup-20250127.tar.gz

Version History


Pro Billiard Scoreboard System v4.0 | Developed for billiard players