Skip to content

maaslalani/Dungeon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Dungeon

A text-based adventure game, coded entirely in Java.

Premise:

You are trapped in a dungeon and there is no way out. Enemies are spawning one after the other. It is your goal is to kill as many as you can, without dying yourself.

Gameplay:

Throughout the game you are given a certain number of options. Type the corresponding number as your choice to select that option. The following is a brief description of what each of the options accomplish.

1. Attack: You deal a random amount of damage to the enemy, as it also deals damage to you. 2. Use Potion: Drink a potion that restores your health by a certain amount. 3. Run Away: Flee from the enemy and spawn a new enemy. 4. Store: Visit the store to buy new equipment for your journey. 5. Exit: Quit the game with or without saving your progress.

Usage:

$ git clone https://github.com/Maaslalaniii/Dungeon.git
$ cd Dungeon
$ javac @sources.txt
$ java src/TheDungeon

The game will start after those commands are run.

List of commands in sequential order.

For a better playing experience use the BlueJ IDE and run the main method found in TheDungeon class.

BlueJ Running the main method.

Update sources.txt

If you add any new files, re-generate sources.txt by running the following command:

On Linux/macOS:

$ find . -type f -name "*.java" > sources.txt

On Windows:

> dir /s /B *.java > sources.txt

Features:

  • Enemies drop swords, armour, and health potions upon defeat.
  • Swords and armour come in different varieties.
  • Ability to load and save state of the game.
  • Gold coins as currency.
  • Store to purchase various game items.

Todo:

  • Add currency such as gold coins.
  • Add a store to purchase swords and armour.
  • Penalty for running away.
  • Add more names to the enemy list.
  • Give enemies special abilities.
  • Give player special power-ups.
  • Keep track of highest enemies killed.
  • Encrypted data.
  • Implement a graphical user interface.

Contribute:

Contributions that enhance gameplay are always welcome!

About

A text-based adventure game coded in Java.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages