This short RPG was inspired by my love of listening to true crime shows and knack for catastrophising every-day life. The dangers of jogging are brought to life in this fun little game where the choices the player makes during the game decide how the game ends.
The purpose of this game is just to entertain the user. It is aimed at teens to adults who are not particularily fond of jogging and running.
- A user of this site would want:
- to be able to initiate the game easily.
- to be able to read the storyline easily.
- to enjoy playing a simple, humorous game.
- to see how different answers impact the outcome of the game.
- to be able to interact with the game easily.
- As the creator of this game, I want to:
- provide a simple game for the user.
- have the user enjoy it.
- give the user a simple to read rpg.
The purpose of this project is to create a game using Python to be deployed using Heroku.
I created a flowchart to visualise the different tracks the different choices would go through as it becomes more complicated to follow as each decision builds on the one before it.
As the focus of this project was the use of Python rather than on the aesthetics using CSS or HTML I kept the design aspects to the experience of reading the code and of the storyline on the app. To do this I used newlines to space out the lines on the terminal and the sleep module of the time function to add small delays in between the printed strings.
This slowed down the app to make it easier for the user to follow and broke up the blocks of text, making it more comfortable to read.
- I would have liked to add some color and ascii art to the project and may do so in the future.
- If I had more time to develop the app, I would like to add more decisions to the storyline.
- I would like to add some random functioning to the storyline for a more interesting game.
- The first feature that meets the player is the introduction. The player is asked to input their name which is capitalized by the app.
- The player greeting includes the player's previously inputted name and asks them if they want to go on. If they choose not to, the game over message is shown. If they choose to continue, the storyline brings them onto the next decision they need to make.
- Choice 1 asks if they are ready to go and Choice 2 asks which direction they want to go. Each answer brings up a storyline and another choice to make.
- Choice 3 will depend on the previous answers the player gave.
- Depending on the choices the player made, they may get the game over message if the made the wrong decisions. They will then be asked if they wish to play again or to end the game.
- If the player makes it home safe they will see the 'you survived!' message. They will also be asked if they want to play again.
- Python
- GitHub
- Heroku
- Python Tutor
- app.diagrams.net to make flowcharts
- GitPod
I tested the app on Chrome, Microsoft Edge, FireFox browsers and it worked well on all these. I couldn't test on iPhone or Safari but was advised it wouldn't work on those. It did work ok on my Samsung Galaxy Note 8.
Feature | Test | Check For | Outcome |
---|---|---|---|
Name Input | input name, not blank | input | Pass |
Ready to Go | Input yes or no only | valid input | Pass |
Choice1 | choose left/right | valid input | Pass |
Choice2 | input from list | valid input | Pass |
Choice3 | input from list | valid input | Pass |
Play Again | input play,restart | restart | Pass |
Play Again | input quit, sys.exit() | goodbye | Pass |
As advised by tutors due to pep8 no longer working, I validated using a linter in gitPod workspace called pycodestyle. It showed no warnings or problems at all as in screenshot below.
This project was created on GitPod, then pushed to GitHub where it was connected to Heroku.
Everytime the project was pushed to GitHub, Heroku automatically deployed the updated version as the automatic box was ticked as opposed to the box for manual update.
- Once logged into your GitHub account, choose the repository you wish to deploy. The repo for this project can be accessed here.
- Log in to Heroku and choose to create a new app.
- Name app, choose region and click the 'create app' button.
- Add Python Buildpack, then Node.js Buildpack.
- Connect to GitHub in the Deployment Method section. Search the repo name to be deployed and click on 'connect' when it shows as chosen on the screen.
- Select to update deployment automatically if you with Heroku to update each time you push to GitHub.
- Choose the main branch, or master if main isn't there and deploy.
If you need instructions to fork or clone the repo please see the following links:
Sites I used for general Python knowledge while working on this project:
- https://realpython.com/
- https://learn.codeinstitute.net/
- https://www.w3schools.com/python
- https://app.slack.com/
- https://docs.python.org/
- https://stackoverflow.com/
- https://www.geeksforgeeks.org/
- https://www.markdownguide.org/
- https://docs.github.com/en/repositories