Wonderland Quest is a text based adventure game based in a mythical place. The intention of the game is to make your way through the magical land, following prompts to find Wonderland. Venture foward if you dare.
-
Free user inputs to control directionality of play
-
Places
-
Kill Sequence
-
Input validation
- Extended routes
- Allow for a greater scope of story by building out the places dictionary to include more stops & locations
- Inventory system
- Introduce inventory items that the player can collect to aide their Quest.
- Add problem-solving to journey
- Ask players to solve riddles/clues that will help them move to special places in the journey.
- Expand on character variables
- Build further functions to include character health, weather, inventory feedback etc
- Python used as the back-end programming language.
- Git used for version control. (
git add
,git commit
,git push
) - GitHub used for secure online code storage.
- Gitpod used as a cloud-based IDE for development.
- Markdown Builder by Tim Nelson used to help generate the Markdown files.
- Heroku used for hosting the deployed back-end site.
To follow best practice, a flowchart was created for the app's logic, and mapped out before coding began using a free version of Lucidchart
The primary functions used on this application are:
clear()
- Clears console.
greeting()
- Displays greeting message
arrive_at_place()
- Loops through current location and asks for user in put for next directions.
validate_name()
- Verifies that only acceptable characters have been submitted.
I've used the following Python packages and/or external imported packages.
os
: used for adding aclear()
function.colorama
: used for including color in the terminal.pyfiglet
: used for Wonderland ascii art on main game page.
For all testing, please refer to the TESTING.md file.
Code Institute has provided a template to display the terminal view of this backend application in a modern web browser. This is to improve the accessibility of the project to others.
The live deployed application can be found deployed on Heroku.
This project uses Heroku, a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud.
Deployment steps are as follows, after account setup:
- Select New in the top-right corner of your Heroku Dashboard, and select Create new app from the dropdown menu.
- Your app name must be unique, and then choose a region closest to you (EU or USA), and finally, select Create App.
- From the new app Settings, click Reveal Config Vars, and set the value of KEY to
PORT
, and the value to8000
then select add. - If using any confidential credentials, such as CREDS.JSON, then these should be pasted in the Config Variables as well.
- Further down, to support dependencies, select Add Buildpack.
- The order of the buildpacks is important, select
Python
first, thenNode.js
second. (if they are not in this order, you can drag them to rearrange them)
Heroku needs two additional files in order to deploy properly.
- requirements.txt
- Procfile
You can install this project's requirements (where applicable) using:
pip3 install -r requirements.txt
If you have your own packages that have been installed, then the requirements file needs updated using:
pip3 freeze --local > requirements.txt
The Procfile can be created with the following command:
echo web: node index.js > Procfile
For Heroku deployment, follow these steps to connect your own GitHub repository to the newly created app:
Either:
- Select Automatic Deployment from the Heroku app.
Or:
- In the Terminal/CLI, connect to Heroku using this command:
heroku login -i
- Set the remote for Heroku:
heroku git:remote -a app_name
(replace app_name with your app name) - After performing the standard Git
add
,commit
, andpush
to GitHub, you can now type:git push heroku main
The frontend terminal should now be connected and deployed to Heroku!
This project can be cloned or forked in order to make a local copy on your own system.
For either method, you will need to install any applicable packages found within the requirements.txt file.
pip3 install -r requirements.txt
.
If using any confidential credentials, such as CREDS.json
or env.py
data, these will need to be manually added to your own newly created project as well.
You can clone the repository by following these steps:
- Go to the GitHub repository
- Locate the Code button above the list of files and click it
- Select if you prefer to clone using HTTPS, SSH, or GitHub CLI and click the copy button to copy the URL to your clipboard
- Open Git Bash or Terminal
- Change the current working directory to the one where you want the cloned directory
- In your IDE Terminal, type the following command to clone my repository:
git clone https://github.com/Dmp-86/wonderland.git
- Press Enter to create your local clone.
Alternatively, if using Gitpod, you can click below to create your own workspace using this repository.
Please note that in order to directly open the project in Gitpod, you need to have the browser extension installed. A tutorial on how to do that can be found here.
By forking the GitHub Repository, we make a copy of the original repository on our GitHub account to view and/or make changes without affecting the original owner's repository. You can fork this repository by using the following steps:
- Log in to GitHub and locate the GitHub Repository
- At the top of the Repository (not top of page) just above the "Settings" Button on the menu, locate the "Fork" Button.
- Once clicked, you should now have a copy of the original repository in your own GitHub account!
At the time of writing, there will be no difference between the local and the deployed version on Heroku.
Source | Location | Notes |
---|---|---|
Markdown Builder by Tim Nelson | README and TESTING | tool to help generate the Markdown files |
PyPi | Colorama tutorial | How to apply Colorama |
W3 Schools | Lambda Tutorial | For Lambda function |
YouTube | PP3 terminal | tutorial for adding color to the Python terminal |
No external media sources used.
Use this space to provide attribution to any supports that helped, encouraged, or supported you throughout the development stages of this project. A few examples have been provided below to give you some ideas.
- I would like to thank my Code Institute mentor, Tim Nelson For his support through this project.
- I would like to thank the Code Institute tutor team for their assistance with troubleshooting and debugging some project issues.
- I would like to thank the Code Institute Slack community for the moral support; it kept me going during periods of self doubt and imposter syndrome.