A blockchain-powered multiplayer Pac-Man game built on the Monad testnet. Players register with unique usernames, pay 0.25 MON, and compete in real-time multiplayer battles.
- Blockchain Integration: Built on Monad testnet with smart contract registration
- Multiplayer Gameplay: Real-time multiplayer with elimination mechanics
- Wallet Connection: MetaMask integration with automatic network switching
- Modern UI: Clean, responsive design with glassmorphism effects
- Sound System: Toggle-able audio effects for enhanced gameplay
- Power-ups: Special elimination power-ups that spawn every 10 seconds
- Frontend: Next.js 15.3.2 with TypeScript
- Styling: Tailwind CSS with shadcn/ui components
- Blockchain: Ethers.js for smart contract interaction
- Smart Contracts: Solidity with Hardhat
- Deployment: Optimized for Vercel
-
Clone the repository
-
Install dependencies:
npm install
-
Set up environment variables in
.env.local:NEXT_PUBLIC_MULTISYNQ_API_KEY=your_multisynq_api_key NEXT_PUBLIC_GAME_CONTRACT_ADDRESS=your_contract_address NEXT_PUBLIC_PAYMENT_ADDRESS=your_payment_address PRIVATE_KEY=your_private_key
Run the development server:
npm run devOpen http://localhost:8000 in your browser.
npm run build- Connect your repository to Vercel
- Set environment variables in Vercel dashboard:
NEXT_PUBLIC_MULTISYNQ_API_KEYNEXT_PUBLIC_GAME_CONTRACT_ADDRESSNEXT_PUBLIC_PAYMENT_ADDRESS
- Deploy automatically on push to main branch
vercel --prod- Connect Wallet: Click "Connect Wallet" and connect your MetaMask
- Switch Network: Automatically switches to Monad testnet
- Register: Enter a unique username and pay 0.25 MON
- Play: Use WASD or arrow keys to move
- Collect: Gather pellets (10 points) and power pellets (50 points)
- Eliminate: Collect purple power-ups to eliminate other players
- Compete: Climb the leaderboard and dominate the arena!
The game uses a smart contract deployed on Monad testnet for:
- Player registration with unique usernames
- Payment processing (0.25 MON registration fee)
- Username availability checking
- Game state management
The game is fully responsive and works on:
- Desktop computers
- Tablets
- Mobile devices
- Modern Design: Gradient backgrounds with glassmorphism effects
- Clean Typography: Google Fonts integration
- Accessible: Proper contrast ratios and keyboard navigation
- Smooth Animations: CSS transitions and hover effects
- Toast Notifications: Real-time feedback for user actions
- Environment variables for sensitive data
- Proper error handling for blockchain interactions
- Input validation for usernames
- Secure wallet connection handling
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
If you find any bugs, please open an issue with detailed information about the problem.
Built with ❤️ for the Monad blockchain ecosystem