-
Notifications
You must be signed in to change notification settings - Fork 10
Example Games
Real, working GSPs you can read and learn from, ordered from simplest to most complex. Studying these — alongside the Mover tutorial and the GSP concepts — is the fastest way to see how the pieces fit together at different scales.
The official teaching example, and the game this wiki's tutorial builds, runs, and plays on Polygon. About 400 lines of game code implementing the full GameLogic callback set with protobuf state and undo data.
- Source:
mover/in libxayagame - Our verified Polygon port:
examples/mover-polygon/in this wiki's repository - Game ID:
mv— live on Polygon (we verified it by playing it; see Part 2)
Read it to learn: the three callbacks, undo data, move validation, DefaultMain wiring.
Battleships, the canonical game channel game: matches are played off-chain through signed state updates, while the chain only carries channel opens, closes, and disputes. The GSP combines SQLiteGame with libxayagame's gamechannel library.
- Source:
ships/in libxayagame - The Game Channels page walks through how it works.
Read it to learn: channel lifecycle handling in a GSP, board rules that get verified on-chain during disputes, per-name win/loss state in SQLite.
A fully decentralized MMO strategy game by the Xaya team: persistent world map, units, combat, resources, prospecting — all of it on-chain game state computed by the GSP. This is what SQLiteGame looks like at scale, and it runs on Polygon today (game ID tn — we verified a synced instance while writing these docs).
- Source: taurion_gsp
Read it to learn: large SQLite schemas for game state, performance patterns for big worlds, structuring a real game's move set, extensive unit and integration testing of game logic.
A football (soccer) management game built on the same Xaya stack, live at soccerverse.com. Its GSP is not public yet, but it's proof of the architecture carrying a full commercial multiplayer game.
Building something yourself? Start from Mover (this wiki's tutorial), or let your AI assistant scaffold it with the building-xaya-games skill.
Xaya developer documentation — verified on Polygon mainnet. Questions? Xaya Development Discord