The rendering engine, some starter code as well as the random numbers generator were provided by Berkeley team (see the starte code at: https://github.com/Berkeley-CS61B/skeleton-sp19/tree/master/proj3/byow). However, I wrote all the code for world generation and the interaction between the player and the environment.
- Clone the whole repository.
- Compile the game using
javac byow/Core/Main.java
. On Windows, you might need to usejavac -encoding UTF-8 byow/Core/Main.java
. - Run the game using
java byow.Core.Main
- Enjoy the game :)
The following options are available:
- Press 'N' or 'n' to start a new game.
- Press 'L' or 'l' to load a saved game.
- Press 'Q' or 'q' to quit the game.
After selecting a new game, another window will be displayed, asking the user to enter a seed. The seed is a positive number up to 9,223,372,036,854,775,807 and is used by the random generator to generate a unique game world. That means that if you enter the same seed, the identical world be generated.
Once the seed is entered, press 'S' or 's' to generate the world. Only the player avatar (@) and its surroundings are visible, while the rest of the map is covered by a fog of war. Also, a status bar is diplayed on the top of the window, displaying the level number, identification of tile over which a mouse cursor is hovering, player's health and its inventory.
The world looks something like this - it consists of uniquely generated rooms and corridors connecting them together. Various items are randomly generated around the map.
The following items can be found in the world:There are 9,223,372,036,854,775,807 unique levels available, so each player should have some fun for a while.
- 'W', 'A', 'S', 'D' – Movement of player around the world
- 'Q' – Quit the game. The game is saved and can be loaded from the main menu.
- Map might not be displayed properly on some combinations of screen resolutions and DPI.
- A minor bug appears when the ghost navigates through rooms of certain shape.
- Unicode symbols of some game items might not display properly on some systems.
- Improve the fog of war, so that it shows only the room in which the player is located.
- Introduce additional game items and mechanics.
- Replace Unicode symbols for game items with icons.