Skip to content

icekidtech/racing-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

2D Racing Game

A simple 2D racing game built with Java, featuring basic car physics, track racing, and score tracking.

Features

  • 2D top-down racing gameplay
  • Car physics (acceleration, deceleration, steering)
  • Track collision detection
  • Lap timing system
  • High score tracking
  • Keyboard controls

Technical Requirements

  • Java JDK 8 or higher
  • Maven 3.6 or higher
  • Any IDE that supports Java (VS Code, IntelliJ, Eclipse)

Project Structure

racing-game
├── src
│   ├── main
│   │   ├── java
│   │   │   ├── game
│   │   │   │   ├── Game.java
│   │   │   │   ├── GameWindow.java
│   │   │   │   └── GamePanel.java
│   │   │   ├── entities
│   │   │   │   ├── Car.java
│   │   │   │   └── Track.java
│   │   │   └── utils
│   │   │       ├── Constants.java
│   │   │       └── InputHandler.java
│   ├── test
│   │   └── java
│   │       └── game
│   │           └── GameTest.java
├── pom.xml
└── README.md

Setup Instructions

  1. Clone the repository:

    git clone <repository-url>
    
  2. Navigate to the project directory:

    cd racing-game
    
  3. Build the project:

    mvn clean install
    
  4. Run the game:

    mvn exec:java -Dexec.mainClass="game.Game"
    

Controls

  • ↑ (Up Arrow): Accelerate
  • ↓ (Down Arrow): Brake/Reverse
  • ← (Left Arrow): Steer left
  • → (Right Arrow): Steer right
  • ESC: Pause game

Development Roadmap

  • ✓ Basic game structure
  • ✓ Car movement physics
  • ✓ Collision detection
  • ✓ Track design
  • ✓ Lap timing system
  • Multiple tracks
  • Sound effects
  • Menu system

Gameplay

  • Use the arrow keys to control the car.
  • The objective is to complete laps on the track as quickly as possible.
  • Avoid collisions with the track boundaries.

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages