/ legacy / vii-legio-expo / README.md
README.md
  1  # VII Legio
  2  
  3  A mobile-first sci-fi exploration game based on the 1981 VII Legio board game rules.
  4  Built with React / Expo.
  5  
  6  ## Stack
  7  
  8  - **Expo SDK 52** (web + native)
  9  - **React 18**
 10  - **AsyncStorage** for save persistence (native) / `window.storage` (web artifact)
 11  - **react-native-svg** for the galaxy map (native)
 12  
 13  ## Project structure
 14  
 15  ```
 16  vii-legio-expo/
 17  ├── App.js              # Root — imports storage adapter, renders VIILegio
 18  ├── VIILegio.jsx        # Entire game (2400+ lines, self-contained)
 19  ├── storage-adapter.js  # Bridges window.storage → AsyncStorage on native
 20  ├── index.js            # Expo entry point
 21  ├── app.json            # Expo config
 22  ├── package.json
 23  ├── babel.config.js
 24  ├── metro.config.js
 25  ├── .gitignore
 26  └── NATIVE_MIGRATION.md # Step-by-step guide for full iOS/Android port
 27  ```
 28  
 29  ## Quick start
 30  
 31  ### 1. Clone and install
 32  
 33  ```bash
 34  git clone https://github.com/YOUR_USERNAME/vii-legio.git
 35  cd vii-legio
 36  npm install
 37  ```
 38  
 39  ### 2. Run on web (recommended first step)
 40  
 41  ```bash
 42  npx expo start --web
 43  ```
 44  
 45  Opens in your browser at `http://localhost:8081`.
 46  Full game works — saves, tables, ship damage system, all screens.
 47  
 48  ### 3. Run on iOS Simulator
 49  
 50  ```bash
 51  npx expo start --ios
 52  ```
 53  
 54  Requires Xcode installed on macOS.
 55  
 56  ### 4. Run on Android Emulator
 57  
 58  ```bash
 59  npx expo start --android
 60  ```
 61  
 62  Requires Android Studio with an AVD configured.
 63  
 64  ### 5. Run on physical device
 65  
 66  Install **Expo Go** from the App Store / Google Play, then:
 67  
 68  ```bash
 69  npx expo start
 70  ```
 71  
 72  Scan the QR code in the terminal with Expo Go.
 73  
 74  > **Note:** On physical device via Expo Go, the web-only `<svg>` galaxy map
 75  > will not render. See `NATIVE_MIGRATION.md` to replace it with `react-native-svg`.
 76  
 77  ---
 78  
 79  ## Create a GitHub repo
 80  
 81  ```bash
 82  # Inside the project folder
 83  git init
 84  git add .
 85  git commit -m "Initial commit — VII Legio Expo"
 86  
 87  # Create repo on GitHub (requires GitHub CLI)
 88  gh repo create vii-legio --public --source=. --remote=origin --push
 89  
 90  # Or manually: create repo at github.com, then:
 91  git remote add origin https://github.com/YOUR_USERNAME/vii-legio.git
 92  git push -u origin main
 93  ```
 94  
 95  ---
 96  
 97  ## Game features implemented
 98  
 99  - **Full game loop** — setup → ship rigging → galaxy exploration → missions → rank progression
100  - **Tables A–S** — all operative tables from the rulebook (combat, alliance, commerce, bombing, landing, research)
101  - **Ship rigging** — 5-tab equipment screen with container budget, modules, specialist officers
102  - **Per-component damage system** — HP tracking for crew, shields, lasers, radars, computers, fuel tanks
103  - **SHIP tab** — hull integrity view, repair bay, performance impact breakdown
104  - **Persistence** — 3 save slots + auto-save every 3 turns, main menu with save previews
105  - **Tables reference** — in-game browsable Tables A/B/D/E/F/H/J/O/S
106  - **Mission log** — full turn-by-turn resolution log with table details
107  
108  ## Roadmap
109  
110  - [ ] Full React Native port (see NATIVE_MIGRATION.md)
111  - [ ] TABLIN expansion (Gladiator ship, DMV droid)
112  - [ ] Space Computer AI narration (Claude API)
113  - [ ] Multiplayer pass-and-play
114  - [ ] Sound & haptics
115  
116  ---
117  
118  ## Based on
119  
120  VII Legio (1981) — bilingual French/English sci-fi board game.
121  Rules reconstructed from original rulebook photography.