Skip to content

Repository for a R/Python rouguelike/text-based adventure game.

License

Notifications You must be signed in to change notification settings

donishadsmith/Castle-Descent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Castle Descent

This repository for a R/Python Unicode text-based/rouguelike game that I created. This project is ongoing and new features and refinements will be made in the future.

The objective is to descend to the bottom of a randomly generated castle (represented as a 3D Array) while avoiding a zombie. To do so, you need to interact with the doors and defeat all monsters on the floor to reveal the door to the next level/exit. These doors may contain monsters, genies (which increase your attack or reduce the cost of mana for your enhanced attack, or faries (which heals you). Deafeating monsters earns you money and random item drops. Money can be used to purchase items, which may assist you through the game, from the merchant.

Technologies Used

RStudio Community: RStudio IDE Python 3.10

Requirements

Python:

The Python version only works on Windows PCs since it relies on the msvcrt module, which is only available on windows, to flush player inputs. Additionally, the numpy module is needed to run this game.

RStudio:

Only RStudio and the rstudioapi package (for player input) is needed to run this game.

Starting Game

Python:

While in the same folder containing start_game.py in your Terminal, run:

python3.10 start_game.py

RStudio:

Open start_game.R in RStudio and run the file. Ensure that your current working directory is set to the same directory where start_game.R is located.

To do this:

  1. Ensure that start_game.R is open in the source editor (top left). Screenshot (6)

  2. Go to: Session -> Set Working Directory -> To Source File Location (or To File Pane Location if the directory containing start_game.R is in the File Pane (bottom right). Screenshot (7)

  3. Highlight:

source("game_scripts/create_environment.R")
  1. Click Run.

Gameplay

As mentioned previously, the player's objective is to descent the castle while battling the monsters and avoiding the zombie. The entire game uses Unicode and arrays for visualization.

Player's can navigate throughout the grid using the w a s d keys. The array is wrapped so that going out of bounds make the player reappear on the opposite side of the grid. If the doors are empty, player's can move through the empty doors. While the player is restricted to four movements (up,down,left,right) the zombie can move in eight directions (up,down,left,right,diagonally). However, unlike the player, the zombie cannot move outside the grid to reappear at the opposite side nor can it move through the empty doors.

Additionally, player's stats such as their current health, mana, and money are displayed at the bottom of the array.

Screenshot 2023-03-29 131315

Player's have access to a merchant shop

Screenshot 2023-03-29 131338

And the ability to fight monsters for money and items

Screenshot 2023-03-29 132157

And the ability to encounter genies for increased attack points

Screenshot 2023-03-29 132320

About

Repository for a R/Python rouguelike/text-based adventure game.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published