Skip to content

Nuraddin0/Traffic-Control-Simulator

Repository files navigation

Traffic Control Simulator

A simple traffic control simulation game built with Java and JavaFX.

Description

In this project, we created a simple mobile control simulation game using the JavaFx development system. The game includes:

  • A start menu with a level selection menu featuring 5 different maps.
  • Maps with varying winning and losing conditions.
  • Levels that are created based on input files.

Gameplay

  • From the start menu, users can either exit the game or proceed to the level selection menu.
  • Users can select a level in the level selection menu or switch between levels by winning at the current level.
  • Each map requires a certain number of vehicles to reach their destination to win.
  • If the number of vehicles that reach the destination meets the required amount, the player wins the map and can move on to the next level or return to the level selection menu.
  • Each map also has a limit on the number of car crashes allowed. If this limit is reached, the map fails, and the player can choose to exit or replay the map.
  • Vehicles are generated randomly on the map with speeds proportional to the distance they need to travel.

We aimed to make the game fun with effective transition effects and sound effects triggered by in-game actions.

Screenshots

Level 1

Level 2

Level 3

Level 4

Level 5

Installation

To run this project locally, follow these steps:

  1. Clone the repository:
  2. git clone https://github.com/Nuraddin0/TrafficControlSimulator.git
    cd TrafficControlSimulator
    
  3. Ensure you have Java and JavaFX installed on your machine.
  4. Compile and run the project using your preferred Java IDE or from the command line:
  5. javac -cp .:path/to/javafx-sdk/lib/* Main.java
    java -cp .:path/to/javafx-sdk/lib/* Main
    

Usage

  • Start the game and select a level from the level selection menu.
  • Guide the vehicles to their destinations while avoiding crashes.
  • Use the menu options to navigate between levels or exit the game.

Features

  • 5 unique maps with different winning and losing conditions.
  • Dynamic vehicle generation and speed adjustments.
  • Effective transition and sound effects.
  • Level progression and replay options.

Technologies Used

  • Java
  • JavaFX

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

JavaFx Game Project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages