Welcome to the Stick Hero Game, where you step into the shoes of a skilled ninja and test your agility, timing, and strategic thinking as you navigate a dynamically generated world.
- Prerequisites
- Installation
- How to Play
- Game Controls
- Features
- Game Rules
- Design Patterns
- Testing
- Multithreading
- License
- Authors
To run the Stick Hero Game, you need the following:
- Java Development Kit (JDK) installed on your machine.
- JavaFX library (included in JavaFX SDK or can be added as a separate library).
- Clonethe Stick Hero Game repository to your local machine.
git clone https://github.com/Vikranth3140/StickHero.git
- Ensure that you have the required Java Development Kit (JDK) installed.
- Open the project in your preferred Java Integrated Development Environment (IDE).
- Set up the JavaFX library in your IDE (if not included).
- Run the
HelloController
class to start the game.
- Launch the game by running the application.
- Use the
SPACEBAR
to extend the stick. - Release the
SPACEBAR
to drop the stick. - Press the
SPACEBAR
to move the character upside down. - Collect cherries to increase your score and use them as currency for self-revival.
- Cross the gap between platforms by extending the stick.
- Avoid obstacles and aim for the highest score.
- Stick Extension:
SPACEBAR
- Ninja Flip: Use
SPACEBAR
while moving - Revive Ninja: Spend 10 cherries after defeat
- Stick Extension: Press the
SPACEBAR
key to extend your stick and bridge the gaps between platforms. Timing is crucial! - Ninja Flip: Use
SPACEBAR
while moving to execute a nimble flip, avoiding deadly shurikens and adding a stylish touch to your traversal. - Cherry Collection: Collect cherries to increase your score and accumulate currency for self-revival.
- Self-Revival: After facing defeat, revive your ninja by spending 10 cherries.
- Dynamic Stick Extension: Controlled by the player.
- Character Movement and Obstacle Avoidance: Adds challenge and excitement.
- Obstacle Generation: With random widths and gaps for unpredictability.
- Real-Time Scoring System: Keep track of your progress.
- Character Upside-Down Movement: For added difficulty.
- The player must extend the stick to cross the gap between platforms.
- The stick must be long enough to reach the next platform.
- If the character falls down, press the
SPACEBAR
to go to the end. - Colliding with obstacles ends the game.
- Collecting cherries increases the player's score.
- The character can move upside down for added challenge.
- Singleton Pattern: Implemented in the Block class to ensure a single instance, optimizing resource usage and promoting consistent behavior.
- Flyweight Pattern: Utilized in the Audio class for efficient management of audio resources, enhancing overall performance.
- JUnit Test: A comprehensive JUnit test validates the functionality of the score loading feature, ensuring robust performance.
- Dynamic Movement: Employing multithreading in the GameController class, two threads work concurrently. One thread moves objects backward, enhancing the game's dynamism. The other thread manages the revival process.
This project is licensed under the MIT License.