Checkers is a classic board game implemented in a web environment using the Dojo Engine. This project leverages Starknet’s Layer 2 to create a fully decentralized, on-chain checkers game. All game logic, including player moves, validations, and win conditions, is implemented with smart contracts on Starknet, ensuring transparency and fairness.
- Create Burners
- Controller
Before you begin, ensure you have the following installed on your machine:
Open a terminal and run:
cd dojo-starter
katana --dev --dev.no-fee --http.cors_origins=*
In a second terminal, execute:
cd dojo-starter
sozo build
sozo migrate
torii --world 0x01dfabd3b24f954fff521af09a053f718b4255e4cc37ceaa5137bce73854d8ca --http.cors_origins=*
In a third terminal, navigate to the client folder and run:
cd client
pnpm i
pnpm dev
To test the connection with the controller, follow these steps:
You can configure mkcert to enable HTTPS and work with the controller directly, without requiring ngrok. Follow the steps below based on your operating system:
For Windows installation and configuration of mkcert, follow the guide in the link below:
mkcert Windows Setup Guide
For Linux installation and configuration of mkcert, follow the official guidelines provided in these links:
These guides provide detailed steps to set up mkcert on various Linux distributions.
- After completing the mkcert configuration, visit your local site.
- The browser should display "This page is secure (valid HTTPS)".
- If the page shows as insecure, the mkcert configuration is incorrect.
Run the following command to use ngrok:
ngrok http 5173
With this, you will be able to use the connection with the controller.
slot deployments logs checkers-controller-1 katana -f
slot deployments logs checkers-controller-1 torii -f
World: 0x01dfabd3b24f954fff521af09a053f718b4255e4cc37ceaa5137bce73854d8ca
RPC: https://api.cartridge.gg/x/checkers-scaffold/katana
Start Block: 1
Endpoints:
GRAPHQL: https://api.cartridge.gg/x/checkers-scaffold/torii/graphql
GRPC: https://api.cartridge.gg/x/checkers-scaffold/torii
After completing the steps above, access the Checkers game by navigating to http://localhost:5173
in your web browser.
If you cannot use the Cartridge Controller, you can still play Checkers using Burner Wallets. This alternative method provides a seamless gaming experience:
- Create multiple Burner Wallets instantly for gameplay
- Delete Burner Wallets at any time
- No controller installation required
- Quick and easy account management
- Start playing immediately after wallet creation
To use Burner Wallets:
- Navigate to the game interface
- Click on "Create Burner Wallet"
- Your new wallet will be generated automatically
- Start playing immediately
You can create and manage multiple Burner Wallets as needed, making it easy to test different strategies or play against yourself. When you're done, simply delete the Burner Wallet or create a new one for your next gaming session.
- Ensure all terminals are running in the background to maintain an active environment while you play.
- Feel free to modify the configurations and styles in the source code to personalize your gaming experience.