Giter VIP home page Giter VIP logo

where-evil-dwells's Introduction

Where Evil Dwells: Milestone 3 Project

intro to game


Introduction

Where Evil Dwells is a Text Based Adventure for a Command Line Interface. It is utilizing the python language. The Game is a murder mystery based in a Creepy House. The Player acts as the protagonist and will drive the direction of the game. The decision making will allow the player to interact with the characters and they can experience different scenarios according to their choices. This is an original story based on the vintage horror/thriller genre with inspiration from the classic movie, 'Murder by Death'. The goal of the game is to make it to the end of the game alive and be able to claim the inheritance. The hope is that the game will offer the player an interactive and fun experience, that they can repeat and experience differently each time they play.


Visit the Where Evil Dwells Site

Visit the Where Evil Dwells Repository


Table of Contents

  1. UX Strategy
    1. Business Goals
    2. Target Customer
  2. User Stories
    1. First Time User
    2. Regular User
    3. Site Owner
  3. Layout
    1. Theme
    2. UX experience
    3. Graphics
  4. Flow Chart for Game
  5. Features
    1. Start Page
    2. Instructions
    3. Intro To Game
    4. Arrival
    5. Guest Intro
    6. Warning Letter
    7. Guest Details
    8. Random Element
    9. Different Paths
  6. Future Implementation
  7. Tools and Technology
  8. Testing
    1. Manual Testing
    2. User Story Testing
    3. General Testing
    4. Validation
  9. Bugs and Issues
    1. Resolved
    2. Unresolved
  10. Deployment
    1. Make Local Clone
    2. Forking
    3. Student Template
    4. Deploying to Heroku
  11. Credits
  12. Acknowledgements

UX Strategy


The Business Goals of the Website:

  • No commercial goals, but the site's goal is to to provide an interactive 'Choose your Own Adventure'.


The Target Customer:

  • The audience of the site could encompass a number of age groups and there would generally not be any limitation on who could not play.

  • Would probably require some access to digital technology(not mobile).

  • May be useful for a user who has spare time and enjoys using decision making to solve a mystery.

  • Someone who likes interaction in their gaming.




User Stories


As a first time user to this site, I want to …..

  • Understand how the Game Works.

  • Play the Game.

  • If I want to restart a Game, I want to be able to do this easily.


As a regular user of the site, I want to …...

  • I want to try the various scenarios to navigate through the game.

  • I want to avail of all the options to have different experiences.

  • I want more complexity and a greater range of scenarios within the game.


As the site owner, I want to …..

  • Build more complexity in the game, so it is more challenging to the user.

  • Add more scenarios to give the user a wider range of experiences.

  • Offer a wider range of settings within the game.

  • In the present game, the killer is picked at random, so clues would be unhelpful, but in future games, clues and red herrings could be added to create more of an investigative experience, where the killer can be identified by the player.

  • Provide the user with more decision making opportunities.



Layout


Theme

The site encompasses the html index page and the terminal screen. I wanted to have a background image that resonates with the theme of the game. I simply applied a background image of a creepy house. In regards to the interface i added aasci art images to supplement the settings depicted in the text. The background colours were used to make certain elements stand out i.e. the letter. Colour was applied to prompts, to make them stand out from the rest of the text flow. Colour was also used when the player dies in the game(red) as it is synonymous with danger.


UX Experience

  • The player is given a backstory on what they need to do in the game.
  • The player can choose to see the instructions for the game.
  • The player is prompted when a decision needs to be made.
  • The prompts are designed to stand out from the rest of the text.
  • Validation allows the Player multiple attempts of getting inputs right.
  • Player is allowed to see more information on guests before deciding on a buddy.

Graphics


Horror fonts


ABOUT BLOODY CAMP TRIAL FONT:

Bloody Camp is a horror blood font, which creates a horror tone and felt it supplemented the horror theme of the game. I tried to accentuate the horror mode by selecting a nice rich font that is a true type font, and I used it as an image one the site. The site allowed you to set the color and scale of the image.


Background Image

background to the game


The background image was sourced again to supplement the horror theme and the setting of the game is in a house, so I thought it was fitting that the user can visualize the environment that the game is depicting and soak up the atmosphere.


The rest of the images consist of aasci art sourced from an online generator and a free resource that contains different images by category, I choose images that set the scene for various settings within the game. I did not overdo this as I didn't want to distract the player too much from game play.


Aasci House Image

aasci art house image


Aasci Death Image

aasci art death image




Flow Chart for the Game


I created a flow chart in Draw.io, which helped me to focus on how the game should flow. The first stage of the game is the intro where the user gets information on how to play the game, there is a little exploration of the settings and the hook would be the warning, which steers the player to make decisions that will set their course for future play. There are 4 main paths that the player can chose, where the user will have a customized experience and ultimately the end result will be revealed to the user.


Flow Chart




Features


Starting Page

The Introduction to the Game shows the Banner for the game and initially asking whether the user wants to play the game. If the user says no, they will be presented with a goodbye message, and if they confirm yes they can proceed to the game.


Starting Screen Image


Instructions

The player can choose to see the instructions for the game, but if they choose not to see them, prompts will help the player at evey step of the game.


Instructions for Player


Intro To Game Story

The introduction to the background story is displayed to the player, including a depiction of a House, the player is invited and the player has to decide to accept in order to proceed to gameplay.

Intro Story to Game


Arrival at House Setting

The player is introduced to the house setting and this is their entry level position for meeting with the characters in the game.


Arrival information for player


Introduction to Guests

The player gets to meet the characters they will be playing with, just their names for now and the player is required to supply their own name, which is validated for correct input, when this is supplied a greeting is displayed to the player.


Introduction to other guests


Warning Letter

The letter is the key part of the game, as it drives the action from this moment on, it spurs the player into action. It is so important that the user has two chances of seeing the contents.


Warning letter for the player


Guest Details

Before choosing a buddy for the game, the player is given the opportunity to see more details on one or all of the guests before their choice. They will not see details outside of what is needed for this choice. Certain details are hidden and can be used for future development.

Guest details for the player


Random Element

In regards to choosing a buddy and choosing a random safety item, an element of randomness has been introduced, in that the player can choose to be assigned a random buddy and a random safety item and take their chances in the game.


Random element in game


Different Paths in the Game

There are Four major paths in the game, determined by the player's choice for their buddy, after buddy selection, an introduction to the character will be displayed and a location for your particular path. Then there will be a series of events with prompts for input from the player. These inputs will decide their fate in the game. They can choose to escape the game, in which case they survive but they forfeit their inheritance. If they chose wrongly they can be killed by the killer. If they make it to the end of the game they will find out if their buddy was the killer or if they have survived the night. If they survive they will be shown a survivor message and will be able to leave the game.


Path for Luscious



Survival/death Notification



Dying Notification



Future Implementation


The game is set within a house, so there are limitation in regards to location, but there is scope to encompass more settings witin future iterations. The player could choose to travel to far off locations and explore different terrains and mix with a greater range of people. Within the present game the killer is randomly chosen so in regards to clues, these were not practical. In future work a killer could be chosen deliberately and clues could be provided so that the user could detect the culprit and stop him from the final attack. You could chose to solve tasks and be rewarded with various clues to the identity of the killer, in this way you could add more comlexity to the game and increase the engagement of the player.

In the present game there are only 6 characters(including the player) and there are 4 character paths, you could also include further characters and more character paths to give the player more routes through the game. THe different character paths could also be longer and this would allow the player to experience a broader experience of the game.



Tools and Technology

Language Used:

Technology Used:


Testing


Manual Testing


Feature being tested and Result

  • Start Screen displays when Heroku link is used. ✔️
  • The Title displays ✔️
  • Do you want to play a game? input fields - inputs work correctly ✔️
  • instructions = input(See Instructions yes/no) - inputs work correctly ✔️
  • Instructions display correctly ✔️
  • House Image displays correctly ✔️
  • Intro to Game displays ✔️
  • Do you accept the invite? yes/no? - inputs work correctly ✔️

  • Door Image displays correctly ✔️
  • Arrival Details display ✔️
  • Drink Image display correctly ✔️
  • lounge(What do you choose to do in Lounge?) - inputs work correctly ✔️
  • You sneak out to the staircase, up or down? - inputs work correctly ✔️
  • up = stranger(What do you do next, 1, 2 or 3?) - inputs work correctly ✔️
  • down = doorchoice(Which door do you pick, 1, 2 or 3?) - inputs works correctly ✔️
  • stranger = input(What do you do next, 1, 2 or 3?) - inputs work correctly ✔️
  • doorchoice = input(Explore which door, 1, 2 or 3?) - inputs work correctly ✔️
  • Guest names display correctly ✔️
  • Enter your name including validation - works correctly ✔️
  • Welcome Message displays correctly ✔️
  • letter(Do you want to see what is in the letter? yes/no) - inputs works correctly ✔️
  • letter displays correctly ✔️
  • Review(Would you like to see details on all or 1 2 3 or 4?) - inputs works correctly ✔️
  • Guest information is displayed in the right format ✔️
  • Details are displayed according to user choice ✔️
  • buddy_c(Now you can choose your buddy? 1, 2, 3 or 4?) - input works correctly ✔️
  • If correct choice not made a buddy is assigned randomly - working correctly ✔️
  • safetyitemchoice(What is your chosen protection, 1, 2, 3, 4, 5?) input works correctly ✔️
  • Random Protection assignment working correctly ✔️

  • When the Luscious path is chosen, the Luscious narration displays ✔️
  • brandy = input(She offers you a glass yes/no?) - inputs work correctly ✔️
  • noise = input(What choice do you pick 1 2 or 3?) - inputs work correctly ✔️
  • Secret room message displays correctly ✔️
  • waiting = input(What is your choice 1, 2 or 3?) - inputs work correctly ✔️
  • Survival function called and the player finds if they survive - working correctly ✔️
  • If player survives the Final message displays correctly ✔️
  • if player dies in game, death image is shown correctly ✔️
  • player is show option to leave the game - works correctly ✔️

  • When the Brad path is chosen, the Brad narration displays ✔️
  • confrontation = input(Your choice 1, 2 or 3?) - inputs work correctly ✔️
  • cellar = input(What is your choice, A, B or C?) - inputs work correctly ✔️
  • Survival2 function called and the player finds if they survive - working correctly ✔️
  • If player survives the Final message displays correctly ✔️
  • if player dies in game, death image is shown correctly ✔️
  • player is show option to leave the game - works correctly ✔️

  • When the Tobias path is chosen, the Tobias narration displays ✔️
  • corridor(What is your course of action: A,B or C?) - inputs work correctly ✔️
  • attic(What is your course of action: A,B or C?) - inputs work correctly ✔️
  • Survival3 function called and the player finds if they survive - working correctly ✔️
  • If player survives the Final message displays correctly ✔️
  • if player dies in game, death image is shown correctly ✔️
  • player is show option to leave the game - works correctly ✔️

  • When the Camilla path is chosen, the Camilla narration displays ✔️
  • door = input(What is your choice, A, B or C?) - inputs work correctly ✔️
  • library = input(Your choice A, B or C?) - input works correctly ✔️
  • Survival4 function called and the player finds if they survive - working correctly ✔️
  • If player survives the Final message displays correctly ✔️
  • if player dies in game, death image is shown correctly ✔️
  • player is show option to leave the game - works correctly ✔️

User Story Testing


As a first time user to the site

  • Understand how the Game Works.
  • Play the Game.
  • If I want to restart a Game, I want to be able to do this easily.

The game consists of a series of prompts, and the answers are highlighted to the user in advance. If you choose to play, each stage of the game will lead you through the gameplay. If you want to restart the game, currently you need to use the button above the game interface.


As a regular user of the site, I want to …...

  • I want to try the various scenarios to navigate through the game.
  • I want to avail of all the options to have different experiences.
  • I want more complexity and a greater range of scenarios within the game.

As a user you can choose different paths in the game and you can choose to partner with a different buddy which will also allow you to experience a different setting within the House. You can also take your chance with a random buddy or a random protection item to experience more of a game of chance.


As the site owner, I want to …..

  • Build more complexity in the game, so it is more challenging to the user.
  • Add more scenarios to give the user a wider range of experiences.
  • Offer a wider range of settings within the game.
  • In the present game, the killer is picked at random, so clues would be unhelpful, but in future games, clues and red herrings could be added to create more of an investigative experience, where the killer can be identified by the player.
  • Provide the user with more decision making opportunities.

The current game has a good foundation for future development. The classes can be utilizied to increase the complexity. The house has a few rooms at the moment but there is the possibility of increasing the range of the current internal settings. Increase the characters and lengtening the paths within the game.


General Testing


Browser Testing

The site was tested on Google Chrome, Firefox and Microsoft edge, and there seemed to be no issues on any of the browsers.


Responsive Testing

In regards to responsive testing, the Terminal does not work on smaller screens so just tested for the bigger screens. It seemed to have no issues as the content is aligned to the center.


Responsive Testing Image



Validation


I used pep8 validation to test the 4 pages and no errors were found (See images below)

pep8 for run.py


pep8 for classification.py


pep8 for narration.py


pep8 for art.py



HTML Checker

I tested the index page with W3C checked and it validated cleanly. I had added the css file in an external file but it didn't work in Heroku and so left css inline.

HTML Validation


Lighthouse Testing

I tend to have issues using lighouse in general, but the results seem to be generally alright. It did note some vulnerabilities but this was with existing code in the templates, so could not fix them.

lighouse testing specs



Bugs and Issues


Resolved

Most of the original bugs were centered on path choice and figuring how to bypass other parts of the game, just when you thought you had it figured, it would end up on a completly different path. In regards to validation the whole way through I had devised an else in each prompt so that the game would continue even if the wrong input was given. I did not want to penalize a player for getting it wrong, but fundamentally this was wrong as I was making the decisions for the player and that would not be a good user experience. So I added validation in the later stages of the project, adding 'While True' and asking the users for the correct input, in this way the user can't be wrong.

I had problems with the name validation, I was trying to use a regex and it didn't work right, so again at the later stages I added validation within the name function itself. Now it will repeat the prompt until the user gives a name with only words, can not the field blank or have numbers in the string.

There is a random element to the game, the killer is picked at random, the buddy is assigned if user chooses this option and also for the safety item, this was a last minute decision, and decided to make it a choice as apposed to the result of bad input. At on point the random assigned buddy was always 'Brad', but this has been since fixed


Unresolved

I was going to use a clear function, but the game does not lend itself too well to that, there is no set size between prompts and there are so many routes to choose, it could be problematic, although I would hope to improve the flow of the game in future iterations. If the player needs to finish the game, they are given several options throughout the game to leave, but if you were to start the game, the way I originally had used earlier in development(options for player), there were problems in allocating the random killer at the start of the game, so instead the user can leave at the end of the game and use the run programme button to begin again. I don't think this is a fault as such, but if you have the technology at hand, it seems wrong not to implement it fully.

There was some last minute issues in regard to the terminal, I think the page needs to be refreshed to ensure randomness is guaranteed (The run programme button does not reload the programme from the start fully), Would hope to come up with a valid long term solution moving forward. If random options are not chosen it should work out ok. This is an intermittant problem and seems to right itself but if it is a consistant killer it needs refreshing.



Deployment


How to make a local Clone

  1. Navigate to the main page of the repository.
  2. Click the green Code Button at top right of the repository.
  3. Copy the url for the repository.
  4. Open Git Bash and Change the current working directory to where you want the cloned directory.
  5. Type git clone, and then paste the URL you previously copied using $ git clone.
  6. Pressing enter will then create your clone.

How to fork a GitHub Repository

  1. Log into GitHub and go to the required Repository.
  2. The Fork button is found at the top right corner of the page.
  3. When you click this button you will have a copy of the repository in your own GitHub account.

Student Template

This Template has been provided by the Code Institute and includes a number of tools to make life easier and has been used within this present site.


Deploying to Heroku

  • After registering on the Heroku site, you can see the dashboard. You can select 'New' and then click 'Create new app'. You need to pick a unique name for your app, it will let you know if it is to available to use.
  • Select your region and create your app.
  • Go to the settings tab and scroll until you find the config vars section and pick 'Reveal config vars', in this case I added 'PORT' into the key field and added '8000' into the value field and click 'add'.
  • If you have credentials, for your project, you must create another config vars called 'CREDS' and you would paste the JSON into the value field.
  • You have to to the builldpacks section and click 'add buildpack'.
  • In this case I added 'Python' and 'saved changes, and did the same with 'Node'.
  • Next you go to the Deploy tab and you select 'github' and confirm connection to your GitHub Account.
  • You search for your project repository and click to 'connect'.
  • Under the deploy options, you can chose automatic deploys, this allow you to automatically deploy each time you push to your Repository.
  • To deploy, you would choose what branch you want to deploy and click on 'Deploy Branch'.
  • It takes a little time to build your app but when it is ready you can open your app by using the link provided

More information is available at https://docs.github.com/en, in regards to GitHub and is a great reference point for all GitHub queries.


Credits

How to print Coloured text in Python Tutorial

Choose Your Own Adventure Game in Python (Beginners) Tutorial

Python Text Based Adventure Game Tutorial Tutorial

Simple Python Project | Text-Based Adventure Game: Time Unraveled Tutorial

Let's Make a Text Adventure Game In Python  Tutorial

On Stack Overflow I found information in relation to writing text on screen at different speeds, and I used it for various texts imported from narration.py (see below)

for character in x:
sys.stdout.write(character)
sys.stdout.flush()
time.sleep()

I also used the following online resources:



Acknowledgements

Thank you to my mentor Brian Macharia for his guidance and support.



where-evil-dwells's People

Contributors

mhickey2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.