#About This Project

This game was created as part of a Design Patterns course assignment, focusing on building a system for managing warrior training and combat in the Dragon Ball universe. The goal of the project was to implement core object-oriented design patterns to handle complex game mechanics in a scalable and maintainable way.

#Key Features

  1. Warrior Training and Combat Management: Players can train characters, improve their stats, and unlock powerful transformations like Super Saiyan or Fusion through combat progression.

  2. Unique Abilities and Items: Each character has unique abilities (e.g., Kamehameha, Final Flash) and can acquire special items like Senzu Beans for healing or Dragon Balls to make powerful wishes.

  3. Dynamic Character States: Characters evolve through different states such as Normal, Injured, or Super Saiyan, affecting their performance during battle.

  4. Tournament Mode: Warriors can participate in tournaments and test their skills against opponents to gain experience and unlock new abilities or transformations.

#Design Patterns Used

  • Singleton: Centralized the management of game elements like characters, tournaments, techniques, and items to ensure only one instance of these managers exists.

  • Factory: Responsible for creating different types of warriors (e.g., Saiyans, Namekians, Androids), each with their unique techniques and transformations.

  • Builder: Enabled the customization of characters by allowing players to choose abilities, transformations, and special items.

  • State: Managed various states of the characters during combat, such as Normal, Super Saiyan, or Super Sayan God, where each state affects abilities and performance.

  • Observer: Used to notify the game of key events, such as when a character transforms or successfully lands a special attack during combat.

  • Decorator: Applied dynamically to enhance characters with transformations or special items during the game (e.g., using a Senzu Bean to recover health).

#Why Gosu and Ruby?

I chose to develop this game using Gosu and Ruby because Gosu is a lightweight, 2D game development library that is both simple and efficient for creating graphical applications. With Ruby’s easy-to-read syntax and Gosu’s built-in support for graphics, input handling, and sound, it allowed for rapid prototyping and implementation of core game mechanics.

Additionally, Gosu integrates seamlessly with Ruby, enabling fast iteration and making it a perfect fit for this project, where quick experimentation with different game features was crucial.

#Why Design Patterns?

Using these design patterns ensured that the system was both modular and extensible. Each pattern was selected to address specific challenges in managing characters, their abilities, and their transformations, making the system easier to maintain and expand with new features in the future.

#Final Deliverables

This project includes:

  • A complete system managing character creation, training, combat, and progression.
  • A demonstration of how design patterns enhance the flexibility and scalability of game development.
  • Modular code that supports future extensions like new characters, techniques, and tournaments.