A multiplayer checkers game designed for BanterVR, built with Banter Space State (Serverless).
- 3D Checkers Board: Traditional 8x8 checkers board with geometric pieces
- Real-time Multiplayer: Synchronizes moves between players using Banter's Space State
- Standard Rules: American checkers with forced jumps, multi-jumps, and king promotion
- BanterVR Ready: Embeddable in any Banter space with customizable positioning and scaling
- Serverless: Runs entirely client-side, no backend server required
- A web host (GitHub Pages, Netlify, Vercel, etc.) or a local web server for testing.
- Clone the repository.
- That's it! No build process is required.
-
Local Testing: Serve the
publicfolder using a local web server (e.g., Live Server in VS Code, orpython -m http.server). -
How to Play Checkers:
- Click a piece to select it (green highlight shows selected piece, blue highlights show valid moves)
- Click a valid square (blue highlight) to move
- Jumps: You must jump (capture) opponent pieces if possible
- Multi-jumps: If you can continue jumping after a capture, you must do so
- King Promotion: Pieces reaching the opposite end become kings (shown with gold crown)
- Kings: Can move and jump both forward and backward
js/embed.js: Checkers game logic and Banter integration
To embed in BanterVR, add the embed script to your space's HTML. The game will automatically synchronize between all players in the space.
Add this to your Banter space HTML:
<script src="https://banter-checkers.firer.at/checkers.js"></script>Customize the board's appearance and behavior using HTML script attributes (recommended) or legacy URL query parameters (for backwards compatibility).
HTML Script Attributes Example:
<script src="https://banter-checkers.firer.at/Checkers.js" boardPosition="0 1.1 -2" boardScale="1.5" boardRotation="0 45 0"></script>Legacy URL Query Parameters Example:
<script src="https://banter-checkers.firer.at/Checkers.js?boardPosition=0+1.1+-2&boardScale=1.5&boardRotation=0+45+0"></script>Available Attributes / Parameters:
boardPosition/position/board-position: Board position in 3D space asx y z(Default:0 1.1 -2)boardRotation/rotation/board-rotation: Board rotation asx y zdegrees (Default:0 0 0)boardScale/scale/board-scale: Board scale as single value orx y z(Default:1)resetPosition/reset-position: Reset button position relative to board asx y z(Default:0 0 2.5)resetRotation/reset-rotation: Reset button rotation asx y zdegrees (Default:0 0 0)resetScale/reset-scale: Reset button scale as single value orx y z(Default:1)hideUI/hide-ui: Set totrueto hide the reset button (Default:false)instance: Custom instance/room identifier (Default: current URL)hideBoard/hide-board: Iftrue, hides the game board. (Default:false)useCustomModels/use-custom-models: Iftrue, uses custom GLB models for the pieces instead of the default spheres. (Default:false)lighting: Set tolitto use physically-based lit materials that respond to scene lights. (Default:unlit)addLights/add-lights: Whenlighting=lit, this controls whether a default directional light is added. Set tofalseif you have your own lights. (Default:true)
Multiple boards in the same space (using Attributes):
<!-- Board 1: Center -->
<script src="https://banter-checkers.firer.at/Checkers.js" instance="board1" boardPosition="0 1 -2"></script>
<!-- Board 2: To the right -->
<script src="https://banter-checkers.firer.at/Checkers.js" instance="board2" boardPosition="3 1 -2"></script>Rotated board (using Attributes):
<script src="https://banter-checkers.firer.at/Checkers.js" boardRotation="0 45 0"></script>Larger board without UI (using Attributes):
<script src="https://banter-checkers.firer.at/Checkers.js" boardScale="2" hideUI="true"></script>MIT