A JavaFX implementation of the popular Chrome Dinosaur game.
dinoGame is a recreation of the classic Chrome Dinosaur game using JavaFX. Players control a dinosaur character, jumping over obstacles like cacti and birds while the game's difficulty increases over time.
- Dinosaur character with jumping ability
- Randomly generated obstacles (cacti and birds)
- Increasing difficulty levels
- Score tracking
- Responsive controls
- Java
- JavaFX
- Object-Oriented Programming principles
src/MyGame.java
: Main game logic and JavaFX applicationsrc/Dino.java
: Dinosaur character classsrc/Cactus.java
: Cactus obstacle classsrc/Bird.java
: Bird obstacle classsrc/GameObject.java
: Base class for game objectsres/
: Directory containing game assets (images)
- Ensure you have Java and JavaFX installed on your system.
- Clone this repository:
git clone https://github.com/yourusername/dinoGame.git
- Navigate to the project directory:
cd dinoGame
- Compile and run the
MyGame.java
file:
javac src/*.java java -cp src MyGame
- Up Arrow: Jump
- Left Arrow: Move left
- Right Arrow: Move right
- The game starts with the dinosaur on a platform.
- Obstacles (cacti and birds) appear randomly from the right side of the screen.
- The player must jump over obstacles to avoid collision.
- The game speed and difficulty increase as the player's score goes up.
- The game ends when the dinosaur collides with an obstacle.
- Add sound effects and background music
- Implement high score tracking
- Create power-ups and special abilities
- Add different themes or skins for the dinosaur and obstacles