Skip to content

ANSHIKATYAGI30/TrexRunnerGame

Repository files navigation

🦖 TrexRunnerGame

TrexRunnerGame is a browser-based endless runner game. In this fun and lightweight project, you control a running T-Rex and avoid obstacles while trying to beat your high score


🚀 Demo

🎮 Press Space (or click/tap) to make the T-Rex jump and avoid obstacles.
⚠️ If obstacles hit the T-Rex, the game ends — try again to beat your best score!


📁 Repository Contents

File / Asset Description
index.html Main HTML file — game container
sketch.js Game logic using the p5.js framework
style.css Styles for UI and layout
p5.js, p5.play.js, p5.js libraries for rendering & gameplay
p5.dom.min.js, p5.sound.min.js p5 extensions (DOM & sound support)
*.png asset files Game sprites (T-Rex, obstacles, ground, restart, etc.)

🛠️ How It Works

This game uses the p5.js and p5.play JavaScript libraries to render and animate sprites, detect collisions, and manage sprite behavior. You’ll find:

  • A running T-Rexanimated with frames (trex1.png, trex3.png, trex4.png, etc.)
  • Ground and cloud sprites for environment visuals
  • Multiple obstacle sprites (obstacle1.png to obstacle6.png)
  • Restart button sprites to replay after a crash
  • Game sound effects via p5.sound.min.js

Gameplay loops until the player collides with an obstacle — then they can restart and try again.

This game is inspired by the Chrome Dinosaur Runner, a beloved endless runner that appears when Chrome loses internet connection

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors