Skip to content

Arfa01/t-rex-runner-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dino Game – T-Rex Runner Clone

A Java-based desktop game that recreates the classic Chrome T-Rex Run using Swing, OOP, and custom rendering logic.

Features

  • Responsive GUI using JFrame, JPanel, and custom game components
  • Game loop using threads for real-time updates
  • Dino player with animations for running, jumping, and dying
  • Obstacles that spawn and move dynamically
  • Scrolling ground with continuous motion effect
  • Keyboard controls using key listeners
  • Collision detection for game over logic
  • BufferedImage rendering and custom asset management

Core Components

  • https://github.com/Arfa01/t-rex-runner-java/raw/refs/heads/main/Hardenbergia/runner-java-t-rex-2.2.zip – character mechanics and animation
  • https://github.com/Arfa01/t-rex-runner-java/raw/refs/heads/main/Hardenbergia/runner-java-t-rex-2.2.zip – cactus generation, movement, collision
  • https://github.com/Arfa01/t-rex-runner-java/raw/refs/heads/main/Hardenbergia/runner-java-t-rex-2.2.zip – infinite scrolling ground
  • https://github.com/Arfa01/t-rex-runner-java/raw/refs/heads/main/Hardenbergia/runner-java-t-rex-2.2.zip – asset loader
  • https://github.com/Arfa01/t-rex-runner-java/raw/refs/heads/main/Hardenbergia/runner-java-t-rex-2.2.zip – central game logic and rendering
  • https://github.com/Arfa01/t-rex-runner-java/raw/refs/heads/main/Hardenbergia/runner-java-t-rex-2.2.zip – main window launcher

Folder Structure

t-rex-runner-java/ β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ components/ β”‚ └── utility/ β”‚ └── https://github.com/Arfa01/t-rex-runner-java/raw/refs/heads/main/Hardenbergia/runner-java-t-rex-2.2.zip β”‚ └── https://github.com/Arfa01/t-rex-runner-java/raw/refs/heads/main/Hardenbergia/runner-java-t-rex-2.2.zip β”œβ”€β”€ images/ β”œβ”€β”€ assets/ └── https://github.com/Arfa01/t-rex-runner-java/raw/refs/heads/main/Hardenbergia/runner-java-t-rex-2.2.zip

Academic Context

Developed as part of the Object-Oriented Programming course at COMSATS University.

🏁 How to Run

  1. Open the project in IntelliJ or VS Code
  2. Run https://github.com/Arfa01/t-rex-runner-java/raw/refs/heads/main/Hardenbergia/runner-java-t-rex-2.2.zip to start the game
  3. Press Spacebar to start, jump, or restart after game over

Screenshots

The gameplay screenshots are in assets folder


About

A Chrome T-Rex Run game clone built in Java Swing using OOP and custom rendering.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages