Skip to content

Ahmed-Shahzad10/Dino-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dino Run Game

Dino Run is a console-based game implemented in C++. The game features a dinosaur character that can jump to avoid hurdles and accumulate points. It provides a simple and entertaining experience for users.

Table of Contents

Prerequisites

Ensure that you have a C++ compiler installed on your system to compile and run the game.

Getting Started

Installation

Clone the repository to your local machine using the following command:

git clone https://github.com/your-username/dino-run-game.git

Running the Game

  1. Navigate to the project directory.
  2. Compile the source code using a C++ compiler.
    g++ dino_run_game.cpp -o DinoRunGame
  3. Run the executable.
    ./DinoRunGame

Gameplay

  • Use the spacebar to make the dinosaur jump and avoid hurdles.
  • Press 'p' to pause the game.
  • Press 'Escape' to exit the game.

dino

dino2

dino3

dino4

dino5

Code Structure

The code is organized using a class-based approach. Here are some key components:

  • DinoGame Class: Manages game-related functions such as initializing the game, moving the dinosaur, drawing hurdles, and handling gameplay logic.
  • Main Function: Serves as the entry point for the program. It displays a menu, processes user input, and starts the game or shows instructions.

Contributing

Contributions are welcome! If you'd like to enhance the game or fix any issues, feel free to fork the repository and submit a pull request.

Acknowledgements

  • Inspired by the classic Google Chrome offline dinosaur game.
  • ASCII art for the dinosaur character and hurdles.

About

Created a Google Dino game clone using oop in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages