Skip to content

hsynerkl/vybe

Repository files navigation

Reflex Arcade 🎮

A music-free, reflex-based mobile arcade game built with Expo SDK 54 (React Native).

Core Loop

Pattern spawns → Player inputs (tap / drag) → Hit accuracy judged → Score + combo updated → Difficulty increases → Miss = Game Over

Features

Feature Detail
TAP A shrinking ring converges on a circle. Tap at the right moment.
DRAG Swipe from the start circle to the end circle within the time limit.
Accuracy PERFECT (+2×mult) / GOOD (+1×mult) / MISS → Game Over
Combo 10→×1.2 · 25→×1.5 · 50→×2.0
Difficulty Speeds up every 10 s of gameplay, 20 levels max
Best score Persisted with AsyncStorage
Continue Watch a rewarded ad once per run to resume
15-min timer Interstitial shown after 15 min of active gameplay (never mid-run)

Project Structure

src/
  ads/
    adService.ts       ← orchestrates all ad calls
    rewarded.ts        ← rewarded ad (mock → swap for real SDK)
    interstitial.ts    ← interstitial ad (mock → swap for real SDK)
    adTimers.ts        ← 15-min gameplay timer
  game/
    patternEngine.ts   ← generates TAP/DRAG patterns
    scoring.ts         ← hit detection, combo math, AsyncStorage
    gameLoop.ts        ← re-exports / types
  components/
    GameCanvas.tsx     ← renders patterns, handles PanResponder input
    HUD.tsx            ← score + combo overlay
    GameOver.tsx       ← end-of-run modal
  screens/
    Home.tsx           ← main menu
    Game.tsx           ← game loop orchestration
App.tsx

Getting Started

npm install
npx expo start

Open on device with Expo Go (iOS/Android) or an emulator.

Connecting Real Ads (Google AdMob)

  1. npm install react-native-google-mobile-ads
  2. Add to app.json:
    "plugins": [
      ["react-native-google-mobile-ads", {
        "androidAppId": "ca-app-pub-xxxxxxxx~yyyyyyyy",
        "iosAppId": "ca-app-pub-xxxxxxxx~yyyyyyyy"
      }]
    ]
  3. Build a dev client: npx expo run:ios or npx expo run:android
  4. Replace the mock functions in src/ads/rewarded.ts and src/ads/interstitial.ts with the real SDK calls. The interfaces stay the same.

Golden Rule

Ads should never interrupt gameplay flow — only extend or transition it.

About

VYBE — Reflex arcade game built with Expo SDK 54 (TAP/DRAG patterns, combo scoring, ads integration)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages