Gomoku (Five in a Row) – a real-time, online multiplayer board game built on the Linea Blockchain, leveraging Linera Microchain cross-message communication.
Players can create or join games seamlessly, with moves synchronized across chains using smart contracts deployed on Linera’s Microchain framework.
👉 https://gomoku-psi.vercel.app
This project is built using HTML and pure JavaScript for logic, with Phaser 3 as the game UI engine.
- ✅ Online Gomoku gameplay powered by Linera Blockchain Testnet
- ✅ Real-time cross-chain messaging via Microchains
- ✅ Supports both PvP (human vs human) and AI gameplay
- ✅ Lightweight frontend running directly in the browser
- ✅ Clean and easy-to-understand codebase
- ✅ Smooth 2D game experience powered by Phaser 3
By exploring this project, you'll gain hands-on experience with:
- Creating and deploying Microchain smart contracts using Rust
- Sending and receiving messages across Microchains
- Frontend-to-chain interaction through Linera SDK
- Handling smart contract state updates via notifications
- Applying Microchains to a real-time turn-based game architecture
- Rust & Cargo
- Linera CLI
- Python 3
- OS: Windows or Linux
- Configure your deployment wallet
You need a wallet address to deploy the application:
-
To use the Linera Babbage Testnet:
FAUCET_URL=https://faucet.testnet-babbage.linera.net
-
Or to use a local testnet:
FAUCET_URL=http://localhost:8080 export RUST_LOG="warn,linera_execution::wasm=trace" linera net up --with-faucet --faucet-port 8080
-
(Optional) Remove old wallet configuration:
rm -rf ~/.config/linera/*
-
Create a new wallet and chain:
linera wallet init --with-new-chain --faucet $FAUCET_URL
-
Build the WebAssembly contracts:
cargo build --release --target wasm32-unknown-unknown
-
Publish and deploy to the network:
linera publish-and-create target/wasm32-unknown-unknown/release/gomoku_{contract,service}.wasm
You will receive an Application ID upon successful deployment.
-
Run the local server
On Windows:
./frontend/runLocalServer.bat
On Mac/Linux:
python3 ./frontend/localServer.py
-
Open the game in your browser
http://localhost:8000/
Update your deployed Application ID in the following file:
./frontend/main.js
Locate the line that sets APP_ID = ...
and replace it with the Application ID received after deployment.
Contributions are welcome!
Feel free to submit pull requests or open issues.
This project demonstrates how Microchains can be applied to decentralized real-time applications like board games, leveraging Linera’s scalable infrastructure on the Linea ecosystem.