Open source Solana games to reference for learning
Interact with Anchor Program from Unity
A simple example moving a player left and right using Anchor framework and Unity SD
Saving Sol in a PDA
Learn how to save sol in a PDA seed vault and send it back to a player. Backend is written in Anchor and the frontend is using the Unity SDK
On chain matchmaking
A multiplayer match three game which uses NFT stats for the character stats in the game and has an interesting onchain matchmaking system.
Use Solana Pay Qr codes to control a game
Tug of war A multiplayer game where an account is changed via Solana Pay qr codes which can be player with many people on a big screen. Backend Anchor and the frontend is Js React and Next13.
Hide game state from other players
Stone paper scissors
A game where on chain data is hidden by saving a hash in the client until reveal. SPL Tokens as price for the winner.
Another example submitted for grizzlython which encrypts entries and send it to the next player with an additional encryption:
How to build a round based multiplayer game
Tic Tac toe A simple multiplayer game written in Anchor
On Chain Chess
Chess Complete on chain playable chess game written in Anchor. Send someone a link to start a game. Looking for contributors.
Multiplayer Game using voting system
Pokemon voting system A game where collectively people vote on moves in a game boy game. Every move is recorded and each move can be minted as an NFTs.
Entity component system example
Kyoudai Clash is an on chain realtime Using the jump crypto Arc framework which is an on chain entity component system for Solana.
Adventure killing monsters and gaining xp
Lumia online was a hackthon submission and is a nice reference for a little adventure game.
Real-time pvp on chain game
Real-time Solana Battle Royal Game. Using Anchor program, UnitySDK, WebSocket account subscription. Players can spawn their characters represented as one of their NFTs on a grid and move around. If a player hits another player or chest he collect its Sol. The grid is implemented as a two dimensional array where every tile saves the players wallet key and the NFT public key.