Skip to content

A modern, decentralized casino game built on Solana blockchain featuring an exciting rocket crash game with real-time multiplayer functionality.

Notifications You must be signed in to change notification settings

HyperBuildX/Crash-Game-FE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

57 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ FutureSea.fun - Web3 Casino Game

A modern, decentralized casino game built on Solana blockchain featuring an exciting rocket crash game with real-time multiplayer functionality.

FutureSea.fun Game Interface

๐ŸŽฎ About the Game

FutureSea.fun is a Web3 casino game where players bet on a rocket that continuously multiplies their stake. The goal is to cash out before the rocket crashes! The longer you stay in, the higher your potential winnings, but wait too long and you lose everything.

๐ŸŽฏ Game Concept

  • Rocket Launch: Players join a game and place their bets
  • Countdown: 60-second countdown starts when 2+ players join
  • Rocket Flight: The rocket launches and starts multiplying everyone's bets
  • Cash Out: Players must decide when to cash out before the rocket crashes
  • Winner: The last player to cash out before the crash wins the round

โœจ Features

  • ๐Ÿ” Web3 Authentication - Secure wallet-based login using Solana
  • ๐Ÿ’ฐ Real-time Betting - Place bets with SOL tokens
  • ๐ŸŽฎ Live Multiplayer - Play with other users in real-time
  • ๐Ÿ’ฌ Live Chat - Communicate with other players during games
  • ๐Ÿ“Š Game Statistics - Track your performance and history
  • ๐ŸŽจ Modern UI - Beautiful, responsive design with animations
  • ๐Ÿ“ฑ Mobile Responsive - Play on desktop or mobile devices

๐Ÿ› ๏ธ Tech Stack

  • Frontend: Next.js 15, React 19, TypeScript
  • Styling: Tailwind CSS, Framer Motion
  • Blockchain: Solana Web3.js, Wallet Adapter
  • Authentication: Privy.io
  • Game Engine: Phaser.js
  • Real-time: WebSocket connections
  • State Management: React Context, TanStack Query

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • Yarn or npm
  • Solana wallet (Phantom, Solflare, etc.)
  • Solana devnet SOL for testing

Installation

  1. Clone the repository

    git clone <repository-url>
    cd futuresea.fun-frontend
  2. Install dependencies

    yarn install
    # or
    npm install
  3. Set up environment variables

    cp env.example .env.local

    Edit .env.local with your configuration:

    # API Configuration
    NEXT_PUBLIC_API_URL=http://localhost:3001/api
    
    # App Configuration
    NEXT_PUBLIC_APP_NAME=FutureSea
    NEXT_PUBLIC_APP_DESCRIPTION=Casino web3 game on solana
    
    # Solana Configuration
    NEXT_PUBLIC_SOLANA_NETWORK=devnet
    NEXT_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
  4. Start the development server

    yarn dev
    # or
    npm run dev
  5. Open your browser Navigate to http://localhost:3000

๐ŸŽฎ How to Play

1. Connect Your Wallet

Wallet Connection

  • Click "Connect Wallet" in the top right
  • Choose your Solana wallet (Phantom, Solflare, etc.)
  • Approve the connection

2. Set Up Your Profile

Profile Setup

  • Customize your avatar and username
  • Set your email preferences
  • View your game statistics

3. Join a Game

Join Game Screenshot_19

  • Enter your bet amount in SOL
  • Click "Join Game" to enter the round
  • Wait for other players to join

4. Game Countdown

Game Countdown

  • 60-second countdown starts when 2+ players join
  • More players can join during this time
  • Watch the countdown timer

5. Rocket Launch

Rocket Launch

  • The rocket launches and starts multiplying bets
  • Watch the multiplier increase in real-time
  • Decide when to cash out!

6. Cash Out Strategy

Cash Out

  • Click "Cash Out" when you want to secure your winnings
  • The longer you wait, the higher your potential payout
  • But be careful - wait too long and the rocket crashes!

7. Game Results

Winner Selection

  • Last player to cash out before crash wins
  • Winners are highlighted and celebrated
  • View your winnings and game history

๐Ÿ—๏ธ Project Structure

src/
โ”œโ”€โ”€ app/                 # Next.js app router pages
โ”‚   โ”œโ”€โ”€ api/            # API routes
โ”‚   โ”œโ”€โ”€ coinflip/       # Coinflip game page
โ”‚   โ”œโ”€โ”€ crash/          # Crash game page
โ”‚   โ””โ”€โ”€ profile/        # User profile pages
โ”œโ”€โ”€ components/         # Reusable React components
โ”‚   โ”œโ”€โ”€ auth/          # Authentication components
โ”‚   โ”œโ”€โ”€ layout/        # Layout components
โ”‚   โ”œโ”€โ”€ modal/         # Modal components
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ contexts/          # React context providers
โ”œโ”€โ”€ hooks/             # Custom React hooks
โ”œโ”€โ”€ phaser/            # Phaser.js game assets
โ”œโ”€โ”€ providers/         # Context providers
โ”œโ”€โ”€ types/             # TypeScript type definitions
โ””โ”€โ”€ utils/             # Utility functions

๐Ÿ”ง Available Scripts

  • yarn dev - Start development server
  • yarn build - Build for production
  • yarn start - Start production server
  • yarn lint - Run ESLint

๐ŸŒ Environment Variables

Variable Description Default
NEXT_PUBLIC_API_URL Backend API URL http://localhost:3001/api
NEXT_PUBLIC_APP_NAME Application name FutureSea
NEXT_PUBLIC_APP_DESCRIPTION App description Casino web3 game on solana
NEXT_PUBLIC_SOLANA_NETWORK Solana network devnet
NEXT_PUBLIC_SOLANA_RPC_URL Solana RPC endpoint https://api.devnet.solana.com

๐ŸŽฏ Game Interface Overview

Game Interface

  1. Game Panel - Main game controls and betting interface
  2. Joined Players - List of players in current game
  3. Player's Recent Games - Your game history
  4. Recent Crash Games - Global game history
  5. Real-time Chat - Live chat with other players
  6. Wallet Balance - Your current SOL balance

๐Ÿ”’ Security Features

  • Wallet Authentication - Secure Web3 wallet integration
  • Transaction Signing - All bets require wallet approval
  • Real-time Validation - Server-side game validation
  • Anti-cheat Protection - Fair play enforcement

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

โš ๏ธ Disclaimer

This is a gambling game. Please gamble responsibly and only bet what you can afford to lose. The game is for entertainment purposes only.


๐Ÿ†˜ Support

About

A modern, decentralized casino game built on Solana blockchain featuring an exciting rocket crash game with real-time multiplayer functionality.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published