A blockchain-based chunk world game built on Sui Network with Kaboom.js game engine.
- Chunk-based world editor (5x5 tiles per chunk)
- 2-layer tile system (base tiles + decorations)
- On-chain world storage via Sui Move smart contracts
- Character NFT system
- Play-to-earn rewards with CHUNK tokens
- Frontend: React 19, Vite, TailwindCSS
- Game Engine: Kaboom.js
- Blockchain: Sui Network (Testnet)
- Smart Contract: Move language
- State Management: Zustand
- Wallet: @mysten/dapp-kit
git clone <repository-url>
cd firstmove-hackathon-gamepnpm installCopy the example env file and update values:
cp env.example .envEdit .env with your configuration:
VITE_SUI_RPC=https://fullnode.testnet.sui.io
VITE_PACKAGE_ID=<your-deployed-package-id>
VITE_DUNGEON_CAP=<your-dungeon-cap-object-id>
VITE_WALRUS_WASM_URL=https://unpkg.com/@mysten/walrus-wasm@latest/web/walrus_wasm_bg.wasm
VITE_WALRUS_GATEWAY=https://wal-aggregator-testnet.staketab.org/v1/blobs/by-quilt-patch-idpnpm devThe app will be available at http://localhost:5173
| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm build |
Build for production |
pnpm preview |
Preview production build |
pnpm lint |
Run ESLint |
The Move smart contract is located in the chunk_world/ directory.
cd chunk_world
sui move buildsui move testsui client publish --gas-budget 100000000After deployment, update VITE_PACKAGE_ID in your .env file with the published package ID.
├── chunk_world/ # Sui Move smart contracts
│ ├── sources/ # Move source files
│ └── tests/ # Move test files
├── public/
│ └── sprites/ # Game sprites and assets
│ ├── decorations/ # Decoration tiles
│ ├── goblin/ # Enemy sprites
│ ├── player/ # Player sprites
│ └── Tiles/ # Base tile sprites
├── src/
│ ├── chain/ # Sui client configuration
│ ├── game/ # Kaboom game logic
│ │ ├── start.ts # Game initialization
│ │ └── tiles.ts # Tile definitions
│ ├── pages/ # React pages
│ │ ├── EditorGame.tsx # Map editor
│ │ ├── GamePage.jsx # Game player
│ │ └── LandingPage.jsx # Home page
│ └── sui/ # Sui utilities
└── package.json
- Arrow Keys / WASD: Move player
- Editor: Click tiles to place/edit
TILE_SIZE: 32pxCHUNK_SIZE: 5x5 tiles (160x160 pixels per chunk)
- Default zoom: 2x
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is private and created for hackathon purposes.