Welcome to the "Dinosaur Game"! This is a simple browser-based game where you control a dinosaur to jump over obstacles and achieve the highest score.
- Jump over randomly generated obstacles.
- Track your score and game time.
- Responsive game controls.
- Playable directly in a web browser.
- Open the game in your browser by opening the
index.htmlfile. - Press the Spacebar to start the game.
- Use the Spacebar to make the dinosaur jump over obstacles.
- Avoid colliding with obstacles to keep the game going.
- When the game ends, press the Spacebar again to restart.
Dinosaur Game
├── index.html # Main HTML file containing the game.
├── styles.css # CSS for styling the game (embedded in HTML).
├── audio # Folder for game sounds.
│ ├── game-start.wav
│ └── jump.wav
└── README.md # Project documentation.
-
Dinosaur Appearance:
- Modify the
dinoobject in the script to change its size or color.
- Modify the
-
Obstacle Settings:
- Adjust the
OBSTACLE_SPEEDvariable to change obstacle speed.
- Adjust the
-
Gravity and Jump:
- Modify
GRAVITYandJUMP_STRENGTHto change the physics of the dinosaur's jump.
- Modify
- A modern web browser (Chrome, Firefox, Edge, etc.).
- Internet connection for fonts (uses Google Fonts).
The game includes the following sound effects:
- game-start.wav: Played when the game starts.
- jump.wav: Played when the dinosaur jumps.
-
Clone the repository:
git clone https://github.com/your-username/dinosaur-game.git
-
Open the
index.htmlfile in your preferred browser.
Feel free to contribute by creating pull requests. Suggestions and improvements are welcome!
This project is open-source and available under the MIT License. See the LICENSE file for details.