Rush Hour is a captivating single-player game that puts you in the shoes of a taxi driver racing against time. Your mission: collect money by picking up passengers and dropping them off at their destinations while navigating a dynamic and challenging environment.
- View the leaderboard displaying the top 10 scores along with player names.
- High-scores and player names are stored in a file (
highscores.txt
) and updated dynamically. - If the game is being played for the first time, the leaderboard will be empty.
- High-scores and player names are stored in a file (
- Choose your taxi:
- Select between a yellow taxi and a red taxi, or let the game assign one randomly.
- Enter your name to start the game.
- A 20x20 board featuring roads and buildings:
- Roads (white) are navigable.
- Buildings (black) are obstacles.
- Dynamic elements on the board:
- Player’s taxi, other moving cars, obstacles, and passengers.
- Passengers are placed randomly at positions not occupied by obstacles or other cars.
- Use arrow keys to navigate the taxi in all four directions.
- Pick up passengers by stopping next to them and pressing the Spacebar.
- Deliver passengers to their randomly generated desired destinations (highlighted in green).
- Positive Points:
- +10 points for successfully delivering a passenger.
- +1 point for each overtaking maneuver.
- Negative Points:
- -5 points for hitting a person.
- Penalties for hitting obstacles and other cars vary based on taxi type:
- Red Taxi:
- -2 points for hitting an obstacle (tree or box).
- -3 points for hitting another car.
- Yellow Taxi:
- -4 points for hitting an obstacle (tree or box).
- -2 points for hitting another car.
- Red Taxi:
- Increasing difficulty:
- Number of cars and their speed increases after every two successful passenger deliveries.
- Taxi speed:
- Yellow taxi is faster than the red taxi.
- Dynamic obstacles and moving cars:
- Non-player cars move continuously in all directions.
- Total game time: 3 minutes.
- Achieve a score of 100 or more within the time limit to win.
- Simple yet effective graphics with:
- Stick figures for passengers.
- Rectangles with circles for cars.
- Extract the provided zip file containing the starter code.
- Open a terminal and navigate to the extracted directory.
- Compile the project with:
make
- Start the game by running:
./game
Below are some screenshots demonstrating the gameplay:
Enjoy playing Rush Hour and experience the thrill of being a taxi driver under pressure!