Dark Dungeon

Project Design Document – Rob Torok, 27/8/15

Introduction

You wake up in dark dungeon, with no memory of who you are or how you got here. You can hear nothing but the distant rumble of thunder. Or is it a BEAST of some kind? Gulp!

On your back you are carrying a bow and a single arrow. You reach into your pockets and find a rusty old compass. There is just enough light to make out directions North, South, East, or West, but not enough light to see further than about five metres in any direction.

You can either move or shoot an arrow, it’s up to you!

Dark Dungeon is a simple text-based dungeon crawler. A dynamically generated grid-based dungeon will result in a different game every time. Find and kill the Beast before the Beast kills you! And don’t fall into the Chasm!

User Interface

See attached sketch.

Gameplay description

When the game is started (or reset), the dungeon will be reset and the player will be presented with the intro text (see Introduction above).

Each turn will consist of the player choosing to either move (N, S, E, or W) or shoot an arrow (N, S, E, or W).

If the player moves adjacent (N, S, E, or W – not diagonally) to the Beast or the Chasm, an appropriate warning will be given…

  • Adjacent to the Beast: “The rumbling sound is louder here, and the smell of rotting flesh fills your nose.”
  • Adjacent to the Chasm: “You feel a breeze against your face and hear a faint whistling sound.”

If the player attempts to move into a location containing either the Beast or the Chasm, the player dies and the game is over.

The edges of the grid wrap around. E.g. In the layout below, a move East from (1,7) will move the Player to (1,0).

To win the game, the Player must fire an arrow in the direction of the Beast, from an adjacent location.

If the player fires their (last?) arrow and misses the Beast, the game is over. (Or randomly place the arrow somewhere else in the map?)

Data structure

The dungeon layout will be represented as a 2D array of char, contained within the Dungeon class, and dynamically generated each time the game is reset.

When the dungeon is reset, the locations of the Beast (B), the Chasm (C), and the Player are reset, and will always start in unique location. E.g. the Player will never start in the same location as the Beast!

For example, here is a sample 8x5 dungeon layout…

b / B / b
P / b
c
c / C / c
c / b

Legend

  • P – Player
  • C – Chasm
  • B – Beast
  • Note: Spaces adjacent to the Beast and Chasm will not stored in the data structure explicitly, but determined dynamically when the Player moves

A debug mode/option will print the dungeon (to the console or the UI?)

class Dungeon
Variables
char[][]map
int arrows – number of remaining arrows
int moves – keep track of how many moves have been made
Boolean alive – is the player still alive?
Methods
Dungeon()
Dungeon(x,y) – create a dungeon of the specified dimensions
void reset() – empty the map and repopulate it
String getDescription() – provide
boolean? move(char direction)
boolean? shoot(char direction)
int getMoves()

Assets

Sound

  • General cave noises?
  • Adjacent to Beast
  • Adjacent to Chasm
  • Game over (Beast)
  • Game over (Chasm)
  • Game over (Out of arrows)

Text

  • Introduction – see above
  • General locations (i.e. not adjacent to anything interesting) – perhaps a random selection…
  • “You’re in a cave.”
  • “You’re in a dark cave.”
  • “You’re in another part of the cave.”
  • “You’re in a particularly dark cave.”
  • “Guess what? You’re in a cave. Great.”
  • [How random? “Randomly” generated on the fly, or fixed per game?]
  • Adjacent to Beast
  • Adjacent to Chasm
  • Game over (Beast)
  • Game over (Chasm)

Timeline/Gantt chart/Milestones

Populate the map and display it to the console (debug mode)

Test for adjacent to chasm/beast

Additional features

  • Difficulty levels
  • Variable number of arrows, Beasts, and/or Chasms
  • Score – based on number of turns?
  • Work out what to do when the arrow is fired in the wrong direction...
  • End game when out of arrows?
  • OR…. Randomly place the arrow somewhere else in the map