A fun and engaging arcade-style game built as a Farcaster Mini-App with blockchain integration on Monad testnet.
Sperm Survival is a Snake-like game with a biological twist, where you control a sperm cell navigating through a hazardous environment. The goal is to collect good nutrients, avoid harmful substances, and achieve the highest score possible.
- Snake-like mechanics: Control your sperm character with keyboard arrows, WASD, or touch controls
- Health system: Monitor your health bar, which decreases when hitting obstacles or bad food
- Score system: Earn points by collecting good nutrients
- Wall-passing: Navigate freely as your sperm can pass through screen edges
- Multiple characters: Choose from a variety of unique characters with different visuals
- Default character: Neo is unlocked by default
- Unlockable characters:
- Naruto
- Flash
- Elon
- Superman
- Trump
- Authentication: Log in with your Farcaster account
- Casting: Share your high scores directly to Farcaster
- Add Frame: Save the mini-app to your Farcaster client
- User profile: Display your Farcaster profile within the game
- Monad Testnet: Integration with Monad blockchain for on-chain assets
- Smart contract: Unified contract for token minting and player management
- Wallet connection: Support for both Farcaster's native wallet and external wallets like MetaMask
- Node.js (v16+)
- A Farcaster account
- Monad Testnet MON for wallet interactions
- Clone the repository
git clone https://github.com/yourusername/sperm-survival.git
cd sperm-survival- Install dependencies
npm install- Set up environment variables
cp .env.example .env.local
# Edit .env.local with your configuration- Start the development server
npm run dev- Open http://localhost:3000 in your browser
- Log in with your Farcaster account or play as a guest
- Select a character from those you've unlocked
- Control your sperm using:
- Arrow keys
- WASD keys
- Touch controls on mobile
- Collect good food (blue/green) to increase your score and health
- Avoid bad food (red/purple) which decreases your health
- Pass through walls to appear on the opposite side
- Game ends when your health reaches zero
- Use earned SPERM coins to buy eggs or unlock new characters
- Frontend: Next.js, React, TailwindCSS
- Authentication: Farcaster Auth Kit, Next-Auth
- Blockchain: Monad Testnet, Viem, Wagmi
- Frame Integration: Farcaster Frame SDK
- API Integration: Neynar SDK
sperm-survival/
├── public/ # Static assets
│ ├── game-assets/ # Game images and sprites
│ └── images/ # UI images
├── src/ # Source code
│ ├── app/ # Next.js app router
│ ├── components/ # React components
│ ├── lib/ # Utility functions
│ └── utils/ # Helper utilities
├── .env.local # Environment variables
├── next.config.js # Next.js configuration
└── package.json # Dependencies
- Frame support: Full implementation of Farcaster Frames protocol
- Onchain actions: Connect wallet and perform blockchain operations
- Social sharing: Share scores and achievements on Farcaster
- Leaderboard: Compare your scores with other players
# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm run start
# Lint code
npm run lint
# Deploy to Vercel
npm run deploy:vercel
# Generate game assets
npm run generate-imagesThis project is licensed under the MIT License - see the LICENSE file for details.
- Farcaster team for the Frame SDK
- Neynar for API integration
- Monad team for testnet support
- All contributors and players