SportsLast reviewed

Royal Pool King

Royal Pool King is 8-ball pool with its own physics engine. You can practise on an empty table, play three computer opponents, work through 22 career levels or play a friend. This page explains how shots, spin and the computer players work, with the numbers from the game's code.

Royal Pool King

Royal Pool King

Browser-native HTML5 game. No downloads or installations required.

How to play Royal Pool King

  1. Choose Practice for a free table, AI Match for a full game against the computer, Career for set challenges, Local 2 Player for two people on one device, or Play with Friend to play online.
  2. Aim by moving the pointer around the table. A guide line shows where the cue ball will go; the aim assist setting (Off, Basic or Full) decides how much of the predicted path is drawn.
  3. Set the power by dragging back on the table, then release, or set it on the power bar and press Shoot.
  4. Before you shoot, use the spin selector: above centre is follow, below centre is draw, left and right add side spin. Double-tap it to return to centre.
  5. In 8-ball, the first legal pot decides whether you are solids or stripes. Clear your group, then pot the 8. Potting the cue ball or failing to hit one of your balls first is a foul and gives your opponent ball in hand; potting the 8 on a foul loses the frame.

Controls

Keyboard and mouse

Move the mouse to aim, drag back on the table and release to shoot, or press Shoot. Press G to cycle aim assist between Off, Basic and Full. Click the spin selector to set spin.

Touchscreen

Drag on the table to aim and pull back to set power, or use the power bar and Shoot button. Tap the spin selector to set spin and double-tap it to reset.

Difficulty, in numbers

SettingWhat changesValues from the code
Beginner ("Rookie Bot")Picks simple shots and misses often. Compares 3 candidate shots and does not simulate them.Aim spread 3.2° · power spread 25% · blunder chance 25%
Intermediate ("Club Bot")Compares 12 candidate shots, checks for blocking balls and picks sensible power.Aim spread 0.42° · power spread 10% · blunder chance 5%
Advanced ("Hustler Bot")Compares 24 candidates and runs up to 28 of them through the real physics to plan cue-ball position and avoid scratches.Aim spread 0.1° · power spread 4% · never blunders

Aim and power spread are the size of the random error added to the shot the computer chose. Blunder chance is how often it deliberately plays a poor shot instead.

Tips

These tips follow from how the game's rules and numbers work.

  • Side pockets are smaller than corner pockets (radius 54 against 64), so on a thin cut, aim for a corner when you have the choice.
  • To stop the cue ball where it hits on a straight shot, hit dead centre with firm pace. With no spin it slides into the object ball and passes on almost all its speed.
  • Bank shots lose a fifth of their speed at every cushion, so play a bank firmer than a direct pot of the same length.
  • Use follow (top of the spin selector) to drive on after the pot and draw (bottom) to bring the cue ball back. Career levels 12 and 13 are built around exactly these two shots and are good practice.
  • Against the Beginner bot, leave it long or thin shots: it aims with a 3.2° spread and only considers three options, so it misses those often. The Advanced bot's spread is 0.1°, so against it, safety play matters more than hoping for a miss.

Developer notes

A fixed-step physics loop

The balls do not use a general-purpose physics library. The game runs its own simulation at a fixed step of 1/240 of a second, up to 60 steps per frame, so a shot plays out the same way on a 60 Hz phone and a 144 Hz monitor. Phaser 3.90 draws the table.

Sliding, then rolling

Every ball tracks its velocity and its spin. Right after a strike the ball slides: the point touching the cloth is moving, and friction (coefficient 0.2) both slows the ball and converts the slip into roll. Once the slip is gone the ball rolls, and it slows by a constant amount plus a little drag that grows with speed, until it is slow enough to stop. Simplified from the game's code:

// rolling: lose a fixed amount plus a speed-dependent amount each second
const decel = cfg.rollingDecel + cfg.rollingDrag * speed; // 110 + 0.32 × speed
const newSpeed = speed - decel * dt;
if (newSpeed <= cfg.stopSpeed) stop(ball);                // stopSpeed = 6

This two-stage model is what makes spin work. Hit the cue ball dead centre on a straight shot and it slides into the object ball, hands over almost all its speed and stops. Hit it high and it is still turning forward after the collision, so friction drags it on through: a follow shot.

Collisions and cushions

Ball-to-ball collisions have a restitution of 0.95, so each hit loses about 5% of the energy. Cushions return 80% of the ball's speed (restitution 0.8), apply friction of 0.14 along the rail and keep a quarter of the ball's spin, which is why side spin widens or narrows the angle a ball leaves a cushion at.

The table

The table measures 2,240 × 1,120 units, the 2:1 shape of a real pool table. Balls have a radius of 28.6 units. Corner pockets have a radius of 64 and side pockets 54, which is why the career level "Side Door" tells you to aim for the middle of the mouth.

How the computer chooses a shot

Each bot lists candidate shots and scores them. A pot is worth a base of 100 points plus a bonus of 350, with penalties for thin cuts, long distances and balls in the way, minus 600 for a likely foul and plus 10,000 for a shot that wins the frame. It then weighs where the cue ball will end up and how good the position is for its opponent. The three levels differ in how many candidates they consider and how much random error is added to the chosen shot (see the table above). Only the Advanced bot runs its candidates through the physics engine before choosing, which is how it plans position rather than just pots.

Career mode

There are 22 career levels rated from one to five stars. They start with "First Contact", a single straight pot in three shots, and teach one idea at a time: cut shots, banks, speed control, follow (level 12) and draw (level 13). Full matches against the computer appear at level 9 (Beginner), level 17 (Intermediate) and levels 20–21 (Advanced, including a handicap match where you start two balls up). The last level, "Grand Finale", asks you to clear nine balls in fourteen shots and under five minutes.

Screenshots

Royal Pool King practice table with the cue lined up on the rack, the spin selector and the Shoot button
Practice mode. The dashed line is the aim guide; the spin selector (top right) sets follow, draw and side spin.

Questions

How many computer opponents are there?

Three: Beginner, Intermediate and Advanced. The table above shows exactly what changes between them.

What does aim assist do?

It controls how much of the predicted path the guide line shows. There are three settings, Off, Basic and Full, in the gameplay settings. On a keyboard, press G to switch between them.

Is my progress saved?

Your profile, career progress, coins and settings are saved in this browser (IndexedDB and local storage). Clearing this site's data or using a private window resets them.

Can I play against a friend?

Yes, either on one device with Local 2 Player, or online with Play with Friend. Online play connects the two browsers directly using the public PeerJS service; the Privacy Policy explains what that shares.

Guides for Royal Pool King

Guide · Royal Pool King

Royal Pool King: Aiming, Spin and Cushion Guide

How to aim, use spin and play cushions in Royal Pool King, explained with the game's own physics: sliding and rolling friction, 80% cushion rebound, pocket sizes and how the three computer opponents aim.

· 4 min read

Other games

Carrom Royale

Carrom in your browser with Classic, Disc Pool and Freestyle rules, three computer levels, pass-and-play and online play with a friend.

Chessvion

Chess in your browser against ten levels of the Stockfish 19 engine, with 117 puzzles, 7 lessons, endgame drills and an opening explorer.

StrategyPlay Now