A Java implementation of the classic Arkanoid gameLevel, demonstrating core OOP principles including inheritance, polymorphism, and design patterns.
This project is an Arkanoid-style gameLevel built from scratch using Object-Oriented Programming concepts. It features collision detection, event-driven architecture with listeners, and a complete gameLevel loop with sprite management.
- Java Development Kit (JDK) 8 or higher
- IntelliJ IDEA (recommended) or any Java IDE
- biuoop-1.4.jar library (included in
libs/)
- Clone the repository:
git clone https://github.com/edanBarad/OOP_Assignment.git
- Open the project in IntelliJ IDEA
- Build the project and resolve any dependencies
Run Main.java to start the gameLevel. Use the arrow keys to control the paddle and break all the blocks!
Controls:
- ← → Arrow keys to move the paddle
- Break all blocks to win
- Don't let all balls fall off the screen!
OOP_Assignment/
├── src/
│ ├── Main.java # Entry point - run this to start the gameLevel
│ ├── Game_Setup/ # Game management and core systems
│ │ ├── Game.java # Main gameLevel class (Singleton)
│ │ ├── GameEnvironment.java # Collision detection system
│ │ ├── SpriteCollection.java # Manages all drawable objects
│ │ ├── Counter.java # Score/block/ball counters
│ │ ├── BlockRemover.java # Hit listener for blocks
│ │ ├── BallRemover.java # Hit listener for balls
│ │ ├── ScoreTrackingListener.java # Tracks score
│ │ └── ScoreIndicator.java # Displays score on screen
│ ├── Geometry/ # Game objects and geometry
│ │ ├── Ball.java # Bouncing ball with physics
│ │ ├── Block.java # Breakable blocks
│ │ ├── Paddle.java # Player-controlled paddle
│ │ ├── Point.java # 2D point
│ │ ├── Line.java # Line with intersection logic
│ │ ├── Rectangle.java # Rectangle collision shape
│ │ ├── Velocity.java # Movement vector
│ │ ├── CollisionInfo.java # Collision data
│ │ ├── Colors.java # Color enumeration
│ │ └── GeometryTester.java # Unit tests for geometry classes
│ └── Interfaces/ # Core interfaces
│ ├── Sprite.java # Drawable gameLevel objects
│ ├── Collidable.java # Objects that can collide
│ ├── HitListener.java # Observer pattern for hits
│ └── HitNotifier.java # Notifies listeners of hits
├── libs/ # External libraries (biuoop GUI)
└── .idea/ # IntelliJ IDEA configuration
- Physics-based ball movement with accurate collision detection
- Event-driven architecture using the Observer pattern (HitListener)
- Smart paddle mechanics with 5-region hit zones for ball angle control
- Score tracking system with visual indicator
- Win/Lose conditions based on blocks cleared and balls remaining
- Singleton Game class for centralized gameLevel state management
- Singleton: Game class for single instance management
- Observer: HitListener/HitNotifier for event handling
- Collection Management: SpriteCollection and GameEnvironment for organized object handling
Note: This project is a work in progress. Additional features and components will be added in future updates.
This project is an academic assignment.
Edan Barad
- GitHub: @edanBarad