4.2 KiB
4.2 KiB
⚔️ Java Knight: The Legend of Javanest
Java Knight is a text-based RPG game developed in Java.
Embark on an epic adventure through the lands of Javanest, battle dangerous enemies, collect ancient keys, and face the ultimate Dragon Boss to save the kingdom.
🌟 Core Features
- 🎭 Multiple Playable Classes (Knight, Wizard, Assassin)
- 🗺️ Location-Based Exploration System
- ⚔️ Turn-Based Combat Mechanics
- 🔑 Key Collection & Progression System
- 💾 Save / Load Ready (Java Serialization)
- 📊 RPG Systems: HP, MP, XP, Levels
- 🛡️ Weapons, Armor & Durability
- 🐉 Final Boss Battle
🛡️ Playable Classes
| Class | HP | MP | Starting Weapon | Playstyle |
|---|---|---|---|---|
| Knight | High | Low | Sword | Tank / Physical Damage |
| Wizard | Medium | High | Magic Staff | Magic & Healing |
| Assassin | Medium | Medium | Daggers | Stealth & Burst Damage |
Each class has unique abilities, different mana costs, and a distinct combat style.
🗺️ World Map
Explore the dangerous regions of Javanest:
-
Forest (Difficulty 1)
A dark forest full of Goblins. -
Graveyard (Difficulty 2)
An abandoned graveyard haunted by Skeletons. -
Vampire Crypt (Difficulty 3)
A cursed crypt ruled by Vampires. -
Dragon Castle (Difficulty 4)
The final destination and home of the Dragon.
Locations are connected, allowing the player to move freely between unlocked areas.
🎮 Game Flow
- Start the game
- Enter your player name
- Choose a class
- Begin in the Forest
- Fight enemies and gain XP
- Collect special keys
- Unlock the Dragon Castle
- Defeat the Dragon and save Javanest
🧭 Main Menu
At launch, the player is presented with the main menu:
===============================
⚔ JAVA KNIGHT ⚔
===============================
1. Start Game
2. How To Play
3. Exit
Menu Options
Start Game – Begin a new adventure
How To Play – Learn the rules and objective
Exit – Close the game
🏰 In-Game Menu
While exploring a location, the player can choose:
text
1. Fight Enemy
2. Move Location
3. Enter Dragon Castle (if unlocked)
Fight Enemy – Starts a battle based on the current location
Move Location – Travel to connected locations
Enter Dragon Castle – Available only after collecting all keys
⚔️ Combat System
Combat is turn-based and class-dependent.
Available Actions
Light Attack
Heavy Attack
Defend
Heal
Special Ability
Exit Battle
Combat Rules
Attacks may consume MP
Special abilities are unique per class
Enemies attack after the player’s turn
Winning a battle grants XP
Enemies may drop keys
🔑 Key System
To unlock the final area, the player must collect:
🗝️ Goblin Key
🗝️ Skeleton Key
🗝️ Vampire Key
Each key drops from enemies in its respective location.
Once all keys are collected, the Dragon Castle becomes accessible.
📈 Progression System
HP (Health Points)
MP (Mana Points)
XP (Experience Points)
Level System
Weapon Durability
Progression rewards strategic combat and exploration.
💾 Save & Load System
The project is prepared for game saving using Java Serialization.
Serializable Components
Player
Location
Weapon
GameState
This allows the game to be saved and restored at any point.
🚀 Getting Started
Requirements
Java JDK 17 or higher
Terminal or Java IDE (IntelliJ IDEA, Eclipse, VS Code)
Run the Game
bash
javac -d out src/org/project/**/*.java
java -cp out org.project.Main
Or simply run Main.java from your IDE.
🛠️ Project Architecture
Object-Oriented Design
Clean separation of concerns
Interfaces & abstract classes
Easily extendable structure
Console-based UI with ANSI colors
🔮 Future Improvements
Inventory management menu
More weapons and consumables
Enhanced armor mechanics
Expanded world map
Graphical UI (JavaFX / Swing)
📜 License
This project is licensed under the MIT License.