A Web3-enabled remake of the classic Asteroids arcade game, built with React and integrated with Solana blockchain functionality. This game combines retro arcade gaming with modern web3 features, including wallet authentication and blockchain-based high score tracking.
- Classic Asteroids gameplay with modern graphics
- Ship controls using WASD or arrow keys
- Shooting mechanics using spacebar
- Physics-based movement and collisions
- Particle effects for explosions and thrusters
- Progressive difficulty with increasing asteroid count
- Score tracking based on asteroid destruction
- Solana wallet connection using Phantom Wallet
- "Insert Quarter" mechanic using wallet signatures
- Wallet authentication required to start game
- Devnet connection for testing
- Dynamic sound effects for:
- Shooting
- Thrusters
- Explosions
- Quarter insertion
- Volume control system
- Background music during gameplay
- Persistent leaderboard using Netlify Blob Storage
- Top 10 scores tracking
- Player identification via wallet address
- Score submission on game over
- Real-time leaderboard updates
- React for UI components
- Vite for build system and development server
- Canvas-based game rendering
- Custom game loop implementation
- Responsive design for different screen sizes
- Solana Web3.js for blockchain interactions
- Wallet adapter integration
- Message signing for game authentication
- Netlify Functions for backend logic
- Netlify Blob Storage for score persistence
- CORS-enabled API endpoints
- Serverless function architecture
.
├── netlify/
│ ├── blobs/ # Blob storage configuration
│ └── functions/ # Serverless functions
├── public/
│ └── sounds/ # Game audio assets
└── src/
├── components/ # React components
├── api/ # API integrations
├── helpers/ # Utility functions
└── sounds/ # Audio management
- Basic game mechanics and controls
- Solana wallet integration
- Sound system implementation
- Score tracking during gameplay
- Wallet signature authentication
- Basic UI/UX implementation
- High score system using Netlify Blobs
- Leaderboard component
- Score persistence between sessions
- Function testing infrastructure
- Global leaderboard
- Social sharing of high scores
- Additional game modes
- Power-ups and special abilities
- Mobile-responsive controls
- Achievement system
# Install dependencies
pnpm install
# Start development server
pnpm start
# Test serverless functions
pnpm exec netlify functions:invoke getScores
pnpm exec netlify functions:invoke postScore --payload '{"score": 1000, "walletAddress": "TEST_WALLET"}'Required environment variables:
BLOB_READ_WRITE_TOKEN: For Netlify Blob Storage access- Other environment variables are managed through Netlify's dashboard
- Local function testing via Netlify CLI
- Blob storage integration testing
- Frontend component testing
- Automated deployment via Netlify
- Continuous integration with GitHub
- Environment variable management through Netlify
- Function and blob storage configuration via
netlify.toml
- Node.js 18+
- pnpm package manager
- Phantom Wallet browser extension
- Modern web browser with canvas support
- Score persistence during function cold starts
- Local development environment setup
- Function testing infrastructure
- Mobile device optimization
- Additional game features and power-ups
Currently in active development. Contributions and suggestions are welcome for:
- Game mechanics improvements
- Web3 integration enhancements
- Performance optimizations
- Additional feature suggestions
TBD
Note: This project is currently under active development. Features and implementations may change.