Skip to content

Ayush-0801/Color_Swtich_Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Color_Swtich_Game

An object oriented program based GUI which implements the color switch game.

Implementation

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.

Design Patterns

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

Features

  • 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

Problems Faced

Some problems faced were:

  1. Serialization/Deserialization of JavaFx Components
  2. Object Collision for few shapes ( e.g. Circle )
  3. Implementation of Gravity Effect

Solutions

  1. Serializing primitive values for obstacle position & orientation.
  2. Dividing shapes into smaller components ( such as arc for Circle)
  3. Using animation timer for smooth animations.

Bonus Components

  1. Supersonic Speed
    This feature gives the ball a supersonic boost for a certain amount of time.
  2. Force Field
    This feature activates a shield for 10 seconds to avoid collision from incoming obstacles.
  3. 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).

Gameplay Screenshots

alt text

alt text

alt text

alt text

alt text

About

An object oriented program based GUI which implements the color switch game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages