diff --git a/README.md b/README.md index a4c48c3..3e110d7 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,37 @@ Install the dependencies: npm install ``` -### Development Workflow +## Using Expo Dev Client + +This project uses `expo-dev-client` to enable a more integrated development workflow, allowing you to build and run your app on simulators/emulators with hot module reloading and access to developer tools. + +### Building for Development + +The `expo-dev-client` allows you to create custom builds of your application for development purposes. + +To create a development build for each platform, run the following command: + +- For iOS: + + ```sh + npm run build:dev + ``` + + This command generates a `.tar.gz` file containing an "app folder". Extract this folder and drag the app binary into your iOS Simulator to install it. + +- For Android: + + ```sh + npm run build:dev + ``` + + For Android, this command generates an APK file that can be installed on your emulator or physical device. Drag and drop the APK file into your Android Emulator to install it. + +After building and installing the development client, you can open your project directly from the simulator/emulator. The Expo development menu can be accessed within the simulator/emulator, enabling you to use features like live reloading and debugging. + +### Running the Development Build + +After installing the development build on your emulator/simulator, you can run the project using the `npm start` command. This will start the Metro bundler and enable you to load and test your app with the development build just installed. Start the project using the Expo dev client: @@ -41,7 +71,28 @@ npm run ios # for iOS npm run web # for Web ``` -### Building and Submitting +## Project Structure + +- `assets`: Contains static assets such as images and sounds. +- `game`: Core game logic. + - `entities`: Game entity components (e.g., `Balloon.tsx`). + - `systems`: Game system logic (e.g., `GameLoop.ts`). +- `types.ts`: TypeScript type definitions and interfaces. + +## Modifying the Template + +To modify the template and create your own game, follow these steps: + +1. **Design Your Game**: Plan out your game's mechanics, rules, and entities. +2. **Create Game Entities**: Modify or create new TypeScript React components in the `game/entities` directory to represent your game's entities. +3. **Implement Game Logic**: Write the game logic inside the `game/systems` directory. The `GameLoop.ts` file is where you will define how your game state updates with time. +4. **Update Assets**: Add or replace assets in the `assets` folder as needed for your game. +5. **Define Types**: If you create new entities or systems, update the `types.ts` file to define the TypeScript types that correspond to your game's components. +6. **Integrate Entities and Systems**: Use the `GameEngine.tsx` component to integrate your entities and systems into the game loop. +7. **Launch the Game**: Use the Expo CLI to run and test your game. +8. **Build and Publish**: Once your game is complete and tested, follow the Expo documentation to build and publish your game to the iOS App Store and Google Play Store. + +## Building and Submitting The `eas.json` file is configured with profiles for local, development, preview, and production builds: @@ -63,7 +114,7 @@ npm run eas:preview # Build and submit for preview npm run eas:production # Build and submit for production ``` -### Continuous Updates +## Continuous Updates With EAS Update, you can keep your app up to date without waiting for app store reviews: @@ -72,34 +123,6 @@ npm run update:preview # Update the preview channel npm run update:production # Update the production channel ``` -## Project Structure - -- `assets`: Contains static assets such as images and sounds. -- `game`: Core game logic. - - `entities`: Game entity components (e.g., `Balloon.tsx`). - - `systems`: Game system logic (e.g., `GameLoop.ts`). -- `types.ts`: TypeScript type definitions and interfaces. - -## Modifying the Template - -To modify the template and create your own game, follow these steps: - -1. **Design Your Game**: Plan out your game's mechanics, rules, and entities. - -2. **Create Game Entities**: Modify or create new TypeScript React components in the `game/entities` directory to represent your game's entities. - -3. **Implement Game Logic**: Write the game logic inside the `game/systems` directory. The `GameLoop.ts` file is where you will define how your game state updates with time. - -4. **Update Assets**: Add or replace assets in the `assets` folder as needed for your game. - -5. **Define Types**: If you create new entities or systems, update the `types.ts` file to define the TypeScript types that correspond to your game's components. - -6. **Integrate Entities and Systems**: Use the `GameEngine.tsx` component to integrate your entities and systems into the game loop. - -7. **Launch the Game**: Use the Expo CLI to run and test your game. - -8. **Build and Publish**: Once your game is complete and tested, follow the Expo documentation to build and publish your game to the iOS App Store and Google Play Store. - ## Support File issues on the repository issue tracker.