Galactic Invaders - Play-to-Earn Arcade Game with BEP-20 Token | Full Source Code
Galactic Invaders is a complete P2E Game on BSC Network
Description
Galactic Invaders — Play-to-Earn Arcade Game with BEP-20 Token | Full Source Code
Launch Your Own Blockchain Arcade Game on BNB Smart Chain
Galactic Invaders is a complete, ready-to-deploy Play-to-Earn retro arcade game built on BNB Smart Chain (BSC). Players connect their wallets, battle waves of alien invaders in a 90-second timed round, and compete on a weekly leaderboard for token rewards. Comes with a custom BEP-20 token, smart contracts, React frontend, and full documentation — everything you need to go live.
This is not a template or a boilerplate. It's a finished product with working smart contracts, a real game engine, wallet integration, and a token economy. Deploy the contracts, upload the frontend, and you have a live Web3 game.
What You Get
- 2 Smart Contracts — BEP-20 token (mintable, ownable) and game contract (sessions, leaderboard, weekly rewards)
- Full React Frontend — Arcade-style UI with animated home screen, live gameplay preview, leaderboard, how-to-play guide, and mute toggle
- HTML5 Canvas Game Engine — Space Invaders-style gameplay with pixel art sprites, parallax starfield, particle explosions, screen shake, 8-bit synthesized sound effects, and power-ups (shield, rapid fire, bomb)
- Multi-Wallet Support — Reown AppKit integration supporting MetaMask, TrustWallet, WalletConnect, Coinbase Wallet, and 300+ wallets
- Mobile Ready — Touch controls with on-screen buttons that appear automatically on mobile devices
- Anti-Tamper System — SHA-256 game hash submitted with every score to verify gameplay integrity
- Documentation Page — Built-in HTML documentation accessible at
/documentation.htmlcovering installation, deployment, customization, and troubleshooting - No Backend Required — Fully static frontend + on-chain logic. Host anywhere: Vercel, Netlify, cPanel, any static host
How the Game Economy Works
- Players connect a wallet and start a game session — 1 free play per day, or pay a set amount of your token for extra plays
- Players play a 90-second arcade round, earning points by destroying aliens and clearing waves
- After the round, the score is submitted on-chain with a tamper-proof hash
- The top 50 scores appear on a public leaderboard
- Every week, the contract owner distributes the reward pool to the #1 player
- Leaderboard resets weekly — keeping players coming back
All values are configurable before deployment: token name, symbol, initial supply, play cost, weekly reward amount, game duration, difficulty settings, and more.
Tech Stack
| Layer | Technology |
|---|---|
| Blockchain | BNB Smart Chain (BSC) |
| Token | BEP-20 (OpenZeppelin ERC-20) |
| Smart Contracts | Solidity 0.8.20 + Hardhat |
| Frontend | React 19 + Vite 7 |
| Styling | Tailwind CSS 4 |
| Wallet | Wagmi v3 + Reown AppKit |
| Game Engine | HTML5 Canvas (custom, no libraries) |
| Audio | Web Audio API (synthesized, no audio files) |
| Hosting | Any static host (Vercel, Netlify, cPanel) |
What You Can Customize
- Token name, symbol, and supply — Make it your own brand
- Play cost and reward amounts — Set your own tokenomics
- Game difficulty — Alien speed, lives, timer duration, scoring values
- UI colors and branding — Neon green/blue theme is fully editable
- Network — Deploy on BSC Mainnet, BSC Testnet, or any EVM chain (Ethereum, Polygon, Arbitrum, etc.)
Requirements to Deploy
- Node.js 18+ and npm
- ~0.05 BNB for contract deployment gas fees
- A Reown Project ID (free at cloud.reown.com) for wallet connections
- A wallet with a private key for deploying contracts
- Any static hosting for the frontend (Vercel free tier works)
Deployment Overview
- Install dependencies (
npm install) - Set your private key and Reown project ID in
.envfiles - Customize token name, play cost, and rewards in the contract and config
- Deploy smart contracts to BSC (
npx hardhat run scripts/deploy.js --network bscMainnet) - Update the frontend with your contract addresses
- Build and upload to your host (
npm run build)
Full step-by-step instructions included in the built-in documentation page.
Disclaimer: Web3.Market is a marketplace platform that facilitates the sale of digital products between independent sellers and buyers. We do not develop, endorse, or guarantee any product listed on this platform. All products are provided by third-party sellers and are sold "as is." Web3.Market assumes no responsibility or liability for the functionality, security, legality, or any use or misuse of products purchased through this platform. Buyers are solely responsible for evaluating the suitability of any product for their intended purpose and for ensuring compliance with all applicable laws and regulations. By purchasing, you acknowledge that Web3.Market shall not be held liable for any direct, indirect, incidental, or consequential damages arising from the use of any product.
One-time payment • Lifetime access
Product Info
RPC Providers
Need a reliable RPC endpoint for your dApp? Get started with these trusted providers:
