An object oriented program based GUI which implements the color switch game.
This project has been implemented using javaFX library. Some frequently used JavaFx components are Animation Timer, Shapes, Transitions & Color. The OOP’s involved are inheritance, polymorphism, encapsulation & abstraction.
The project implements several design patterns such as:
- Iterator Pattern : Collision Detection
- Factory Pattern : Dynamic Entity Creation
- Strategy Pattern : Obstacle Transition
- Facade Pattern : Dotted Obstacles in UniquePatte
- Menus
- Main Menu
- New Game Menu
- Pause Menu
- Resurrect Menu
- Game Over Menu
- Instructions Menu
- Obstacle Implementation
- Circle
- Multi-Circle
- Plus Obstacle
- Square
- Triangle
- Horizontal Line Obstacle
- Dotted Obstacle ( 4 shapes )
- Core Functionalities
- Player Class Setup
- Jump Ball Mechanism
- Color Change Mechanism
- Star Collection Mechanism
- Position Class Setup
- Dynamic Collision Mechanism
- Dynamic Screen Shift Mechanism
- Dynamic Obstacle Creation
- Save/Load Game Mechanism
Some problems faced were:
- Serialization/Deserialization of JavaFx Components
- Object Collision for few shapes ( e.g. Circle )
- Implementation of Gravity Effect
- Serializing primitive values for obstacle position & orientation.
- Dividing shapes into smaller components ( such as arc for Circle)
- Using animation timer for smooth animations.
- Supersonic Speed
This feature gives the ball a supersonic boost for a certain amount of time. - Force Field
This feature activates a shield for 10 seconds to avoid collision from incoming obstacles. - Sound Effects and Background Music
The addition of sound effects on various actions such as button press,star collection, bonus mode and background music according to the game mode (normal,supersonic and forcefield).




