- Purpose
- User Experience Design
- Story Map and Flow Chart
- Features
- Technologies
- Testing
- Deployment
- Credits
This website was created to complete the third Milestone Project for Code Insitute's Full Stack Software Developer course. I built this from the ground up using knowledge I gained from the previous modules. These being Python and User Centric Design. The full list of technologies used can be found in the technologies section further down.
Users of this website are able to play a short story with multiple branching paths leading to either a win or a loss.
You can find the link to the live website right here. Please note: To open any links in this document in a new browser tab, please press CTRL + Click.
- As a First Time user, I want to easily understand the main purpose of the site.
- As a First Time user, I want a simple but effective way of making my choices while playing the game.
- As a First Time user, I want to know when my inputs are not incorrect and have another attempt.
- As a Frequent user, I want to clearly see how my choices are impacting the outcome of the game.
- As a Returning user, I want to be able to play again to try for a different outcome.
Due to this project being a simple terminal based application there was not a lot that I could do regarding the styling. I did however come across Colorama which allowed me to add some colors to parts of the text. These being Cyan, Red & Green.
I highly recommend inspecting this Google Doc to see the thought process behind creating this project. Below you will find the flow chart I created to aid in development of this application. I wrote a total of 20 text files, one for each node on the diagram.
-
- This section is the first thing the user is greeted with when opening the application.
- It clearly states the main story of the game.
- The purpose of this is to fulfill the user story:
As a First Time user, I want to easily understand the main purpose of the site.
-
- This section is where the user will be making their decisions.
- The section will only accept either Y or N as an input.
- Another example of this can be found further into the game.
- This section will only accept either 1, 2 or 3 as an input.
- The purpose of this is to fulfill the user story:
As a First Time user, I want a simple but effective way of making my choices while playing the game.
-
- This section informs the user that they have used the incorrect input.
- When this happens the function they made the incorrect input on is started again, letting the user have another attempt.
- The purpose of this is to fulfill the user story:
As a First Time user, I want to know when my inputs are not incorrect and have another chance.
-
- This section makes it evident to the user the outcome of the game.
- In this instance the user has won and "You Win!" is printed to the terminal in ASCII art format.
- This section makes it evident to the user the outcome of the game.
- In this instance the user has lost and "You Lose!" is printed to the terminal in ASCII art format.
- The purpose of this is to fulfill the user story:
As a Frequent user, I want to clearly see how my choices are impacting the outcome of the game.
-
- This section gives the user the option to have another attempt if they are not happy with the outcome. Or to just experience the other paths.
- The purpose of this is to fulfill the user story:
As a Returning user, I want to be able to play again to try for a different outcome.
- Python
- This project uses Python as the main language that was used to complete the website.
- GitHub
- GitHub is the hosting site I used to store the code for the website.
- Google Docs
- Google Docs was used to write the story.
- Heroku
- Heroku is the site used to deploy the project.
- GitPod
- GitPod is the Integrated Development Environment used to develop the website in a browser.
- Stack Overflow
- Stack Overflow was one of the websites used for resolving issues with code.
- W3 Schools
- W3 Schools was one of the websites used for resolving issues with code.
- PEP8 Validator
- This was used to check the Python code.
- Patorkj
- This was used to convert text to ASCII art for the title, win and lose screen.
- 13 errors that were all Code E501 line too long. I checked each of these and all would break funcionality if the lines are shortened. All efforts were made on my part to reduce the number of these errors.
-
Javascript Validator passed with no errors and 1 warning (written by Code Institute).
-
HTML Validator passed with no errors or warnings (written by Code Institute).
-
CSS Validator passed with no errors or warnings (written by Code Institute except where marked)
- I have had an issue whenever opening a new workspace where I would have to import Colorama everytime. This is a small issue and I just resolve this by using "pip install colorama" in the terminal.
This project was deployed using Code Institute's mock terminal for Heroku. Usually these steps would work for deploying to Heroku:
- Fork or clone this repository
- Create a new Heroku app
- Set the buildpacks to Python and NodeJS in that order
- Link the Heroku app to the repository
- Click on Deploy
Github announced that a number of user login tokens for Heroku had been compromised in a security attack. In response, Heroku have removed this particular login functionality from their site. It is currently unclear when or if they well re-enable it. This means that you will no longer be able to deploy apps from the Heroku dashboard, nor will apps automatically update/redeploy in future. All future deployments will have to be done manually from the terminal. The process is as follows:
IF YOU ARE CREATING A NEW DEPLOYMENT/APP Run the command heroku login -i and login when prompted. Then run the command heroku create your_app_name_here to create a new app, replacing your_app_name_here with the name you want to give your app. This will create a new Heroku app and link it to your Gitpod terminal. You can then access the app via the Heroku dashboard and set up your config vars.
IF YOU ALREADY HAVE AN APP CREATED WHICH USES AUTOMATIC DEPLOYS Run the command heroku login -i and login when prompted. Then run the following command: heroku git:remote -a your_app_name_here and replace your_app_name_here with the name of your Heroku app. This will link the app to your Gitpod terminal.
HOW TO DEPLOY After linking your app to your workspace with one of the above steps, you can then deploy new versions of the app by running the command git push heroku main and your app will be deployed to Heroku.
I'd like to thank my friend Des Hogan for the inspiration behind the story. I'd also like to thank Rob Fairclough and my mentor Ronan McClelland for their help and support throughout this project. The Code Institute Python Template was used as a base for this project and made into my own.