๐ฎ Classic arcade action meets modern web technology
A faithful recreation of the iconic Space Invaders arcade game, featuring mobile-optimized controls, fullscreen support, and modern web features. Vibe coded by Emlyn O'Regan using Cursor & Claude-4-Sonnet.
- Authentic Space Invaders experience with waves of alien invaders
- Progressive difficulty - aliens get faster and more aggressive each wave
- Destructible barriers that wear down from both player and alien fire
- Bonus mothership - appears periodically for 50-300 bonus points
- High score tracking with local storage persistence
- Extra lives every 10,000 points
- Touch controls designed for mobile gaming ergonomics
- Left thumb: โ โถ horizontal movement buttons
- Right thumb: ๐ฅ fire button
- Fullscreen support with automatic address bar hiding
- Responsive design that works on any device
- PWA capabilities - install as an app on your phone
- Offline functionality with service worker caching
- Social media integration with Open Graph meta tags
- SEO optimized with structured data and sitemap
- Fast loading with optimized assets and CDN resources
- Green aliens: 10 points
- Yellow aliens: 20 points
- Red aliens: 30 points
- Mothership: 50-300 bonus points (random)
- Wave bonus: 100 points per completed wave
Desktop:
- Movement: Arrow keys or A/D keys
- Fire: Spacebar
- Pause: P or ESC
Mobile:
- Movement: โ โถ buttons (left thumb)
- Fire: ๐ฅ button (right thumb)
- Pause: โฐ menu button or turn device
- Mothership: Bonus UFO flies across the top periodically
- Wave progression: Each wave increases speed and aggression
- Destructible barriers: Pixel-by-pixel destruction with explosion effects
- Smart alien AI: Proximity-weighted firing system
- Game Engine: Phaser.js 3.70.0
- Language: JavaScript ES6+ modules
- Graphics: HTML5 Canvas with pixel-perfect rendering
- Audio: Web Audio API with retro sound synthesis
- PWA: Service Worker + Web App Manifest
spaceinvaders/
โโโ index.html # Main entry with PWA meta tags
โโโ manifest.json # PWA manifest
โโโ sw.js # Service worker for caching
โโโ css/
โ โโโ style.css # Main game styling
โ โโโ mobile.css # Mobile-specific styles
โ โโโ fullscreen.css # Fullscreen functionality
โโโ js/
โ โโโ main.js # Game initialization
โ โโโ config.js # Game configuration
โ โโโ scenes/
โ โ โโโ MenuScene.js # Main menu
โ โ โโโ GameScene.js # Core gameplay
โ โ โโโ GameOverScene.js # Game over screen
โ โโโ mobile/
โ โโโ TouchControls.js # Touch input system
โ โโโ FullscreenHelper.js # Address bar hiding
โ โโโ SimpleFullscreen.js # Fullscreen API
โโโ assets/images/
โ โโโ favicon.png # App icon
โ โโโ oembed.png # Social media preview
โโโ robots.txt # SEO crawling rules
โโโ sitemap.xml # Search engine sitemap
โโโ README.md # This file
// Ergonomic button layout for mobile gaming
const controlLayout = {
left: { position: 'bottom-left', action: 'moveLeft' },
right: { position: 'bottom-left', action: 'moveRight' },
fire: { position: 'bottom-right', action: 'fire' }
};
// Touch-optimized physics
const touchResponse = {
immediate: true,
precision: 'pixel-perfect',
feedback: 'visual + haptic'
};// Dual approach for maximum compatibility
const fullscreenMethods = {
automatic: 'scroll-based address bar hiding',
manual: 'fullscreen API with โถ button',
fallback: 'viewport manipulation'
};- Visit the game URL in any modern browser
- Click PLAY to start
- Use controls appropriate for your device
- Defend Earth from the alien invasion!
- Open the game in Chrome/Edge/Safari
- Look for "Install" or "Add to Home Screen" option
- Install for offline play and app-like experience
# Clone or download the repository
cd spaceinvaders
# Start local server (Python 3)
python -m http.server 8000
# Or use Node.js
npx http-server
# Open browser to localhost:8000- Classic color palette: Green #00ff00, White #ffffff, Red #ff0000
- Pixel-perfect sprites with authentic 8-bit feel
- Smooth 60fps gameplay with modern rendering
- Retro sound synthesis using Web Audio API oscillators
- Responsive layout adapts to any screen size
- Touch-friendly controls with visual feedback
- Accessibility features including keyboard navigation
- Clean, readable UI with high contrast
- No gesture controls - pure button-based for precision
- Ergonomic positioning for comfortable extended play
- Visual feedback on button press
- Landscape orientation support with fullscreen
- Efficient rendering to preserve battery life
- Optimized asset loading with service worker caching
- Responsive scaling maintains performance across devices
- Memory management prevents leaks during long sessions
- Random spawning every 15-30 seconds
- Alternating flight patterns (left-to-right, right-to-left)
- Bonus point variety (50, 100, 150, or 300 points)
- Distinctive audio and visual effects
- Strategic challenge - risk vs reward timing
- Adaptive difficulty based on player performance
- Speed escalation with each completed wave
- Increased alien aggression over time
- Barrier regeneration for fresh defensive positions
- Open Graph tags for rich link previews
- Twitter Card support for social sharing
- Structured data (JSON-LD) for search engines
- Custom favicon and app icons
- Semantic HTML structure
- Meta descriptions and keywords
- Robots.txt and sitemap.xml
- Fast loading and mobile-friendly design
Vibe coded by Emlyn O'Regan
Using Cursor IDE & Claude-4-Sonnet AI
Original Game: Space Invaders (1978) by Tomohiro Nishikado
Framework: Phaser.js Community
Inspiration: Classic arcade gaming era
๐ Ready to defend Earth? Start playing now!