This project recreates the iconic Tron light-cycle battle game in a top-down 2D view for two players. At the start of the game, both players are prompted to enter their names and select the colors of their light trails. Each player controls a motorbike that leaves a visible trail behind as it moves. The first player uses WASD keys, while the second player uses the arrow keys to steer. The motorbike automatically moves forward once per second in the last set direction. The objective is to survive longer than your opponent—a player loses if their motorbike collides with the arena boundary or with any light trail, including their own or the opponent's. When a game ends, the winner’s score is updated in a database. If the winner is not already in the database, a new record is created for them. The application includes a menu system with options to restart the game and to view a high score table, showing the top 10 players based on win counts.
Java JDK 8+ SQLite or other local DB for score tracking IDE or terminal to run the program
To start playing the Tron-inspired Light-Cycle Battle game, the user must first compile and run the program using a Java IDE or terminal with JDK installed. Upon launching the game, both players are prompted to enter their names and choose the color of their light trail, which will visually follow their motorbike throughout the match. The game is designed for two players, each controlling a motorbike on a top-down grid. Player 1 uses the W, A, S, D keys to move up, left, down, and right respectively, while Player 2 uses the arrow keys for the same directional controls. The motorbikes automatically move forward at regular intervals, and players must steer to avoid crashing into the boundaries of the arena or any existing light trails, including their own. The game ends immediately when one player crashes, and the other is declared the winner. After each round, the winner’s name is recorded or updated in the database—if the player does not already exist in the database, a new entry is created. The game includes a menu with options to restart the game and to display a high-score table showcasing the top 10 players by number of wins. This allows for ongoing competitive play and tracking of performance across multiple sessions.