Dungeon Crawler Game, Part 1
Design Due: October 17
Program Due: October 29
To work on the design and implementation of large, collaborative
For this assignment, you will be working on developing a simple
command-line game. The game will be in the Roguelike genre.
A "Roguelike" game is one patterned after the 1980 game "Rogue". These
games were the pre-cursors to graphical role-playing games which many of you
have played. These games are also sometimes called "dungeon crawlers" because
they often take place in underground labyrinths. Probably the most
widely played game in this genre is "NetHack" which is still actively
developed and played.
You should incorporate the Item and Inventory system that you worked on for
project 1, but will be developing a playable game around it.
The game must incorporate the following elements:
- When the game starts, you should print a message explaining the setting and
(briefly) the plot. You should then ask the player what their character name
is. To add color, you can ask for the character's class or other information.
- Next you should print the commands the game accepts. The following points
discuss commands the game needs, but you get to decide what keys to use.
There should be one command that prints this commands message again (so the
player can review the controls when they forget).
- You should then show the room/dungeon/place that the player is in. For
now, there only needs to be one "screen" of location. (So there doesn't need
to be multiple areas). You should print the room to the screen in ASCII
characters. You should also indicate the player's location in this space.
- The player must be able to move about the area they find themselves in.
I would suggest printing the room and then waiting for a command from the
user. Some of the commands should control movement. You can use WASD
for this purpose (or Vim's HJKL if you want to be geeky). The player
should not be able to move through walls.
- The player should start with some items in their inventory, and you
get to decide what they start with. They should be able to equip a
weapon and armor.
- There should be some random items around the room. You should indicate an
item is in the room with a symbol (you can choose it). If the user is standing
on an item, they should be able to see what it is (you can print this out), and
be able to pick it up. An item they pick up should go in their inventory.
- There should be at least two different enemies of some kind in the game.
These enemies should move around the room. You can make them move randomly, in
a fixed pattern or,if you want, towards the player. The enemies should have a
health stat and a damage stat.
- If the player navigates into an enemy (for example, if the enemy is north
of them, and they choose the north command), then they fight. The players
damage (which is the strength of their weapon) should be subtracted from the
enemy's health. The enemy's damage, minus the strength of the player's armor,
should be subtracted from the player's health. You can also add some element
of randomness to this as well.
- You should print messages for each "round" of these battles. For example,
"The goblin bit you for 3 damage. You attack the goblin for 5 damage". You
also should print the player's health status.
- When the player dies, the game is over. Permanent death is traditionally
a feature of Roguelike games. If you want to give the player another chance
instead, that's OK too.
- When an enemy dies, they should be removed, and you should print a message
saying that the enemy was defeated. For example, "You have defeated the goblin!"
When all of the enemies have been defeated, the game is over and you should print
a winning message.
In these games, you usually don't have to press [Enter] to control your
character. For instance, in NetHack, if you press 'h', the character moves
left right away. This is not easily possible with Java, so we won't worry
about this for now. You can just make the player press [Enter] for each
It's also not easily possible to go back and write a character over top of
something that has been printed already. That means you can't print the whole
room, and then go add the player, enemies, and items over top of it. Instead,
the code that prints the room has to know where all these things are so it can
print them as it is going.
In many games like this, the rooms are randomly created, and the enemies are
randomly placed. For this assignment, you can just "hardcode" these into the
You can theme your game however you like. It doesn't have to be a traditional
dungeon with monsters kind of thing. Be as creative as you like!
For this project, you should turn in a class diagram first, and then the
full project later. The design should include all of the classes, with their
methods, and the relationships between them, as discussed in class and the
Of course you may have to make changes to the design as you work on the project,
but this is to make sure you think through all of the things that will be needed
before diving in.
This will be a team project, and I will assign the teams. They are:
- Toby, Christopher, Tyler
- Jonathan, Zachary, Benedict
- Paige, Arsalan, Suad
- Tavion, Grace, Lauren P.
- Sally, Justin, Gwen
- Lucas, Jema, Ethan, Lauren W.
When writing your program, also be sure to:
- Put each class/enum in its own file.
- Your code should include comments — at least one
for each class explaining its purpose, and one for each method
explaining what its job is.
- All member variables should be private.
- Your code should be consistently indented.
To submit your program, email the program file to firstname.lastname@example.org.
Copyright © 2019 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.