Skip to content

HACK3R-CRYPTO/StreamBeat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StreamBeat

Play rhythm games. Earn rewards. Own your progress. Real-time updates powered by Somnia Data Streams.

What You Get

You play rhythm games. You score points. You earn BEAT tokens. Top players win more. Your scores stay on blockchain. Your rewards stay in your wallet. Leaderboard updates instantly without refreshing. No waiting. No polling. Pure real-time streaming.

How It Works

Connect your wallet. Buy BEAT tokens with SOMNI. Mint one Gem NFT. Play games. Submit scores. Compete for rewards. Watch leaderboard update in real time. See your rank change instantly. See prize pool grow live. All powered by Somnia Data Streams.

Your First Game

Step one: Connect your wallet. Use MetaMask or WalletConnect. Switch to Somnia Testnet. Get test tokens from faucet.

Step two: Buy BEAT tokens. Send SOMNI to swap contract. Point one SOMNI buys 34 BEAT tokens. You need 34 BEAT tokens to mint a Gem.

Step three: Mint your Gem. Spend 34 BEAT tokens. One Gem unlocks all games. Your Gem stays in your wallet. View it in your collection.

Step four: Play games. Choose StreamBeat rhythm game or Simon memory game. Tap buttons in sync. Remember patterns. Score points. Games submit scores automatically. Backend validates every score.

Step five: View leaderboard. See top 10 players. Top three get podium display. Your position shows your rank. Updates happen instantly without refreshing. Watch scores appear in real time.

Step six: Claim rewards. Top players earn BEAT tokens. Rewards go to your wallet. Prize pool distributes automatically. All transparent on blockchain.

Games

StreamBeat Rhythm Game: Tap glowing buttons in sync. Perfect timing scores 10 points times combo multiplier. Good timing scores 5 points times combo multiplier. Combo multipliers go up to 50x. Build your combo for massive scores. Thirty second rounds. Sound effects guide you. Progressive difficulty speeds up over time. Particle effects on perfect hits. Visual feedback for every action.

Simon Memory Game: Watch button sequences flash brightly. Repeat patterns correctly. Score based on speed and sequences completed. Wrong answer ends the game. Sequences get longer. Speed increases. Challenge your memory.

Real-Time Features

Leaderboard updates instantly. No refresh needed. Scores appear as they happen. Prize pool updates live. Your rank changes in real time. See new players join. See scores update. See positions shift. All without page refresh.

Powered by Somnia Data Streams. Backend emits events via setAndEmitEvents() when scores are submitted. Frontend subscribes using somniaStreamsEventId for real-time updates. On-chain events stream directly to your browser. Fast updates without polling. Low latency. High performance. Database-like speed with blockchain security.

Anti-Cheat System

Backend validates every score. Players cannot submit directly to contract. Only trusted backend wallet can submit. Prevents score manipulation. Ensures fair competition. Validates game time. Validates score calculations. Rejects invalid submissions. All scores verified before blockchain submission.

Rewards

First place wins 40 percent of prize pool. Second place wins 25 percent. Third place wins 15 percent. Places four through ten split 10 percent. All players split 10 percent participation rewards.

Minimum score is 10 points to qualify.

What You Own

Your Gem NFT belongs to you. Trade it. Sell it. Keep it. Your BEAT tokens belong to you. Spend them. Hold them. Your scores stay on blockchain forever. Your rewards stay in your wallet.

Why Somnia

Somnia offers low fees. Your rewards stay in your pocket. Fast transactions mean quick payouts. Real-time data streams mean instant updates. Sub-second finality. High throughput. Built for real use. Perfect for gaming.

Technical Excellence

Web-based gameplay. No downloads. No Unity. No plugins. Works in any browser. Mobile responsive. Touch controls. Keyboard support. Smooth animations. Particle effects. Sound effects. Progressive difficulty. Combo system. Real-time leaderboard. Anti-cheat validation. Smart contract rewards. SDS integration.

Getting Started

Frontend: Navigate to frontend folder. Run npm install. Run npm run dev. Visit localhost:3000.

Contracts: See contracts README for setup. Deploy to Somnia Testnet. Update frontend addresses.

Backend: See backend README for setup. Run validation server. Configure contract addresses.

Deployed Contracts

Somnia Testnet:

BEAT Token: 0x62B2bf3eCC252E3De0405AD18dAcAcfbc7C6028f

Swap Contract: 0xa2054053Ded91cf7eCD51ea39756857A2F0a5284

Gem Contract: 0x699C19321188aB200194E8A2B6db19B43106E70F

Rewards Contract: 0xC947EF14370F74ccE4d325ee4D83d9B4f3639da7

View contracts on Somnia Explorer.

Documentation

Contracts README: Smart contract setup and deployment details.

Frontend README: Frontend setup and feature documentation.

Backend README: Backend setup and API documentation.

Built for Hackathon

StreamBeat built for Somnia Data Streams Mini Hackathon. Play to earn mechanics. Real-time updates. Smart contract rewards. SDS integration. Anti-cheat system. Web-based gameplay. Ready for users. Production quality code.

About

StreamBeat: Real-time competitive rhythm gaming powered by Somnia Data Streams. Play, compete on live leaderboards, and earn NFT characters and token rewards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors