Inspiration I wanted to create a simple but addictive mini-game that tests reflexes—inspired by classic clicker games like "Whack-a-Mole" but with a spooky twist! Ghosts felt like the perfect target because they disappear unpredictably, adding tension.
What it does Ghost Hunt is a fast-paced clicking game where:
- Ghosts randomly appear and vanish if unclicked, testing reflexes.
- Speed scales with score—ghosts spawn faster as you progress.
- Dynamic scoring: Earn bonus points for quick consecutive clicks (combo system).
- Adaptive difficulty: The game auto-adjusts to keep players challenged.
How we built it
Built with vanilla HTML/CSS/JavaScript:
- Random spawning: Ghosts appear at random positions using Math.random().
- Score tracking: Simple counter that increments on click.
- Visual feedback: Ghosts vanish with a puff animation (CSS
transform).
Challenges we ran into
Problem: Ghosts sometimes spawned outside the screen. Problem: The game felt too easy. Solution: Added a speed multiplier that scales with the player’s score: setTimeout(createGhost, 1000 - (score * 20)); // Faster ghosts over time
What we learned This project taught me:
- DOM manipulation (creating/removing ghost elements dynamically).
- Event listeners (handling clicks, timers).
- Dynamic difficulty (adjusting ghost speed based on player score).
Built With
- github
- javascript
- vanilla
- vscode