Skip to content

🦖 A modern implementation of the classic Chrome offline dinosaur game with enhanced features like meteorites, pterodactyls, and day/night cycles. Built with vanilla JavaScript and Firebase.

Notifications You must be signed in to change notification settings

AitorSantaeugenia/chrome-t-rex-game

Repository files navigation

🦖 Chrome T-Rex Game

A modern implementation of the classic Chrome offline dinosaur game, built with vanilla JavaScript and HTML5 Canvas. Experience the nostalgia of the original game with enhanced features and improved gameplay mechanics.

Live Demo 🎮

Play the game

Or download Pre-built Executable, built with Electron

  • Dropbox
  • Google Drive

🔒 Both executables have been verified virus-free by VirusTotal.

Overview 🎮

This project recreates the iconic Chrome dinosaur game that appears when you're offline. While maintaining the core gameplay, it introduces several improvements and additional features to enhance the gaming experience.

Technologies Used 🛠️

  • Frontend: HTML5, CSS3, Vanilla JavaScript
  • Game Engine: HTML5 Canvas
  • Database: Firebase Firestore
  • Authentication: Firebase Authentication
  • Hosting: Firebase Hosting
  • Desktop App: Electron
  • Version Control: Git

Key Features ⭐

  • Meteorite Obstacles: Special falling obstacles that add an extra layer of challenge while being easy to avoid 🌠
  • Pterodactyl Encounters: Flying obstacles that appear at higher scores, adding variety and increasing difficulty 🦅

🌠 Meteorites & Pterodactyls 🦅

Meteorites!

  • Daily Challenge System: Limited to 2 attempts per 24-hour period ⏰
  • Real-time Leaderboard: Track and compare scores with other players 🏆
  • Dynamic Day/Night Cycle: Visual changes based on score progression 🌓
  • Progressive Difficulty: Increasing game speed and obstacle complexity 🚀
  • Desktop Application: Available as a standalone .exe file 💻

Game Mechanics 🎯

Speed Progression ⚡

  • Base speed increases at scores: 600, 2500, and 4000
  • Pterodactyls (flying obstacles) appear at score 1000 🦅
  • Pterodactyl frequency and speed increase at score 2500

Day/Night Cycle 🌓

  • Night mode activates every 1000 points 🌙
  • Day mode occurs at 2000 points (excluding 1000-point intervals) ☀️
  • Visual environment changes to reflect the time of day

Controls ⌨️

SPACE      → Jump 🦘
ArrowDown  → Crouch ⬇️
ArrowUp    → Stand ⬆️

Live Demo 🎮

Play the game

Installation 🛠️

Web Version 🌐

  1. Clone the repository:
    git clone https://github.com/AitorSantaeugenia/chrome-t-rex-game
  2. Configure environment:
    • Copy .env.example to .env
    • Update email configuration in .env
  3. Configure game settings:
    • Copy config.example.js to config.js
    • Adjust game parameters as needed
  4. Configure game settings:
    • Copy config.example.json to config.json
    • Adjust game parameters as needed
  5. Launch the game:
    • Open index.html in your preferred browser

Deploy to Firebase Hosting

  1. Install Firebase CLI:
    npm install -g firebase-tools
  2. Login to Firebase:
    firebase login
  3. Initialize Firebase in your project:
    firebase init
  4. Build the web version:
    npm run web:build
  5. Deploy to Firebase:
    npm run web:deploy

Desktop Version 💻

Option 1: Download Pre-built Executable

  • Dropbox
  • Google Drive

🔒 Both executables have been verified virus-free by VirusTotal. Click the VirusTotal badge to view the full scan report.

Option 2: Build Locally

  1. Clone the repository:
    git clone https://github.com/AitorSantaeugenia/chrome-t-rex-game
    cd chrome_t_rex
  2. Install dependencies:
    npm install
  3. Build the executable:
    npm run build
  4. Find the executable in the /dist folder:
    • Windows: dist/chrome_t_rex-win-x64/chrome_t_rex.exe
    • macOS: dist/chrome_t_rex-darwin-x64/chrome_t_rex.app
    • Linux: dist/chrome_t_rex-linux-x64/chrome_t_rex

System Requirements

  • Operating System: Windows 10 or later
  • Processor: Intel Core i3 or equivalent
  • Memory: 4 GB RAM
  • Graphics: DirectX 11 compatible graphics card
  • Storage: 100 MB free space
  • Display: 1280x720 minimum resolution

Screenshots 📸

Main Menu 🏠

Home Page

Score Submission 📝

Save Score Screen

Daily Attempt Limit ⏰

Daily Limit Notice

Play Mode Without Saving 🎮

When the daily limit is exceeded, players can continue playing but won't be able to save their scores. This allows for practice and enjoyment while maintaining the competitive integrity of the leaderboard.

Daily Limit Notice

Meteorite Obstacles 🌠

Watch out for falling meteorites! These special obstacles add an extra layer of challenge to the game.

Meteorite Gameplay

Day/Night Cycle 🌓

Midnight time

Pterodactyl Encounters 🦅

Pteras coming randomly

Development Status 🛠️

Completed Features ✅

  • ✅ Collision detection with visual feedback
  • ✅ Optimized game speed and difficulty progression
  • ✅ Fixed initial animation state
  • ✅ Enhanced flying obstacle mechanics

Future Improvements 🔮

  • Implement additional obstacle types
  • Add sound effects and background music
  • Create achievement system
  • Develop multiplayer mode

Contributing 🤝

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Contact 📧

For suggestions, bug reports, or feature requests:

License 📄

This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

About

🦖 A modern implementation of the classic Chrome offline dinosaur game with enhanced features like meteorites, pterodactyls, and day/night cycles. Built with vanilla JavaScript and Firebase.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published