Back to Projects

Air Hockey

This Java project recreates the classic Air Hockey game for two players. Each player controls a mallet on opposite sides of the table and aims to score 7 goals before their opponent. The game features: - Keyboard controls for movement - Sound effects for collisions and goals - Cheat codes to dynamically adjust mallet sizes The gameplay is handled with object-oriented design, including classes for the Ball, Mallets, Game Arena, and supporting elements like Lines, Rectangles, Text, and Sound. The project includes JavaDoc documentation for all classes, making it easy to understand the structure and behavior of the code. Players can also mute/unmute sounds during gameplay and enjoy a responsive, interactive experience that simulates the physics of a real air hockey table. The project demonstrates: - Java Swing/Graphics programming - Event-driven architecture - Collision detection - Basic game physics

Technologies Used

JavaJava SwingObject-Oriented Programming2D Graphics