Play the game here: https://haswelldev.github.io/birbhunter/
Birb Hunter is a mobile game developed using the Apache Cordova framework and PixiJS for high-performance 2D graphics. This project is optimized for both Android and iOS devices.
- Overview
- Tech Stack
- Project Structure
- Requirements
- Setup and Installation
- Scripts and Commands
- Tests
- Environment Variables
- License
Birb Hunter is an interactive 2D mobile game featuring bird hunting mechanics, complete with animations, sound effects, and music. The project is structured as a Cordova-based web application with bundled assets and JavaScript.
- High-performance 2D rendering with PixiJS.
- Cross-platform support for Android, iOS, and Browser.
- Multi-charge Time Stop System: Accumulate time stop charges and use them strategically.
- Dynamic Difficulty: Multiple difficulty levels (Easy, Medium, Hard, Nightmare) with scaling speed and spawn rates.
- Visual Notifications: Floating health (+1/-1 HP) and time stop charge notifications.
- Atmospheric Backgrounds: Multiple pixelated dark forest backgrounds selected randomly at start.
- Comprehensive Sound System: Immersive background music and sound effects (SFX).
- In-game Menu: Pause, resume, and adjust volumes on the fly.
- Framework: Apache Cordova / PhoneGap
- Graphics Engine: PixiJS
- Programming Language: JavaScript / TypeScript (indicated by bundled source maps)
- Module Bundler: Webpack
- Testing: Jasmine 1.2.0
.
├── assets/ # Source game assets
├── css/ # Source stylesheets
├── img/ # Source image resources
├── manifest.json # Source web application manifest
├── res/ # Cordova platform resources (icons and splash screens)
├── plugins/ # Cordova plugins
├── spec/ # Jasmine test specifications
├── src/ # Source code (TypeScript)
│ ├── models/ # Game models
│ ├── service/ # Game services
│ ├── application.ts # Main game application logic
│ ├── index.ts # Entry point
│ ├── inversify.config.ts # InversifyJS configuration
│ └── types.ts # Dependency injection types
├── www/ # Compiled and bundled web assets (generated by Webpack)
│ ├── assets/ # Game assets (copied)
│ ├── css/ # Stylesheets (copied)
│ ├── img/ # Image resources (copied)
│ ├── bundle.js # Compiled application bundle
│ ├── vendors~main.bundle.js # Vendor dependencies bundle
│ ├── index.html # Main application entry point (generated)
│ ├── cordova.js # Cordova core script (copied from platform)
│ ├── platform.js # Platform-specific script (copied from platform)
│ ├── exec.js # Cordova execution script (copied from platform)
│ ├── confighelper.js # Cordova config helper (copied from platform)
│ └── manifest.json # Web application manifest (copied)
├── config.xml # Cordova configuration
├── tsconfig.json # TypeScript configuration
├── webpack.config.js # Webpack configuration
└── templates/ # HTML templates for Webpack
└── index.html # Template for generating index.html
- Node.js (latest LTS recommended)
- Apache Cordova CLI
- Platform-specific SDKs (Android SDK or Xcode for iOS)
A Makefile is provided for convenience to manage common tasks:
make install: Install project dependencies usingnpm install.make build-android: Build for Android.make build-ios: Build for iOS.make build-browser: Build for browser (outputs towww/).make run-browser: Run the browser version using a local server.make run-android: Run on Android emulator/device.make run-ios: Run on iOS emulator/device.make serve: Alias forrun-browser.make test: Run Jasmine tests.make clean: Remove build artifacts and platforms/plugins.
git clone <repository-url>
cd birbnpm installNote: This will install all necessary Node.js dependencies and Cordova plugins/platforms.
Platforms are automatically added during build if you use the Makefile or npm scripts, but you can add them manually:
cordova platform add android
cordova platform add ioscordova build android
# or
cordova build iosTo run the app on an emulator or a connected device:
cordova run android
# or
cordova run iosTo run in a browser for rapid prototyping:
npm run run:browser
# or
make run-browserThis will start a local development server (http-server) and open the app in your default browser.
Source files are located in the src/ directory. The project uses TypeScript and InversifyJS for dependency injection. Webpack is used to bundle the application and manage index.html generation.
To build the source code:
npm run webpackThis will compile the TypeScript files and generate all build artifacts (bundles, index.html, and copied assets) in the www/ directory.
To build the entire project (Webpack + Cordova):
npm run buildTesting is handled by Jasmine 1.2.0.
Test specifications are located in the spec/ directory.
To run tests:
npm test- Alternatively, open
spec/runner.html(if available) in a browser.
The project is configured to automatically deploy to GitHub Pages on every push to the main branch via GitHub Actions.
Repository URL: https://github.com/haswelldev/birbhunter
TODO: No specific environment variables detected. Document any required API keys or environment-specific configurations here.
TODO: No license file found at the root. Specify the project's license here.
- Jasmine 1.2.0 is licensed under the MIT License.
- Parts of the code may be based on Apache License 2.0.