-
Notifications
You must be signed in to change notification settings - Fork 10
Home
Xaya is a platform for building fully decentralized blockchain games. The entire game world — every player, every move, every outcome — is derived from on-chain data by open-source software that anyone can run. There are no game servers to shut down, no admins who can alter outcomes, and players truly own their identities and moves.
Xaya games currently run on Polygon PoS, giving you ~2-second blocks and sub-cent transaction fees. The same stack also works on other EVM chains and on the original Xaya Core blockchain — see Other Chains.
These docs are focused on the backend: the Game State Processor (GSP) that turns blockchain data into game state, and the JSON-RPC interface any client can use to read it. Every command and output in the tutorials has been run and verified against Polygon mainnet.
Players own names (NFTs like p/alice) and send moves (small JSON payloads) as ordinary transactions to the XayaAccounts contract on Polygon. The XayaX bridge translates the chain into a uniform interface, and your GSP — a daemon built on libxayagame plus your game rules — processes the moves in block order to compute the authoritative game state. Anyone running your GSP computes the exact same state. Read Xaya Architecture for the full picture.
| Step | Page | What you get |
|---|---|---|
| 0 | Blockchain Gaming Basics | Why fully on-chain games work, for newcomers |
| 1 | Xaya Architecture | The components and how data flows |
| 2 | What Makes a GSP | The core concepts you'll implement |
| 3 | Names and Moves | The XayaAccounts contract: identity, registration, sending moves |
| 4 | Running XayaX | Set up the Polygon bridge |
| 5 | Tutorial: Mover Part 1 | Build and run a real game's GSP on Polygon |
| 6 | Tutorial: Mover Part 2 | Send real moves on-chain and read the state back |
| 7 | Tutorial: Mover Part 3 | Understand every line of the game logic |
- GSP RPC Interface — the JSON-RPC API every GSP exposes
- Glossary — every term used in these docs
- Game Channels — off-chain real-time gameplay (overview and a XayaShips case study; full tutorial planned)
- Example Games — real GSPs to study, from Mover to Taurion and Soccerverse
- Building Games with AI — use the Xaya GSP builder skill with Claude to scaffold your game
- Docker with Docker Compose
- A wallet private key with a little POL for gas (moves cost well under $0.01)
- 1 WCHI if you need to register a new name
- Basic command-line comfort; C++ reading ability helps for the code walkthrough
Questions? Join the Xaya Development Discord.
Key repositories: libxayagame (GSP library + mover example) • XayaX (chain bridge)
Xaya developer documentation — verified on Polygon mainnet. Questions? Xaya Development Discord