An endless runner on Base with a sarcastic AI commentator and onchain high scores.
Prerequisites: Node.js
-
Install dependencies:
npm install -
Copy the environment template and fill in your values:
cp .env.example .env.localVariable Required Description GEMINI_API_KEYYes Google Gemini API key (server-side only — never exposed to browser) NEXT_PUBLIC_CONTRACT_ADDRESSYes Deployed OnchainArcadecontract address on Base SepoliaAPP_URLNo URL where the app is hosted -
Run the app:
npm run dev
The OnchainArcade.sol contract in contracts/ needs to be deployed to Base Sepolia before score submission and the leaderboard will work. Set the deployed address as NEXT_PUBLIC_CONTRACT_ADDRESS in .env.local.
- Game: Canvas-based endless runner with speed ramp and obstacle generation
- AI Commentator: Gemini AI via a server-side API route (
/api/commentary) — trash-talks on death and milestones - Onchain Scores:
submitScore()writes to Base Sepolia via wagmi; leaderboard readsgetTopScores()live - Wallet: Coinbase Smart Wallet via wagmi on Base Sepolia