A Stardew Valley-inspired blockchain game built with Phaser 3, Next.js, and OneChain.
OneValley is a web-based RPG that blends the charm of classic farming simulations with the power of the OneChain blockchain. Players can manage their own farms, gather resources, craft items, and engage in a player-owned economy.
Key features include:
- Farming & Gathering: Plant crops, water them, and harvest produce. Cut trees for wood and gather other materials.
- Social Interaction: Visit other players' farms and chat in real-time.
- Player-Owned Economy: Trade items with other players or buy/sell on the marketplace using in-game currency.
- Blockchain Integration: Secure ownership of assets (crops, items, pets) and currency on the OneChain network.
- Pets: Tame and raise pets to assist with farming tasks.
Players start by connecting their ONECHAIN wallet to enter the game world. (screenshot of login/connect wallet screen)
Manage your farm plot! Till the soil, plant seeds, water crops, and harvest them when they're ready. You can also explore to cut trees and gather resources. (screenshot of farming gameplay - planting or watering)
Travel to the town or visit your friends' farms. You can chat with other players you meet in the world. (screenshot of player visiting another farm or chatting)
Head to the marketplace to trade your harvested goods or crafted items. Buy seeds, tools, and unique outfits from other players or NPCs. (screenshot of marketplace or trading interface)
- Frontend: Next.js (React), TypeScript
- Game Engine: Phaser 3
- Blockchain: OneChain by OneLab
- SDK:
@onelabs/sui - Auth: zkLogin
- Standards: Kiosk (for marketplace), Fungible Tokens (currency)
- SDK:
- Styling: Tailwind CSS
- Node.js (v18 or higher recommended)
-
Clone the repository:
git clone https://github.com/your-username/OneValley-OneChain-Hackathon.git cd OneValley-OneChain-Hackathon -
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open the game: Open http://localhost:8080 in your browser.
To create a production build:
npm run buildThe output will be in the dist folder.
| Path | Description |
|---|---|
src/game |
Core Phaser game logic (Scenes, Objects). |
src/PhaserGame.tsx |
Bridge component between React and Phaser. |
src/pages |
Next.js pages and routing. |
public/assets |
Game assets (sprites, tilesets, audio). |
