Skip to content

Rush Hour is a fast-paced single-player game where you become a taxi driver, navigating a bustling city to pick up passengers and drop them off at their destinations. Avoid obstacles, compete against time, and earn points by delivering passengers efficiently. Can you score 100 points and win the game?

Notifications You must be signed in to change notification settings

anas-farooq8/RushHour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rush Hour Game

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.

Features

Game Start Menu

  • 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.
  • 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.

Game Board

  • 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.

Gameplay

  • 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).

Scoring System

  • 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.

Advanced Features

  • 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.

Winning Criteria

  • Total game time: 3 minutes.
  • Achieve a score of 100 or more within the time limit to win.

Graphics

  • Simple yet effective graphics with:
    • Stick figures for passengers.
    • Rectangles with circles for cars.

How to Run

  1. Extract the provided zip file containing the starter code.
  2. Open a terminal and navigate to the extracted directory.
  3. Compile the project with:
    make
  4. Start the game by running:
    ./game

Screenshots (Game Demo)

Below are some screenshots demonstrating the gameplay:
1 2 3 4 5 6 7


Enjoy playing Rush Hour and experience the thrill of being a taxi driver under pressure!

About

Rush Hour is a fast-paced single-player game where you become a taxi driver, navigating a bustling city to pick up passengers and drop them off at their destinations. Avoid obstacles, compete against time, and earn points by delivering passengers efficiently. Can you score 100 points and win the game?

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages