Getting a quick match going doesn't always require finding opponents online. Bonkus supports offline play so you can practice your strategy, test the physics, or just play a casual game against the AI without the coordination overhead of a live lobby.
Web Offline: Solo vs AI
On the web, visit /play/offline to start a single-player game that runs entirely in your browser. You control the first team, an AI opponent controls the rest, and every turn is simulated client-side. The game loads game configuration once from /api/game-configs and caches it for future sessions. If you've loaded the page once, you can play offline even with no internet connection thanks to the service worker.
- No database writes: the match lives in your browser memory only.
- No ratings impact: offline games are unranked and never touch your ELO.
- No persistence: when you refresh or close the tab, the game is not saved.
- Standard turn resolution: offline games use the exact same physics and scoring rules as online matches.
Supported Offline Modes
Not every game mode works offline yet. Right now, you can play:
- Protect the King: eliminate the opponent's king while keeping yours alive
- Four Corners: control four corner zones to build score faster
Both modes follow the standard scoring and round reset logic, so they behave identically whether you're online or offline.
Why Soccer and Battle Royale Are Online Only
Soccer and Battle Royale appear in the mode picker on the offline page but are disabled and labelled "Online only" because they need special rules that don't fit the standard turn resolution:
- Soccer: requires goal detection and ball state that the standard resolver doesn't model.
- Battle Royale: needs power-up spawning and a shrinking arena, which are features beyond standard scoring.
We built the offline engine to reuse server-side turn resolution, which keeps gameplay consistent but also means offline modes must work within that framework. Broader offline support should follow the same shared-core approach. Any future offline Soccer or Battle Royale would need to add those missing rules first.
Mobile Offline: Pass-and-Play
The Expo iOS app has a different offline mode: pass-and-play peer-to-peer games between humans using MultipeerConnectivity. Two players on the same WiFi or Bluetooth can tap the Nearby option and pass the device back and forth, with turns synced locally between the two phones.
Mobile offline uses the same game-core primitives as the web version (packages/game-core/src/game/offline-game.ts), but the experience is designed for local multiplayer rather than solo play against AI.
What's Next
The most likely next step is adding offline support for Soccer and Battle Royale, since the missing rules described above are the main blocker. That work will follow the same pattern: use the shared game-core, handle mode-specific rules in the offline resolver, and keep offline games running deterministically client-side.
If you run into an offline game that doesn't feel right, open an issue on GitHub.