VOID RIFT is a browser-based twin-stick shooter built entirely with vanilla HTML, CSS, and JavaScript. This is a 2D mobile-first game optimized for performance on iOS and web browsers.
Note: This branch contains the production-ready 2D version of the game. For experimental 3D rendering features, see the
feature/3d-renderingbranch.
- Option 1 – double-click
index.htmlto open it in your browser. - Option 2 – run a lightweight static server (recommended for consistent audio/input):
Then visit http://localhost:5173.
# Python 3 python3 -m http.server 5173 # or Node.js npx http-server -p 5173
- Install Node.js 14+ (for development tools)
- Clone the repository and install dependencies:
git clone https://github.com/astickleyid/shooter-app.git cd shooter-app npm install - Start the development server:
npm start
- Run linting:
npm run lint
See CONTRIBUTING.md for detailed development guidelines.
- GitHub Pages: push the repo to a branch called
gh-pagesor enable Pages via the GitHub UI and point it to the root. No build step is required. - Any static host will work: upload
index.html,script.js,style.css, andbackend-api.js.
The game now supports a global leaderboard visible to all players! To enable it:
-
Deploy the serverless API to Vercel (free):
./deploy.sh
Or manually:
vercel --prod -
Update the API URL in
backend-api.jswith your deployment URL
See BACKEND_SETUP.md for detailed instructions.
Note: The leaderboard falls back to local-only mode if the backend is unavailable.
This repo includes a Vercel preview deployment workflow that runs on push. Set these GitHub Secrets in your repo:
VERCEL_TOKENVERCEL_ORG_IDVERCEL_PROJECT_ID
- Keyboard:
WASD/ arrow keys to move, mouse to aim/shoot,Spaceto boost,Pto pause. - Gamepad / Touch: twin-stick controls and a dedicated boost button are enabled on mobile.
- Secondary / Defense / Ultimates:
ShiftorE(or right-click) launches bombs,Fdeploys your defense system,Rfires the charged ultimate. Mobile has dedicated buttons next to the shoot stick. - Display Controls: Press
Gto toggle FPS counter,F(when not in-game) to toggle fullscreen mode.
- Visit the
Ship Hangarfrom the start screen (or via the in-game shop) to equip one of the starter hull templates—Vanguard Mk.I, Phantom-X, Bulwark-7, or Emberwing. Each frame alters visuals and core stats like speed, armor, magazine capacity, and fire cadence. Your choice is saved automatically inlocalStorage.
- The hangar now includes an armory: unlock and equip primary weapons (rail lances, scatter coils, ion arrays), secondary ordnance, defense systems, and ultimates.
- Ultimate charge builds as you deal damage and collect supplies; watch the new meter in the HUD and unleash devastating attacks when full.
- Supply crates occasionally drop from enemies, restocking ammo, secondary charges, or accelerating shield cooldowns.
The project has been refactored into a modular architecture for better maintainability:
shooter-app/
├── src/ # Modular source code
│ ├── core/ # Configuration and constants
│ ├── entities/ # Game entity classes
│ ├── systems/ # Game systems (Save, Auth, Input, etc.)
│ └── utils/ # Utility functions
├── docs/ # Architecture documentation
├── index.html # Root HTML document
├── style.css # UI styling and layout
├── script.js # Main game logic
└── package.json # Project configuration
See docs/ARCHITECTURE.md for detailed documentation.
Progress (credits, upgrades, best score) is saved in localStorage under the key void_rift_v11. Clearing browser storage resets progress.
The project uses Jest for testing. To run tests:
npm install
npm testTest suites include:
- game-utils.test.js – Tests for utility functions (clamp, rand, chance, distance, collision detection)
- game-config.test.js – Tests for game configuration and balance
- save-system.test.js – Tests for save/load functionality and data persistence
To run tests with coverage:
npm test -- --coverageVOID RIFT includes comprehensive social features for a connected gaming experience:
- User Accounts: Create an account to track your progress across devices
- Global Leaderboards: Compete with players worldwide
- Friends System: Add friends, compare stats, and see activity
- Profile Customization: Customize your profile with achievements and titles
- Activity Feed: See what your friends are achieving
- Achievements: Unlock and showcase achievements
- Native Integration: Seamless Apple Game Center support
- Leaderboards: Compete on iOS-native leaderboards
- Achievements: Unlock achievements with native iOS banners
- Friends: Play with your Game Center friends
- iCloud Sync: Automatic progress sync across iOS devices (when configured)
- Unified Experience: Both web and Game Center features work together
See GAME_CENTER_INTEGRATION.md for detailed information about the hybrid social system and GAME_CENTER_SETUP.md for setup instructions.
Game features:
- Unified Social System: Seamless integration between web social features and iOS Game Center
- Cross-Platform Play: Social features work on web, iOS, and future Android
- Fullscreen Mode: Toggle with
Fkey (outside of gameplay) or via the settings menu for an immersive experience - FPS Counter: Monitor performance with
Gkey toggle or settings menu - displays in real-time with color coding (green = 55+ fps, yellow = 30-54 fps, red = <30 fps) - Enhanced Robustness: Improved error handling, save game validation, and automatic pause when tab loses focus
- Performance Monitoring: Built-in frame rate tracking for smooth gameplay optimization
Development improvements:
- iOS Game Center Support: Native iOS integration with leaderboards and achievements
- Modular Architecture: Refactored into maintainable, reusable modules
- Secure Authentication: Password hashing using Web Crypto API (SHA-256)
- Enhanced Validation: Comprehensive input validation and data sanitization
- Code Quality: ESLint passing with zero errors, comprehensive JSDoc comments
- Better Browser Support: Enhanced meta tags for mobile and PWA compatibility
- Development Documentation: Architecture docs and contributing guidelines
- iOS App & CI/CD: Complete iOS app with automated builds via GitHub Actions
The game is available as a native iOS app with automated builds:
- Location:
ios/directory - Features: Portrait/landscape support, interactive tutorial, touch controls
- Automated Builds: GitHub Actions workflow builds iOS app on every push
- Latest Content: Auto-syncs with Vercel deployment
- Quick Sync: Run
./sync-ios-content.shto update iOS bundle locally
See IOS_BUILD_GUIDE.md and ios/README.md for details.
Open an issue or reach out with features you'd like to see. Some ideas:
- Multiplayer matchmaking via Game Center
- Turn-based multiplayer mode
- Weekly challenges and tournaments
- New enemy types, bosses, or wave modifiers
- Additional environments or parallax layers
- Expanded upgrade trees and weapon variants
- Audio design pass (music / SFX toggle, volume sliders)
- Performance profiling and touch-control refinements