🌐 Play Now: https://yerry262.github.io/HomeRunDerby/
A retro-styled browser-based baseball batting game inspired by classic early 2000s arcade games!
- Open
index.htmlin your web browser - Click PLAY BALL! to start
- Watch the pitcher throw the ball
- Click, tap, or press SPACE to swing at the perfect moment!
- Time your swing when the ball reaches the strike zone (green flash)
- All successful hits are HOME RUNS! 💥
- Miss one pitch and you're OUT! ❌
- Variable Pitch Speed: Each pitch has slightly different speed (70-130% variation)
- Timing-Based Gameplay: Perfect timing gives you a "PERFECT!" home run
- One Strike Rule: Miss a single pitch and the game ends
- High Score System: Top 100 leaderboard with 8-letter names
- Retro Styling: Early 2000s golden/orange button aesthetic
- Particle Effects: Satisfying visual feedback on hits
- Responsive Design: Works on desktop and mobile
- Perfect Timing Zone: Hit when ball is at ~92% of distance to home plate
- Good Timing Window: 85-98% of distance (all hits within this are home runs)
- Visual Cues: Strike zone flashes green when ball is in hitting range
- Progressive Challenge: As you get more hits, maintaining focus becomes harder!
- Tracks top 100 players
- Persistent storage using localStorage
- 8-character name limit (classic arcade style)
- Accessible to all players on the same browser
- Mouse: Click to swing
- Keyboard: SPACE to swing
- Touch: Tap screen to swing (mobile-friendly)
HomeRunDerby/
├── index.html # Main game file
├── css/
│ └── style.css # Retro styling
├── js/
│ ├── game.js # Main game logic and state management
│ ├── physics.js # Pitch mechanics and particle system
│ ├── input.js # Input handling (mouse, keyboard, touch)
│ ├── renderer.js # Canvas rendering (field, ball, batter)
│ └── highscores.js # Leaderboard system
└── README.md
Simply open index.html in any modern web browser. No installation or build process required!
- Pure HTML5
- CSS3 (with animations and gradients)
- Vanilla JavaScript (ES6 classes)
- Canvas API for rendering
- localStorage for high score persistence
- Bold golden/orange gradient buttons
- Chunky borders and drop shadows
- Courier New monospace font
- Baseball field gradient backgrounds
- Retro particle effects
- Watch the green strike zone flash - that's your timing window!
- Perfect timing (when the ball is centered) gives bonus visual feedback
- Stay focused - one miss ends your run!
- Each pitch speed varies, so adapt your timing
- Practice makes perfect!
Created as a tribute to classic early 2000s arcade-style browser games!