A fun Flappy Bird-style game featuring a cute rabbit jumping through hurdles on grass! Built with React Native and Expo for cross-platform deployment on iOS, Android, and Web.
- Cute rabbit character with smooth animations
- Wooden hurdle obstacles with randomized gaps
- Beautiful grass and sky background
- Real-time score tracking
- Smooth physics and collision detection
- Responsive touch controls
- Cross-platform support (iOS, Android, Web)
- React Native
- Expo
- TypeScript
- React Native SVG
- Install dependencies:
npm install- Start the development server:
npm start- Run on specific platforms:
# iOS
npm run ios
# Android
npm run android
# Web (Development)
npm run web
# Web (Production Build)
npm run build:web
# Then serve the dist folder:
npx serve dist
# Or use Python:
# cd dist && python3 -m http.server 8000- Tap anywhere on the screen to start the game
- Tap to make the rabbit jump
- Navigate through the hurdles without hitting them
- Avoid hitting the ground or ceiling
- Score points by passing through hurdles
- Try to beat your high score!
- Tap/Click: Make the rabbit jump
- Tap "Play Again": Restart after game over
rabbit-game/
├── src/
│ ├── components/
│ │ ├── Background.tsx # Sky, clouds, and grass
│ │ ├── RabbitCharacter.tsx # Rabbit sprite
│ │ └── HurdleObstacle.tsx # Hurdle obstacles
│ ├── screens/
│ │ └── GameScreen.tsx # Main game screen
│ ├── hooks/
│ │ └── useGameLoop.ts # Game loop logic
│ ├── utils/
│ │ └── physics.ts # Physics and collision
│ ├── constants/
│ │ └── game.ts # Game constants
│ └── types/
│ └── game.ts # TypeScript types
├── App.tsx # Main app entry
├── package.json
└── app.json
- Gravity: The rabbit continuously falls with realistic gravity
- Jump: Tapping gives the rabbit an upward velocity
- Rotation: The rabbit rotates based on vertical velocity
- Hurdles: Scroll from right to left at constant speed
- Collision: Game ends if rabbit hits hurdles, ground, or ceiling
- Scoring: Points awarded when passing through hurdles
You can customize the game by modifying constants in src/constants/game.ts:
GRAVITY: Control fall speedJUMP_VELOCITY: Control jump heightHURDLE_SPEED: Control game difficultyHURDLE_GAP: Control gap size between hurdlesHURDLE_SPACING: Control distance between hurdle pairs
npm run build:iosnpm run build:android# Build and upload source maps to Sentry
npm run build:web
# Serve the production build locally
npx serve dist
# Or use Python's HTTP server
cd dist && python3 -m http.server 8000Note: The production build includes source maps that are automatically uploaded to Sentry for error tracking. Access the build at http://localhost:8000 (or the port shown by your server).
MIT
Built with React Native and Expo