Billiard Scoreboard Documentation v4.2

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

New in Version 4.2:

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_de.php # Live monitor (German) ├── monitor_en.php # Live monitor (English) ├── 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_de.html # Dokumentation (German) ├── help_en.html # Documentation (English) ├── scoreboard_logo.svg # Logo ├── billiard_data.db # SQLite database ├── tables.json # Live table data ├── config.php # Configuration (Master PIN, OBS_INTERVAL) │ ├── /obs/ # OBS text files (auto-generated) │ ├── table1_player1.txt │ ├── table1_score1.txt │ └── ... │ ├── /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 (DE) http://[IP]/monitor_de.php Live display of all tables (German)
Monitor (EN) http://[IP]/monitor_en.php Live display of all tables (English)
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)
Hilfe (DE) http://[IP]/help_de.html Documentation (German)
Help (EN) http://[IP]/help_en.html This documentation (English)

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)

Color Scheme via URL NEW

The color scheme can be set directly via a URL parameter. Both German and English names are accepted:

Parameter (EN)Parameter (DE)Color Scheme
?theme=yellow ?theme=gelb Default (Yellow/Gold)
?theme=blue ?theme=blau Blue/Cyan
?theme=green ?theme=gruen Green
?theme=white ?theme=weiss Light Mode

Language via URL NEW

The language can be set directly via a URL parameter:

ParameterLanguage
?lang=de German
?lang=en English
Tip: Parameters can be combined, e.g. http://[IP]/?Tisch=1&theme=blue&lang=en

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 Game Timer & Header Display NEW v4.2

During a running game, the discipline and running game time are displayed in the header.

Features

Tip: The game time is also transmitted to the OBS text files (as start time).

10 OBS Text Files NEW v4.2

In addition to the browser overlays, individual TXT files are automatically generated in the /obs/ folder. These can be used as browser sources in OBS.

Available Files per Table

FileContentExample
table1_discipline.txtDiscipline14/1
table1_raceto.txtRace to100
table1_player1.txtPlayer 1 nameMax Mustermann
table1_player2.txtPlayer 2 nameJohn Doe
table1_club1.txtClub player 1BC Berlin
table1_club2.txtClub player 2BC Bremen
table1_score1.txtScore player 142
table1_score2.txtScore player 238
table1_innings1.txtInnings player 112
table1_innings2.txtInnings player 211
table1_highseries1.txtHigh run player 115
table1_highseries2.txtHigh run player 29
table1_series1.txtCurrent run player 13
table1_series2.txtCurrent run player 20
table1_gd1.txtGD player 13.50
table1_gd2.txtGD player 23.45
table1_starttime.txtStart time14:30:00
table1_matchtime.txtMatch time (HH:MM)01:23
table1_balls.txtBall count (One Pocket / Bank Pool)5/8 - 3/8

Setup in OBS (Browser Source)

The recommended method is using a Browser source with the xObsBrowserAutoRefresh plugin:

  1. Install the xObsBrowserAutoRefresh plugin
  2. In OBS: Sources → + → Browser
  3. Enter URL: http://[SERVER-IP]/obs/table1_score1.txt
  4. Adjust width/height as needed
  5. Enter Custom CSS for text formatting:
body {
    color: #ffffff;
    font-family: "Arial";
    font-size: 40px;
    font-weight: bold;
    text-shadow: 2px 2px 4px #000000;
    overflow: hidden;
}
  1. Right-click on the browser source → Filters
  2. Click + to add the "Browser Auto-refresh" filter
  3. Set the interval to 15 seconds
Tip: Font, size, color and shadow can be freely customized via CSS. Each text file can be added as its own browser source with individual styling.
Note: Files are updated every 15 seconds (configurable via OBS_INTERVAL in config.php). The /obs/ folder is created automatically.
matchtime: Shows elapsed match time in HH:MM format (no seconds). Only calculated during an active game, otherwise "-".
balls: Shows ball count only for One Pocket and Bank Pool disciplines (e.g. "5/8 - 3/8"). Shows "-" for all other disciplines.
Tip: Text files are ideal for custom OBS layouts where name, score and statistics need to be freely positioned.

11 Winner/Alternate Break

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.

12 Help Buttons (Rules & Rack)

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.

13 GD (Game Average)

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.

14 14/1 History (Player Statistics)

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.

15 Multi-language Support (i18n)

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.

16 14/1 Live Innings

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.

17 New Disciplines

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.

18 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.

19 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"

20 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)

21 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

22 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.2 | Developed for billiard players