A fun and engaging 2D side-scrolling runner game built with HTML5, CSS3, and JavaScript. Control the Red Hat Boy as he runs through a challenging landscape, jumping over flames to survive and achieve the highest score possible!
- Smooth Character Animation: Fluid running, jumping, and death animations
- Dynamic Obstacles: Flame obstacles that move across the screen
- Progressive Difficulty: Obstacle spacing changes as you advance
- Score System: Earn points for survival time
- Sound Effects: Immersive audio for running, jumping, and game events
- Win Condition: Reach a score of 630 to win the game
- Responsive Controls: Simple keyboard controls for easy gameplay
- ENTER: Start the game
- SPACEBAR: Jump over obstacles
- Keep the Red Hat Boy alive by jumping over flames
- Survive as long as possible to achieve a high score
- Reach 630 points to win the game!
- Time your jumps carefully to avoid the flames
- The game gets progressively challenging with varying obstacle patterns
- Listen for audio cues to enhance your gaming experience
- A modern web browser (Chrome, Firefox, Safari, Edge)
- No additional installations required
- Clone or download this repository
- Open
index.htmlin your web browser - Press ENTER to start the game
- Use SPACEBAR to jump and avoid obstacles
2D-Game/
โโโ index.html # Main HTML file
โโโ style.css # Game styling and layout
โโโ script.js # Game logic and mechanics
โโโ Icons/
โ โโโ Icon.png # Game favicon
โโโ Images/
โ โโโ background.png # Game background
โ โโโ Game Over Background.jpg
โโโ Run (1-8).png # Running animation sprites
โโโ Jump (1-12).png # Jumping animation sprites
โโโ Dead (1-10).png # Death animation sprites
โโโ flame.gif # Obstacle animation
โโโ run.mp3 # Running sound effect
โโโ jump.mp3 # Jumping sound effect
โโโ dead.mp3 # Death sound effect
โโโ README.md # This file
The game includes high-quality sprite animations and sound effects:
- Character Sprites: 8-frame running animation, 12-frame jumping animation, 10-frame death animation
- Sound Effects: Authentic audio feedback for all game actions
- Visual Effects: Animated flame obstacles and scrolling background
- Continuous Scoring: Earn 2 points every 100ms while alive
- Victory Score: Reach 630 points to win
- High Score: Try to beat your personal best!
- Built with: Vanilla HTML5, CSS3, and JavaScript
- Animation: CSS sprite-based character animations
- Audio: HTML5 Audio API for sound effects
- Responsive: Optimized for desktop browsers
- Start Screen: Welcome screen with instructions
- Gameplay: Active running and jumping phase
- Game Over: Death screen with score and retry option
- Victory: Win screen for achieving the target score
Potential improvements for future versions:
- Multiple levels with different themes
- Power-ups and special abilities
- Leaderboard system
- Mobile touch controls
- Additional character customization
Feel free to fork this project and submit pull requests for improvements!
Enjoy playing The Red Hat Boy Game. ๐ฎ๐โโ๏ธ๐ฅ