A fast-paced, lane-based action racing game built with Flutter and Flame engine. Navigate through traffic, dodge obstacles, collect coins, and shoot your way to victory!
- Lane-based Movement: Navigate through 6 lanes of intense highway action
- Combat System: Shoot enemies and obstacles with tap-to-fire mechanics
- Enemy Encounters: Face three types of enemies with different behaviors:
- Standard Enemies: Basic opponents with 25 HP
- Armored Enemies: Heavily protected with 75 HP
- Aggressive Enemies: Fast and dangerous with 50 HP
- Obstacle Avoidance: Dodge rocks, trees, and pits that appear on the road
- Coin Collection: Gather coins for points and in-game currency
- Health System: Manage your vehicle's health (starts at 100 HP)
- Progressive Difficulty: Game speed increases as you progress
- Scoring System:
- 100 points per enemy defeated
- 50 points per coin collected
- 10 coins currency value
- Purchase upgrades and customizations for your vehicle
- Manage your coin currency earned through gameplay
- Movement: Drag left/right to change lanes
- Shooting: Tap anywhere on the screen to fire bullets
- Menu Navigation: Touch controls for all UI elements
- Flutter SDK (^3.7.0)
- Dart SDK
- IDE with Flutter support (VS Code, Android Studio, etc.)
-
Clone the repository
git clone <repository-url> cd road_riot
-
Install dependencies
flutter pub get
-
Run the game
flutter run
- โ Android
- โ iOS
- โ Web
- โ Windows
- โ macOS
- โ Linux
- Flutter: Cross-platform UI framework
- Flame: 2D game engine for Flutter
- BLoC Pattern: State management using flutter_bloc
- Provider: Dependency injection
flame: ^1.12.0 # Game engine
flutter_bloc: ^8.1.3 # State management
provider: ^6.1.1 # Dependency injection
equatable: ^2.0.5 # Value equalitylib/
โโโ blocs/ # State management (BLoC pattern)
โโโ game/ # Game engine components
โ โโโ components/ # Game objects (Player, Enemies, etc.)
โ โโโ screens/ # Game screens
โ โโโ ui/ # Game UI elements
โโโ models/ # Data models
โโโ repositories/ # Data layer
โโโ services/ # Business logic
โโโ utils/ # Constants and utilities
- Health management system
- Lane-based movement with smooth transitions
- Bullet shooting capabilities
- Multiple enemy types with different characteristics
- AI-driven movement patterns
- Health and damage systems
- Scrolling road with lane markers
- Dynamic obstacle generation
- Coin placement system
- Main menu with game navigation
- In-game HUD showing health, score, and coins
- Shop interface for upgrades
Key gameplay parameters can be adjusted in lib/utils/constants.dart:
- Lane Count: 6 lanes
- Spawn Rates: Enemies (1.5s), Obstacles (2s)
- Damage Values: Enemy collision (20), Obstacle collision (30)
- Movement Speed: Player lane switching, bullet speed (300), enemy speed (150)
The game uses BLoC pattern for state management:
GameBloc: Manages overall game state, spawning, and updatesPlayerBloc: Handles player actions and stateShopBloc: Manages shop functionality and purchases
- Create new components in
lib/game/components/ - Add corresponding models in
lib/models/ - Update relevant BLoCs for state management
- Register new routes in
main.dartif needed
The game includes an audio management system ready for implementation:
- Sound effects for shooting, explosions, and collisions
- Background music for menu and gameplay
- Volume controls for music and SFX
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Power-ups and special abilities
- Multiple vehicle types
- Leaderboard system
- Achievement system
- Sound effects and music implementation
- Particle effects for explosions
- Weather and environmental effects
- Boss battles
- Multiplayer support
Made with โค๏ธ using Flutter & Flame