Skip to content

Rebanta-Gupta/Trex-Game

Repository files navigation

Trex Game

A simple infinite runner game inspired by the classic Chrome Dino game, built using the p5.js library.

Description

This project is a browser-based game where the player controls a T-Rex that runs continuously. The objective is to avoid obstacles (cacti) by jumping over them. The game speeds up as the score increases, making it progressively more challenging.

How to Play

  1. Start the Game: Open index.html in your web browser.
  2. Jump: Press the Spacebar to make the T-Rex jump.
  3. Avoid Obstacles: Jump over the incoming obstacles to keep running.
  4. Game Over: If the T-Rex hits an obstacle, the game ends.
  5. Restart: Click the restart icon on the screen to play again.

Features

  • Infinite Runner: The game continues until the player hits an obstacle.
  • Score Tracking: Score increases as you progress.
  • Dynamic Speed: The game speed increases as your score goes up.
  • Randomized Obstacles: Different types of obstacles appear randomly.
  • Game States: Includes Play and End states with a Game Over screen.

Technologies Used

  • p5.js: A JavaScript library for creative coding.
  • p5.play: A library for game interactions and sprites.
  • HTML/CSS: For structure and styling.

Installation

To run this game locally:

  1. Clone or download this repository.
  2. Open the index.html file in any modern web browser.

Credits

  • Images and assets used in this game are part of the project resources.
  • Built with p5.js.

About

A browser-based infinite runner game inspired by the classic Chrome Dino game, built with p5.js and p5.play.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors