Showtime Bingo: Customization Guide

Step-by-step changes for people who do not program. Everything works with a free text editor.

1. Before you start

  1. Make a copy of the whole download. If something goes wrong, you can go back to it.
  2. Install a free code editor such as Visual Studio Code (or Notepad++ on Windows). For pictures, the free GIMP or Krita open and export WebP files. For sounds, the free Audacity exports MP3.
  3. Work inside source/. To see your changes, open a terminal in that folder and run npm run dev, then open http://localhost:5180/. The game does not run by double-clicking index.html, because browsers block JavaScript modules on file://.
  4. No terminal? Edit the files of game/ directly, upload them to your host and reload the page.

2. What to edit for what

Main menu of the game

Work inside source/. This table says where each part of the game lives. Change one thing at a time and look at the result in the browser.

You want to change Edit
The points, the power-up, how long the rivals wait RULES at the top of src/game/rules.js
The speed of the balls FEEL.speed in src/config.js
The starting number of cards and the first choices of a new round DEFAULTS in src/lib/storage.js
The patterns src/game/rules.js, src/config.js, src/ui/panels.js and the texts
The names and pictures of the rivals RIVALS in src/config.js and assets/ui/rival-*.webp
The stamps and when they unlock STAMPS in src/config.js and assets/ui/stamp*.webp
The fox host assets/fox-*.webp
The stage, the globe and the curtains assets/stage/*.webp
The card frame, the buttons and the panels assets/ui/*.webp (nine-slice pictures)
Logo, name, colours and fonts assets/logo.webp, index.html, src/ui/base.css, src/config.js
Sounds, music and the ball calls (voice) assets/audio/ and src/audio/files.js
Every text and every language src/lib/locales/<code>.js
Particles, shake and other feel numbers FEEL in src/config.js
The name of the save in the browser KEY in src/lib/storage.js

3. Scores, the wrong-call penalty and the power-up

A round: the score, the power-up and the BINGO button

Open src/game/rules.js. At the top there is a block called RULES:

export const RULES = {
  rivals: 3,
  chargeMax: 8, // marks PER CARD to fill the power-up
  // a rival takes [minimum, maximum] balls to call bingo (it gives the player a chance). Tuned with the simulated player of test/rules.test.mjs
  rivalLag: { line: [0, 2], corners: [0, 2], x: [0, 2], blackout: [1, 3] },
  score: { daub: 100, bingo: 5000, ballLeft: 50, falseCall: -300 },
};

score holds the points: daub for each mark, bingo for a BINGO, ballLeft for every ball that is still in the machine when you win, and falseCall for a wrong BINGO (a negative number: the score never goes below 0). Change a number and save. The score board, the number that flies up when you mark, the number that falls after a wrong call and the bonus of the result all follow it.

chargeMax is how many marks fill the power-up, for each card in play: with 2 cards it needs 16 marks. Use a smaller number to give the power-up more often and a larger one to give it less. rivals is the number of rivals: keep it at 3, because the screen has room for exactly 3.

Run npm test after a change. A check plays thousands of rounds and expects the player to win between about 47% and 67% of the rounds (Blackout 40% to 56%), so changing the rivals can make it fail: if you want a different balance on purpose, change those limits in tests/rules.test.mjs.

4. How fast the rivals call BINGO

The rivals mark every number by themselves. When one of them completes the pattern, it waits a few more balls before it calls: that wait is rivalLag in RULES, one pair of numbers for each pattern, [least, most], counted in balls. The game picks a number inside that pair for each rival, each round.

A bigger pair gives the player more time: [0, 2] means the rival calls at once or up to 2 balls later, and [3, 6] makes the game much easier. [0, 0] makes every rival call the moment it completes the pattern, which is the hardest setting. Blackout already waits longer ([1, 3]) because its cards take so long to fill.

Look at the result in a few rounds on a speed you know. The rivals do not get faster when you play faster: only the wait changes. To change how many rivals play, you would also have to change the screen, so keep 3.

5. The speed of the balls

The speed choice of a new round

In src/config.js, FEEL.speed is the time between one ball landing and the next, in milliseconds, for the 3 speeds of the New round panel:

speed: { relaxed: 5200, classic: 2800, fast: 2000 },

The flight of the ball (flight, 620) and the wind-up of the globe (windup, 400) happen inside that time, and the game never waits less than 120 ms between balls. So keep every speed above about 1,200. relaxed must stay the slowest and fast the fastest, or the buttons will feel out of order (a check in npm test looks at it).

The ball can also be drawn sooner by tapping the tray or the globe. pullGap (450) is the short time after a landing when a tap is ignored, so nobody pulls two balls by accident, and pullHints (3) is how many balls the player pulls before the hint "Tap for the next ball" stops showing.

6. How many cards the player starts with

The New round panel remembers the last choice. For a new player, the first choice comes from DEFAULTS in src/lib/storage.js: cards (1 to 4), pattern (line, corners, x or blackout) and speed (relaxed, classic or fast):

const DEFAULTS = {
  bingos: 0,
  best: 0,
  rounds: 0,
  cards: 2,
  pattern: 'line',
  speed: 'classic', // last choice of the "new round" screen
  musicVol: 0.8,
  sfxVol: 1,
  vibe: true,
  autoDaub: false,
  howSeen: false,
  reduced: null, // null = follows the system; true/false = the player's choice
  pulls: 0, // balls the player has already pulled (the hint disappears afterwards)
  setSeen: false, // has seen the party of the complete collection
  stamp: 'stamp', // stamp chosen in the collection
  lang: null, // null = browser language
};

Change cards: 2 to 1, 3 or 4. The options of the panel are the numbers 1 to 4 in buildPicks (src/ui/panels.js). Four is the most the screen can lay out, so do not add a 5th. A player who already played keeps the choice saved in the browser; to see your change, clear the save (see section 17).

7. Change a pattern or add a new one

The pattern choice of a new round

A pattern is a list of squares of the 5 x 5 card, numbered 0 to 24 in reading order (row by row, from the top left; square 12 is the FREE square in the centre). The squares of 4 Corners are 0, 4, 20 and 24. These are the places where a pattern lives, and all of them must agree:

Place What it holds
PATTERNS and SHAPES in src/game/rules.js The name of the pattern and the squares that close it. Line is special: it is any of 12 lines.
rivalLag in RULES The pair of numbers of the wait of the rivals for that pattern.
PATTERN_ICON and PATTERN_START in src/config.js The squares drawn in the small picture of the pattern, and how many squares are missing at the start (the squares of the shape that are not FREE).
label.pattern in buildPicks, src/ui/panels.js The text key of the button, for example pFrame.
Every file of src/lib/locales/ The new text key (pFrame) with the name of the pattern, in the 14 languages.

To change an existing pattern, edit its squares in SHAPES (rules) and PATTERN_ICON (config), and write the new number of missing squares in PATTERN_START. Check it with npm test: a check compares PATTERN_START with what the rules say.

To add a pattern, add its name to PATTERNS, its squares to SHAPES, a pair to rivalLag, then the same name to PATTERN_ICON and PATTERN_START, a line in label.pattern and a text key in the 14 language files. This is an example of a new pattern called frame, the 16 squares around the edge:

// src/game/rules.js
export const PATTERNS = ['line', 'corners', 'x', 'blackout', 'frame'];
const SHAPES = {
  frame: [0, 1, 2, 3, 4, 5, 9, 10, 14, 15, 19, 20, 21, 22, 23, 24],
  // ...the other shapes
};
// in RULES: rivalLag: { ..., frame: [0, 2] }

// src/config.js
export const PATTERN_ICON = { frame: [0, 1, 2, 3, 4, 5, 9, 10, 14, 15, 19, 20, 21, 22, 23, 24], /* ... */ };
export const PATTERN_START = { /* ... */ frame: 16 };

// src/ui/panels.js, in buildPicks
pattern: { line: 'pLine', corners: 'pCorners', x: 'pX', blackout: 'pBlackout', frame: 'pFrame' },

// src/lib/locales/en.js (and the other 13 files)
pFrame: 'Frame',

Limits: the panel shows the patterns in one row, so 5 or 6 patterns still fit but the names get smaller; keep each name short. The end of the round has a special animation for 4 Corners, X and Blackout only; a new pattern uses the simple one. A test checks that every pattern has all its parts, so npm test tells you what you forgot. The check of the simulated player only asks that a new pattern is won in 5% to 95% of the rounds.

8. Rival names and pictures

The rivals during a round

The 6 rivals are in RIVALS in src/config.js: a name (it is not translated) and the name of its pictures. Each round picks 3 of them:

export const RIVALS = [
  { name: 'Jack', img: 'rival-1' },
  { name: 'Mia', img: 'rival-2' },
  { name: 'Walter', img: 'rival-3' },
  { name: 'Nina', img: 'rival-4' },
  { name: 'Ruby', img: 'rival-5' },
  { name: 'Marcus', img: 'rival-6' },
];

Every rival has 3 pictures in assets/ui/: rival-1.webp (calm), rival-1-hot.webp (excited, when it is close) and rival-1-win.webp (celebrating). They are about 190 x 192 pixels, WebP with a transparent background, with the face centred. Keep the 3 pictures of one rival the same size, so the face does not jump when they swap.

To rename a rival, change name. To give it a new face, replace its 3 pictures with the same names. To add a 7th rival, make its 3 pictures (rival-7.webp, rival-7-hot.webp, rival-7-win.webp) and add a line with img: 'rival-7'; a test checks that all 3 pictures exist. Names should be short: they are shown under the face in a small space.

9. Stamps and the numbers that unlock them

The collection of stamps

The collection is STAMPS in src/config.js. Each stamp has an id (the name of its picture), at (the total of bingos that unlocks it), part (the small particle that flies when it marks) and ink (the colour of the ink):

export const STAMPS = [
  { id: 'stamp', at: 0, part: 'star', ink: '#ffce3a' },
  { id: 'stamp-heart', at: 3, part: 'heart', ink: '#ff7d9c' },
  { id: 'stamp-gem', at: 10, part: 'gem', ink: '#6ed8ff' },
  { id: 'stamp-crown', at: 20, part: 'crown', ink: '#c18cff' },
  { id: 'stamp-clover', at: 35, part: 'clover', ink: '#6fe39a' },
  { id: 'stamp-note', at: 50, part: 'note', ink: '#ffa95c' },
];

Change a number in at to unlock a stamp sooner or later. The list must go up (0, 3, 10, 20...) and the first one must be 0, so the player has a stamp from the start; a test checks it. The pictures are assets/ui/stamp.webp, stamp-heart.webp... (about 256 x 256, transparent). The part is the name of a picture in assets/fx/: star, heart, gem, crown, clover or note.

The collection panel has room for 6 stamps. To change the picture of a stamp, replace its file. To rename one, change id and the file together. The text under the progress bar (unlockAt) says how many bingos are needed.

10. The fox host

The fox host beside the cards

The fox is 14 pictures in assets/: fox-idle.webp, fox-blink.webp, fox-talk.webp, fox-talk2.webp, fox-hype.webp, fox-gasp.webp, fox-cheer.webp, fox-shrug.webp, fox-point.webp, fox-bow.webp, fox-toss.webp, fox-tie.webp, fox-tap.webp and fox-wink.webp. Every picture has the same size, 1054 x 1250 pixels, with a transparent background.

The feet must stand in the same place in all 14 pictures, because the game swaps them without moving the body. The mouth opens by swapping fox-talk and fox-talk2, and the eyes blink with fox-blink. To change the host to another mascot, draw all 14 poses on the same canvas, with the feet at the same height, and replace the 14 files with the same names.

The picture fox-idle.webp is loaded first, so the start screen shows the host quickly: index.html has a line <link rel="preload" as="image" href="assets/fox-idle.webp"> for it. If you ever rename fox-idle.webp, change that line too, or the browser will download the picture twice.

11. The stage, the globe and the curtains

The stage behind the game

The background is made of layers in assets/stage/. Replace a file with the same name and size:

File What it is
city-l.webp (1672 x 941), city-p.webp (940 x 1672) The night city, for wide screens (l) and tall screens (p). It has no transparency.
stage-l.webp, stage-p.webp (same sizes) The stage and the floor in front of the city (transparent).
wheel.webp (420 x 420) The Ferris wheel that turns slowly behind the stage.
globe-back.webp, globe-front.webp (809 x 1100) The ball globe: the empty back and the cage with the shine in front. The balls are drawn between them.
curtain.webp (900 x 900) The curtains that close between the screens.

The lights of the logo, the globe and the stage are drawn at the spots listed in src/fx/spots.js, as a fraction of each picture. If you move the lights in a new picture, change those numbers too. The beams are assets/fx/beam.webp. The horizon of the water, the band of the buildings and the centre of the wheel are in ART near the top of src/fx/stage.js.

12. The card frame, the buttons and the panels

A card, the buttons and a panel

The frame of a card, the buttons, the panels and the plates are nine-slice pictures: the game stretches the middle and keeps the 4 corners. To replace one, make a new picture with the same size and keep the corners the same size. Use the table:

Picture Size and corner
assets/ui/card.webp 403 x 390 pixels, corner 66. The frame of every card.
assets/ui/btn-red.webp, btn-purple.webp, btn-green.webp About 640 x 197 pixels, corner 62. The big buttons.
assets/ui/panel.webp, band.webp 768 x 756 pixels, corner 70, and 758 x 164, corner 56. The panels and their title ribbon.
assets/ui/plate.webp, row.webp, track.webp 640 x 180 (corner 40), 768 x 121 (corner 36) and the volume track. The plates, the rows of settings and the volume bar.

The corner numbers are in the border-image lines of src/ui/base.css, game.css and panels.css. If you change a picture to another size, change its number there to the width of the corner in your picture. The text on the buttons is not part of the picture: it is a live text, so the same button works in every language.

13. Logo, name, colours and fonts

The title with the logo

14. Sounds, music and the ball calls

The sound panel

Every effect is an MP3 in assets/audio/. Replace a file and keep its name. The list of files is src/audio/files.js.

Files When they play
daub, note, ball-out, ball-roll, ball-land, ball-click, globe-rush, globe-spin Marking a number, and the ball in the globe, on the ramp and in the tray.
bingo-press, win-hit, win-note, letter-drop, confetti, applause, cheer, star, lose, rival-bingo The BINGO call, the win, the letters B-I-N-G-O, the crowd and the stars, and a loss.
near, lamps, spotlight, drumroll, ready, wrong, false-call The "1 to go" suspense, the BINGO button ready, a wrong mark and a wrong call.
power-drop, power-seg, power-full, power-zap, power-hit, power-drain The power-up filling and being used.
ui-tap, ui-back, ui-pick, panel-in, panel-out, toggle, slider, curtain Buttons, panels, switches, sliders and the curtains.
m-menu, m-jogo, m-vitoria, amb-crowd The music of the menu, of the round and of the victory, and the crowd that loops during a round.

To add an effect, put the MP3 in assets/audio/, add its name to sfx in src/audio/files.js and play it from the code with play('name'). The levels of the sounds are GAIN and MIX at the top of src/audio/audio.js. The two volume bars (Music and Effects) are the player's; the voice follows Effects.

The ball calls: the fox says a letter and then a number, recorded as separate files in assets/audio/voz/: letra-b, letra-i, letra-n, letra-g and letra-o (5 files) and num-1 to num-75 (75 files), plus 8 phrases (ready, near, bingo, best, clutch, lose, mic and hi). To call the balls in another language, record those 80 files and replace them, keeping the names. Record one word per file with no silence at the start and similar volume, because the game plays the letter and the number one after the other.

Turning the voice off for good: open src/audio/files.js and change the voz list to voz: []. The fox then calls every ball in silence and moves his mouth closed. A ball is called with its letter and its number together, so the letters and the numbers go together: removing only one of them silences the calls.

15. Texts and languages

The language list

16. Particles and feel numbers

A round with particles and lights

Open src/config.js. FEEL has every number that changes how the game feels. The most useful:

Setting What it does
FEEL.cap, capTouch, confetti, rain The most particles on screen (fewer on touch devices), the pieces of confetti of a win and the balls of the rain.
FEEL.trauma, hitstop How much the screen shakes when you mark or win, and the short freeze of the image on a hit.
FEEL.globe The number of balls in the globe and how they move (gravity, bounce, the rush when it spins).
FEEL.comboWindow, quickMs How close in time two marks must be to raise the note, and how quick a mark must be to count as quick.
FEEL.vibe The length of each vibration pattern, in milliseconds.
FEEL.curtain, loseWait, stars The time of the curtains, the pause before a loss and when each of the 3 stars of the result appears.

The numbers only change how the game looks, sounds and feels. They never change a rule, a draw or a score. Change one number at a time and play a round to see it.

17. The save and starting over

The progress stays in the browser of each player, as one object under the key showtimebingo_v1 (KEY in src/lib/storage.js). If you publish a very different version of the game, change that name so old saves do not mix with the new one.

To start over, delete this key in the developer tools (F12), under Application, Local Storage, or clear the site data of the browser.

18. Publish your version

  1. In source/, run npm test and npm run build. This writes source/dist/.
  2. Back up the game on your website, then upload the contents of dist/ in place of the old files.
  3. Keep the folders as they are. If you added a new file or folder next to index.html, add its name to PARTS in source/tools/build.mjs.
  4. Clear the browser cache to see the new version (see the buyer guide).

Support: willian@polargames.com.br