A simple yet thrilling browser-based game where the player must dodge falling objects to score points. Built with HTML, CSS, and JavaScript, this project demonstrates dynamic DOM manipulation, animations, responsive design, and user input handling.
- Features
- Technologies Used
- Getting Started
- Project Structure
- Game Instructions
- Key Highlights
- Contributing
- License
- Interactive Gameplay: Players can dodge objects using arrow keys or touch gestures.
- Cross-Platform Support: Works seamlessly on both desktop and mobile devices.
- Dynamic Animations: Smooth transitions and responsive animations for engaging user experiences.
- Accessible Design: ARIA roles and attributes for screen reader compatibility.
- Pause/Resume Functionality: Option to pause and resume the game.
- Responsive UI: Adapts to different screen sizes with optimized controls for mobile users.
- Error Handling: Comprehensive global error and rejection handlers.
- HTML: Semantic structure and accessibility.
- CSS: Responsive design and animations.
- JavaScript: Core game logic and user interaction.
- Any modern browser (Chrome, Firefox, Edge, Safari).
- Basic understanding of HTML, CSS, and JavaScript if you want to contribute.
-
Clone the Repository
git clone https://github.com/yourusername/dodge-the-falling-objects.git
-
Navigate to the Project Directory
cd dodge-the-falling-objects
-
Run the Game Open
index.html
in your browser.
dodge-the-falling-objects/
│
├── index.html # Main HTML structure
├── style.css # Stylesheet for the game
├── script.js # Core game logic
├── assets/ # Assets (e.g., icons, images)
│ ├── icon.png
│ └── thumbnail.webp
└── README.md # Documentation
- Objective: Avoid the falling objects to score points.
- Controls:
- Desktop: Use the arrow keys to move left or right.
- Mobile: Swipe left or right to move.
- Rules:
- The game ends when a falling object hits the player.
- The score increases as you successfully dodge objects.
- Pause/Resume: Use the pause button or the
Escape
key.
-
Modular and Clean Code:
- Use of variables and constants to enhance maintainability.
- Clear separation of concerns (game logic, styles, and markup).
-
Responsive and Accessible:
- ARIA attributes improve usability for assistive technologies.
- Media queries adapt the game to various screen sizes.
-
Advanced Features:
- Smooth animations with
requestAnimationFrame
. - Touch gesture support for mobile users.
- Smooth animations with
-
Error Handling:
- Global handlers for runtime errors and promise rejections.
Contributions are welcome! Here's how you can help:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature-name"
- Push to the branch:
git push origin feature-name
- Open a pull request.
This project is licensed under the MIT License.
- Game designed and developed by A4RMIN.
- Inspired by classic arcade-style games.