BGS Docs

Game clocks & timing

Most BGS games use a separate thinking-time budget for each player. Real-time games can instead manage their own shared clock, with BGS waking the engine at its next deadline. The default remains player clocks.

What the creator configures

At game creation, the host picks two values, stored on the game as options.timing:

Two optional modifiers:

Players receive an email one hour before a scheduled game and an inbox reminder ten minutes before. Browser reminders use the notification setting for this device and require the site to be open. Scheduled-game emails have their own setting and unsubscribe link. The table also has an Add to calendar button.

If the host changes the time, everyone who joined must confirm again. Players can leave without a penalty; those who don't respond are never started into the game. If confirmations or setup are still missing at the new start time, the table is cancelled without an inactivity penalty. Time changes and cancellations appear in the inbox immediately; emails are grouped for five minutes. Email limits apply per recipient, and outdated reminders are discarded.

Shorter timePerGame/timePerMove values make a "live" game; the usual settings make asynchronous games that play out over days.

Play now

For an unscheduled live game, Play now holds your seat for 5, 15 or 30 minutes (default: 15). You can extend the wait. Keep BGS open (you can play another game while waiting); after 90 seconds without a connection, your seat is released. Switching browser tabs does not itself release your seat.

When a player joins the last open seat, that join counts as their ready confirmation. The players already waiting have two minutes to confirm. Missing confirmations release only those seats; the other players and chat stay. Any player change resets the ready check; a new player filling the table is automatically ready, while the waiting players must confirm again. Waiting costs no karma or Elo and sends no emails. Player clocks start only after everyone is ready and the game begins.

A banner appears wherever you are on BGS when your table is ready or your live game starts. You can enable sound and browser alerts too. Opening the game clears its start alert. The lobby puts live tables first; games scheduled more than 15 minutes away keep their normal position.

Quick tables are available on individual boardgame pages. The main lobby features Gaia Project (Lost Fleet, preference-split auction), Powergrid (fast bids) and Container. Primordial Soup uses new genes and Outpost uses sealed bidding; other games use their usual defaults.

The lobby offers shared standard tables, created when someone first joins. Each person can hold one Play now seat at a time. Scheduled games and persistent tables keep their separate start rules.

How clocks move

The game-server maintains, per current player, a timerStart timestamp and a deadline (computed from the player's remainingTime, skipping the paused hours when a timer window is set).

Saving a move settles elapsed thinking time and synchronizes active players with currentPlayer(data). Leaving players pause their clocks; returning players resume from their remaining time.

A credited clock is capped at timePerGame and has a floor of timePerMove. Pausing or reopening alone does not provide that floor or a free increment. If a player stays active after receiving time, their deadline reflects the new balance. During live updates, players who remain active without receiving time keep their existing clock and deadline.

Games can have several current players at once (e.g. 6nimmt!, where everyone picks a card simultaneously) — each current player has their own timerStart/deadline, and each clock only runs while that player is current.

Timeouts, drops, and inactivity

Automatic enforcement at 60+2 or faster

For games with at most 1 hour per player and at most 2 minutes per move (timePerGame <= 3600 and timePerMove <= 120), the game-server checks timeouts roughly every second, even when nobody has the game open. Both limits must be met; a missing base clock does not qualify, while an omitted increment means zero. This is narrower than the live/async labels used in game listings. Solo games and engine-managed clocks are excluded, and bots are never timeout-drop targets.

Eligibility is rechecked under the game lock. A move that renews a player's deadline before timeout processing prevents that stale timeout from dropping them. Automatic enforcement is background processing, not a precision timer.

Manual claims and slower games

What this means for engine authors

Games with their own clock

Set the game version's Time control to Game manages its own clock (timeControl: "engine"). BGS then hides player clock settings and does not assign per-player deadlines, time increments, inactivity drops, or turn emails. Scheduling a future start still works.

Implement both advanceTime(data, context) and nextWakeup(data):

export function nextWakeup(data) {
	return data.phase === "flight" ? data.nextAnnouncementAt : null;
}

export function advanceTime(data, { now }) {
	const next = structuredClone(data);
	while (next.nextAnnouncementAt !== null && next.nextAnnouncementAt <= now) {
		processNextAnnouncement(next);
	}
	return next;
}

Deadlines are absolute Unix milliseconds. null means the engine is waiting for players: useful for repairs, campaign decisions, or an untimed resolution phase. A returned deadline must be later than context.now.

BGS supplies context.now to init, move, dropPlayer, and stripSecret. It is assigned on the server after acquiring the game lock and never moves backwards for a game. Never trust a timestamp sent inside a player move. A browser may interpolate a countdown from the latest server time for display; the engine decides whether a move arrived in time.

BGS saves the next wakeup in MongoDB and checks due games roughly every 250 ms, even with no connected viewers. Waking is not a precision timer: your engine must consume all events up to now, tolerate repeated calls, and catch up after a restart. Before processing a move, BGS commits any due events under the same game lock. Rejecting a late move cannot roll back a closed phase.

advanceTime returns the complete, serializable state to persist; BGS does not run toSave on it. Use isLiveUpdate for intermediate announcements. Endings still receive normal result processing. A failed wakeup is logged and retried after 30 seconds; other games can continue.

Game-managed clocks currently do not support analysis mode. A simulation clock needs its own adapter before those games can safely offer analysis.

Throw InvalidMoveError (from @boardgamers/protocol/engine) for an expected invalid command, such as playing after a phase closes. BGS returns HTTP 422 instead of recording an internal server failure.

Continuing at the same table

Set a game version's Persistent table to live or async to keep the crew, chat and table URL between games. Each play still has its own result and replay. Waiting tables do not expire.

Changing setup creates a fresh game with fresh readiness. Players can leave between games without changing earlier results. Table reservations never send invitation emails.

Without this setting, the ordinary Play again flow below applies.

Play again creates a separate game with the same seats and fresh randomness. Other players must confirm their seats again; the host then starts. These reservations send no invitation emails and consume no thinking time. Setup options and expansions can change between games. The table's stable URL opens its current game, and history is paginated by game number.

Each completed game keeps its original state and replay. The next game receives only the engine's versioned tableProgress checkpoint through context.table.progress. Match characters by account ID; carry no hands or seeds. See the engine hooks.

BGS tracks loaded, visible participant viewers with an eight-second connection lease, renewed every two seconds. Multiple tabs count as one present player. Disconnects and game deadlines are processed in order, including after a server restart. Engines receive seat changes through presenceChanged, not ordinary moves. Readiness is separate consent: a heartbeat never extends it.

Progress stays at its table; it is not an account-wide character service. A short campaign can also stay inside one game, returning null from nextWakeup between missions.

For cooperative games, choose Unrated (rating: "none") on the game version. New games then skip Elo settlement; past results stay unchanged.