A simple yet engaging aim trainer game built with Java Swing that helps users improve their mouse accuracy and reaction time. This project was developed as a team effort during our college coursework.
This project is a desktop application developed in Java using Object-Oriented Programming principles and the Swing GUI framework. The game presents players with a target that moves randomly across the screen, challenging them to click it as many times as possible within a time limit.
This aim trainer was created collaboratively by our college team as part of our programming coursework. We applied our knowledge of Java OOP concepts, GUI development, and event-driven programming to create an interactive and functional game.
The application follows a modular design with three main classes:
- Serves as the entry point and main menu for the application
- Features a space-themed background with stylized buttons
- Implements event listeners for navigation between screens
- Uses custom painting to render the background image
- Provides difficulty selection interface
- Implements three difficulty levels that control target movement speed:
- Easy: Target moves every 3000ms
- Medium: Target moves every 2000ms
- Medium: Target moves every 1000ms
- Passes the selected difficulty parameter to the game screen
- Contains the core gameplay implementation
- Includes two nested classes:
AimerFrame: Main game window with timers and event handlingCounterPanel: Manages score tracking and time display
- Features include:
- Randomly moving target using a Timer-based system
- Click detection and score incrementing
- 30-second countdown timer
- Game over handling with score display
- Transparent buttons with custom styling
- Layered JPanels for component organization
- Custom painted backgrounds for visual appeal
- ActionListeners for button interactions
- Timer-based game mechanics for target movement
- Countdown timer implementation
- Random positioning algorithm for the target
- Score tracking system
- Difficulty scaling based on user selection
- Game state management (start, play, end)
- Java Standard Edition
- Swing GUI Library
- AWT (Abstract Window Toolkit)
- Ensure you have Java JDK installed on your system
- Clone this repository
- Place the required image files in the project directory:
620478.jpg- Space backgroundali.png- Target image
- Compile the Java files:
javac start.java levels.java space.java - Run the application:
java start
- High score system with persistence
- Additional game modes
- Customizable game duration
- More target variations
- Sound effects and background music
