An open API service indexing awesome lists of open source software.

https://github.com/rofergon/speed-rush-2d

Web3 gaming
https://github.com/rofergon/speed-rush-2d

Last synced: 2 months ago
JSON representation

Web3 gaming

Awesome Lists containing this project

README

        

# XION Speed Rush 2D 🏎️

📺 [Watch Presentation Video](https://www.youtube.com/watch?v=mxeX-rcI8xI)

A high-speed 2D racing game built on the XION ecosystem, combining the excitement of arcade racing with blockchain technology. The game leverages XION's infrastructure to deliver seamless, wallet-free, and gas-free user experiences through account abstraction, interoperability, and token-agnostic transactions.

## 🎮 Live Demo

🚀 [Play XION Speed Rush 2D Now](https://speed-rush-2d.vercel.app)

## 🎮 Related Repositories

- 🎮 [Unity Game Repository](https://github.com/rofergon/Speed-Rush-2d-Unity-project) - Core game mechanics and physics
- 🔧 [Backend API Repository](https://github.com/rofergon/speed-rush-2d-backend-) - AI-powered vehicle generation service
- ⛓️ [Smart Contracts Repository](https://github.com/rofergon/Speed-Rush-2D-contract) - Blockchain contracts for the game

## 🎮 Main Features

### 🚗 NFT Vehicle System
- **AI Generation**:
- Each vehicle is uniquely generated by an AI agent using customizable prompts
- Visual styles: Cartoon, Realistic, Anime
- Automatic background removal for sprites
- Stored on IPFS via Lighthouse

### 🔧 Interchangeable NFT Parts
- **Engine**:
- Affects speed and acceleration
- Stats: Power, Efficiency, Durability
- **Transmission**:
- Influences handling and speed shifts
- Stats: Shift Speed, Control, Efficiency
- **Core**:
- Defines the base vehicle characteristics
- Stats: Handling, Drift, Grip

### 🏁 Racing System
- **Game Modes**:
- Time Trial: Compete for the best times
- Daily challenges with prize accumulation
- Special tournaments with guaranteed prizes
- **Mechanics**:
- Optimized 2D arcade physics
- Drifting and diverse tracks
- Lap system and leaderboard result tracking
- **Prize Distribution**:
- Results are recorded as NFTs on XION, proving your achievements
- Prize pool distribution:
- 1st place: 40%
- 2nd place: 20%
- 3rd-10th places: 20% distributed equally (~2.5% each)
- 20% allocated to community funds and development

### 💰 Game Economy
- **XION GRASS Token**:
- Native game token used for:
- Minting vehicles
- Buying/selling in the marketplace
- Vehicle repairs
- Participating in special events
- **Marketplace**:
- Vehicle and parts listing
- Offer system
- Advanced search filters
- Transaction history
- Configurable commission (default 2.5%)

## 🚀 Detailed Technologies

### Frontend
- **React + TypeScript**:
- State management with custom services
- Reusable components
- Routing system with React Router
- Type safety with TypeScript

### Backend (API)
- **FastAPI + Python**:
- Sprite generation with Stability AI v2beta
- Image processing with PIL and rembg
- IPFS storage via Lighthouse
- Parallel processing using asyncio

### Game Engine
- **Unity WebGL**:
- Optimized 2D top-down physics
- Efficient asset management
- Web3 bidirectional communication

### Blockchain (XION Network)
- **Deployed Contracts**:
- CarPart: `0xCA4E04724234D99122C01268a8a0cD722450c67E`
- CarNFT: `0x95dA1E4C0961295ED0D1F316474c1a3a6E868349`
- CarWorkshop: `0xf2BBd1BEDB23915Ab77cd69265eaD8D442C10980`
- RaceLeaderboard: `0xD75aA67d5Bb1f8aCA77b4d14da847C28CdEE9a0D`
- CarMarketplace: `0x73b378F1368D9aC0394AB1C8aB85EFB3e4216DcC`

## 🛠️ Condition System
- Cars start with 100% condition
- Condition degrades by 5% per race
- Repairs are available in the workshop for a fee
- Condition directly impacts performance

## 🌟 Why XION?
XION enables a fully seamless experience for everyday users with:

- Protocol-level account abstraction
- Gas-free transactions and familiar payment options like USDC
- Cross-chain interoperability for truly decentralized applications

## 🔧 Setup

1. Clone the repository
```bash
git clone https://github.com/rofergon/Speed-Rush-2D
```

2. Install dependencies
```bash
npm install
```

3. Configure environment variables
```env
VITE_RACE_LEADERBOARD_ADDRESS=
VITE_CAR_NFT_ADDRESS=
VITE_PART_NFT_ADDRESS=
VITE_MARKETPLACE_ADDRESS=
VITE_GARAGE_ADDRESS=
VITE_XION_NETWORK_HUB=
```

4. Start development server
```bash
npm run dev
```

## 📝 License

MIT License - see the [LICENSE](LICENSE) file for details.

## 🤝 Contributions

Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/rofergon/Speed-Rush-2D/issues).

### Contribution Guidelines
1. Fork the project
2. Create your feature branch (`git checkout -b feature/NewFeature`)
3. Commit your changes (`git commit -m 'Add new feature'`)
4. Push to the branch (`git push origin feature/NewFeature`)
5. Open a Pull Request

---
Join the future of blockchain racing with XION Speed Rush 2D. 🚀