A simple cross-platform (iOS & Android) mobile game shell built with Expo and React Native. One codebase, one stack.
- Splash screen → auto-navigates to Home after ~2 seconds (after saved settings load).
- Home screen
- High score at the top (persisted).
- Centered area for your game graphic/logo.
- “Play Level 1” button.
- Cog (⚙️) for Settings.
- Settings screen
- Sound on/off toggle.
- Settings saved with AsyncStorage and restored between sessions.
- Level 1
- Placeholder screen; add your game logic and call
setHighScorewhen the game ends.
- Placeholder screen; add your game logic and call
npm install- Phone: Run
npm start, then scan the QR code with Expo Go (iOS | Android). Use the same Wi‑Fi as your computer. - Browser: Run
npm startand pressw, or runnpm run web. - Simulators (optional): If you have Xcode/Android SDK:
npm run iosornpm run android.
app/– Expo Router (file-based) screens:index.tsx– Splashhome.tsx– Homesettings.tsx– Settingslevel1.tsx– Level 1 (placeholder)
context/GameContext.tsx– Global state:soundEnabled,highScore, persisted via AsyncStorage.
- Home graphic: Replace the placeholder in
app/home.tsx(e.g. use<Image source={...} />or your own component). - High score: Update from Level 1 (or any screen) with
useGame().setHighScore(newScore)orsetHighScore(prev => Math.max(prev, score)). - Sound: Read
useGame().soundEnabledwhere you play audio; toggle in Settings.
Add to app.json when you have assets:
icon: e.g../assets/icon.pngsplash.image: e.g../assets/splash.png- Android
adaptiveIcon.foregroundImage: e.g../assets/adaptive-icon.png
Then add those files under assets/.