Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Battle Sim Header

⚔️ Battle Sim: Console RPG Engine

A robust, object-oriented Java battle simulator featuring dynamic combat mechanics, an integrated merchant system, and a modular package architecture.

🎨 Design & Development Philosophy

This project was developed with a focus on Clean Code and Scalable Architecture. As a developer with a background in graphic design, I prioritized a clear user interface within the console environment, utilizing ANSI color coding to enhance the player experience and logical flow.

🛠️ Technical Features

  • Modular OOP Structure: Organized into distinct packages (warrior, armour, weapon, item, util) to ensure high maintainability and separation of concerns.
  • Dynamic Combat Logic: Implements damage mitigation formulas and dexterity-based dodge mechanics.
  • Merchant & Inventory System: A fully functional in-game economy where players can manage gold and utilize strategic items.
  • Cryptographically Secure Randomness: Uses java.security.SecureRandom for critical game rolls (loot, damage, and enemy AI decision-making).

📂 Project Structure

The source code follows standard Java package conventions:

BattleGame/
├── src/
│   ├── Battle.java          # Main Game Loop & Logic
│   ├── util/                # Ink, Color, and Sound utilities
│   ├── warrior/             # Warrior base class and subclasses (Human, Elf, Orc)
│   ├── armour/              # Defense logic and equipment types
│   ├── weapon/              # Offensive logic and weapon types
│   └── item/                # Consumable items and effect logic
└── README.md

🚀 Getting Started

Prerequisites

  • Java Development Kit (JDK) 11 or higher. Installation & Execution
  1. Clone the repository: git clone https://github.com/vibrant-impact/java-battle-sim.git
  2. Navigate to the source directory: cd java-battle-sim/src
  3. Compile the project: javac Battle.java
  4. Run the game: java Battle

📜 Coding Standards

  • Naming Conventions: Strictly adheres to camelCase for all variables and method names to ensure consistency across the codebase.
  • Scalability: The item and warrior systems are designed using inheritance, making it easy to add new classes or equipment without modifying core battle logic.

Created as part of my journey in Web and Mobile Development with AI.

About

A console-based RPG battle engine featuring multiple classes, items, and a merchant system.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages