Development Tools For Web3 Game Builders On Stellar.
Ecosystem ready game templates and examples ready to scaffold into into your development workflow
Start here: Stellar Game Studio
Stellar Game Studio is a toolkit for shipping web3 games quickly and efficiently. It pairs Stellar smart contract patterns with a ready-made frontend stack and deployment scripts, so you can focus on game design and gameplay mechanics.
- Battle-tested Soroban patterns for two-player games
- A ecosystem ready mock game hub contract that standardizes lifecycle and scoring
- Deterministic randomness guidance and reference implementations
- One-command scaffolding for contracts + standalone frontend
- Testnet setup that generates wallets, deploys contracts, and wires bindings
- A production build flow that outputs a deployable frontend
# Fork the repo, then:
git clone https://github.com/jamesbachini/Stellar-Game-Studio
cd Stellar-Game-Studio
bun install
# Build + deploy contracts to testnet, generate bindings, write .env
bun run setup
# Scaffold a game + dev frontend
bun run create my-game
# Run the standalone dev frontend with testnet wallet switching
bun run dev:game my-game# Export a production container and build it (uses CreitTech wallet kit v2)
bun run publish my-game --build
# Update runtime config in the output
# dist/my-game-frontend/public/game-studio-config.js├── contracts/ # Soroban contracts for games + mock Game Hub
├── template_frontend/ # Standalone number-guess example frontend used by create
├── <game>-frontend/ # Standalone game frontend (generated by create)
├── sgs_frontend/ # Documentation site (builds to docs/)
├── scripts/ # Build & deployment automation
└── bindings/ # Generated TypeScript bindings
bun run setup # Build + deploy testnet contracts, generate bindings
bun run build [game-name] # Build all or selected contracts
bun run deploy [game-name] # Deploy all or selected contracts to testnet
bun run bindings [game-name] # Generate bindings for all or selected contracts
bun run create my-game # Scaffold contract + standalone frontend
bun run dev:game my-game # Run a standalone frontend with dev wallet switching
bun run publish my-game --build # Export + build production frontend- Every game must call
start_gameandend_gameon the Game Hub contract: Testnet: CB4VZAT2U3UC6XFK3N23SKRF2NDCMP3QHJYMCHHFMZO7MRQO6DQ2EMYG - Game Hub enforces exactly two players per session.
- Keep randomness deterministic between simulation and submission.
- Prefer temporary storage with a 30-day TTL for game state.
- Dev wallets are generated during
bun run setupand stored in the root.env. - Production builds read runtime config from
public/game-studio-config.js.
Interface for game hub:
#[contractclient(name = "GameHubClient")]
pub trait GameHub {
fn start_game(
env: Env,
game_id: Address,
session_id: u32,
player1: Address,
player2: Address,
player1_points: i128,
player2_points: i128,
);
fn end_game(
env: Env,
session_id: u32,
player1_won: bool
);
}
Run the studio frontend locally (from sgs_frontend/):
bun run devBuild docs into docs/:
bun --cwd=sgs_frontend run build:docshttps://developers.stellar.org/ https://risczero.com/ https://jamesbachini.com https://www.youtube.com/c/JamesBachini https://bachini.substack.com https://x.com/james_bachini https://www.linkedin.com/in/james-bachini/ https://github.com/jamesbachini
MIT License - see LICENSE file
Built with ❤️ for Stellar developers