Giter VIP home page Giter VIP logo

michaelrfreitas-p2_web_curiosity-quiz_mayresub's Introduction

Curiosity Quiz - Discovery World

CQ Logo

Project is deployed here

Github repository is here

Introduction

This project is the second project part of the Full-Stack Software Development Course in Code Institute.

The Curiosity Quiz is a web quiz that checks your knowledge regarding curiosities in the world. With a lot of questions and 3 choice options to an answer with pictures until 15 secs. You can stimulate your knowledge and play with your friends to know who can get the best score.

It is a quiz game regarding curiosities in the world. The quiz doesn't have a specific subject. The idea is to provide questions regarding curiosities to discover the world and check your knowledge about a lot of things like history, sports, geography and news.


User Experience/User Interface (UX/UI)

User Experience/User Interface (UX/UI)

User Stories

First Time Visitor Goals

As a first time visitor I want:

  • the rules and final aim of the game to be obvious.
  • to be entertained and engaged with the game from the initial load.
  • the game to function correctly and gameplay to be intuitive.
  • to be able to play the game on various different devices.

Return/frequent Visitor Goals.

As a return/frequent visitor I want:

  • to be able to gauge/score my performance.
  • to be able to challenge myself by increasing difficulty of the game.
  • to be able to play the game on various different devices.

Website's Owner Goals.

As the developer I want:

  • to provide a fun quiz game.
  • to provide a game to stimulate knowledges.
  • to encourage continued use of the game.

SiteMap

Site Map

User Flow

Site Map

Design

Colour Scheme

I trialled many different colour palettes whilst building the game and settled on a simple combination of shades of several green tons and black. Black is used for background colour in the logo and buttons. White is using for texts with contrastes with other colors.

Paleta

The background image is using the 3 last colors from palette above to generate a 3-Color-Gradient #3BAC0A, #236304 and #184504:

background-image: linear-gradient(to right bottom, #3bac0a, #379e08, #329007, #2e8206, #297505, #266c05, #236404, #205b04, #1e5504, #1c5004, #1a4a04, #184504);

Typography

I have choose Georgia, 'Times New Roman', Times, serif as the font for the site. It is a big bold type that stands out from the background well and is easy to read.

Wireframes

Home Page
Home page
Quiz Page
Home page
Result Page
Home page

Features

Features

Responsive Website

The site displays properly at a wide range of screen sizes and on landscape mode, further information on this is listed in the testing section.
This satisfies the user need to be able to play the quiz game on various devices.

Responsive

Home Page

The instruction regarding the game is provided in the home page. Where is required to add a Player Name to start the quiz game.

Home Page

Timer

For each question, there is a timer of 15 seconds to provide a correct answer. If the answer is correct, the remaining time plus 15 seconds should be added to the next question. However, if the answer is incorrect the next question should be 15 seconds again.

Timer

Score

The score increases by 10 points when the answer is correct. However, if the answer is incorrect or the user doesn't get to provide an answer in 15 seconds the score decreases by 5 points.

Score

Quiz Page

The Quiz Page will provide 10 questions to the player, each at a time, and 3 choices images to provide a unique answer for each question. On this page, there is the player name, score, timer and number of correct and incorrect answers. The page has a button to end the game before finishing if the user wants.

Quiz Page

Result Page

The Result Page shows the Player name, number of correct and incorrect answers in the end of the game with end score. There are two buttons Home (redirect to home page) and Restart (restart the game with same player).

Result Page

Future Features

I would like to add extra features to the quiz game such as:

  • Increasing the number of questions from 20 to 50.
  • The result page may show all players that have played on the same machine.
  • Storage previous results to create a competition.
  • No previous questions will be repeated to the same player in the next games.
  • Ranking of players.

Technologies Used

Technologies Used

Dev Languages Used

  • HTML5
  • CSS
  • JavaScript

Applications Used

  • Balsamiq was used to create wireframes for this project.
  • GitPod was used as an online IDE.
  • GitHub is used to store the projects code and version control.
  • GitPage are used to deploy the site.
  • Chrome Developer Tools used for layout, testing console and responsive testing.
  • Wave used for accessibility testing.
  • Favicon.io used for creating favicon.
  • W3c Validator used to test HTML and CSS code.
  • JSHint used to validate JavaScript code.
  • TinyJPG was used to compression the image files to improve performance.
  • Am I responsive was used to create a responsive image.
  • Character Count was used to add commit with max 50 characteres.
  • W3Schools was used to reference code for HTML, CSS and JavaScript.
  • ColorSpace was used to generate a gradient background image.
  • Colormind was used to generate a color palette.
  • ConvertCSV was used to convert CSV file to JSON file.
  • Lucidchart was used to create a user flow and sitemap.

Testing

Testing

Lighthouse

Home Page Desktop

Lighthouse Home Page Desktop Test

Home Page Mobile

Lighthouse Home Page Mobile Test

Quiz Page Desktop

Lighthouse Quiz Page Desktop Test

Quiz Page Mobile

Lighthouse Quiz Page Mobile Test

Result Page Desktop

Lighthouse Result Page Desktop Test

Result Page Mobile

Lighthouse Result Page Mobile Test

W3c CSS Validator

No errors were found when passing through the official Jigsaw CSS Validator.

W3c CSS Validator
CSS - Jigsaw CSS Validator

W3c HTML Validator

Some errors and warnings have been found when validated the code through official W3C HTML Validator. All of them has been fixed.

Home Page Errors

W3c HTML Validator errors Home Page

Home Page No Errors

W3c HTML Validator no errors Home Page

Quiz Page Errors

W3c HTML Validator errors Quiz Page

Quiz Page No Errors

W3c HTML Validator no errors Quiz Page

Result Page No Errors

W3c HTML Validator no errors Result Page
HTML - W3C HTML Validator

JSHint

The Javascript file was validated using JSHint, with the following result. The New JavaScript features (ES6) option was ticked in the Configure menu.

JSHint Validator no errors script.js
JavaScript - JSHint Validator

WAVE Web Accessibility Evaluation Tool

The WAVE tool was used to test the page for accessibility. No errors.

Home Page

WAVE Validator no errors home

Quiz Page

WAVE Validator no errors quiz

Result Page

WAVE Validator no errors result
Accessibility - WAVE

Responsiveness

Media queries based on screen width were used to ensure the page displayed correctly across a range of screen sizes. the Chrome and Edge browsers were used to test responsiveness.

The responsive testing tools included within the Google Chrome and the Edge browsers were used to test these, all display correctly.

  • I also used the device specific tool within these browsers to test a number of devices representng a wide range of device types:

    • Apple:

      • Ipad mini
      • Iphone 7
      • Iphone 11
      • Iphone 12
      • Iphone 13 Pro Max
    • Desktops/laptops:

      • Dell XPS15 9570 Laptop
      • MacBook Air
    • Browsers:

      • Chrome
      • Edge
      • Firefox
      • Safari

Issues Encountered Building The Quiz Game

I had difficulty keeping the details stored for use on the next page or game session. Examples: name, score and other details that I need to keep the game running. I'm using sessionStorange function to solve it.

Another issue was to store the questions in the system without using a proper database and find an answer with the questions and validate the correct answer after using the random created for questions and answers position. I'm using JSON to store the questions with options for the answers and correct answers then I'm using the sessionStorage to get the position and validate it doesn't matter what position the correct answer is.

Testing for achievement of User Goals

All pages have been tested across all screen sizes for a responsive experience and web pages have been Styled accordingly.

During this time I realised I made some silly mistakes mainly with sizing and had to go back through and change some size values to work correctly.

Once testing was completed and I was happy with the result I used validators to ensure my code was up to standard and best practices. I did this using W3C validator for HTML, Jigsaw Validator for CSS, WAVE (Web Accessibility Evaluation Tool) and Lighthouse in Google Chrome.

All images are responsive.

Goal Outcome
Validated if don't put a name in player name. The game show me a alert to add a name as required.
Tested End button in Quiz Page. Send the user to Result Page with the last score, the user has got.
Validated all rules regarding time, scores and answers. When correct extra time added to the next question and 10 points increase.
Validated if the details are showing in the result page is true. Name and details regarding score, correct and incorrect questions are showing right in the end.
Time is running correct and incriase in the correct moment. Showing the new time correct in the next question depend of the previous answer.

Unfixed Bugs

No bugs identified that needs to be fixed.

I would like more time for increase the database questions and create a ranking for players in the same session.


Deployment

Deployment

This project was built on the GitPod IDE using the Code Institute template found here:
https://github.com/Code-Institute-Org/gitpod-full-template

Creating My Website

To create this project I used the Code Institute Gitpod Full Template by navigating here and clicking the button labelled 'Use this template'.

Next I was directed to the 'create new repository from template page' and entered in my repo name, then clicked create repository from template button.

The commands used for commits throughout the project:

git add filename - This command was used to add files to the staging area before committing. git commit -m "commit message explaining the updates" - This command was used to to commit changes to the local repository. git push - This command is used to push all committed changes to the GitHub repository.

GitHub Pages

  1. Log in to GitHub and locate the GitHub Repository

  2. At the top of the Repository (NOT at the top of page), locate the "Settings" Button on the menu.

  3. Scroll down the Settings page until you locate the "GitHub Pages" Section.

  4. Under "Source", click the dropdown called "None" and select "Master Branch".

  5. Click Save and the page will automatically refresh.

  6. Scroll back down through the page to locate the now published site link in the "GitHub Pages" section. Link

Forking

Forks are used to either propose changes to someone else's project or to use someone else's project as a starting point for your own idea. - This is the definition from Github Docs.

  1. Navigate to the GitHub Repository you want to fork.

  2. On the top right of the page under the header, click the fork button.

  3. Fork

  4. This will create a duplicate of the full project in your GitHub Repository.

Clone

  1. Navigate to the Github Repository you want to clone.

  2. Click the drop down menu labelled "Clone".

  3. Either Download the ZIP file, unpackage locally and open with IDE (This route ends here) OR Copy Git URL from the HTTPS dialogue box.

  4. Open your developement editor and open a terminal window in a directory of your choice.

  5. Use the 'git clone' command in terminal followed by the copied git URL.

  6. A clone of the project will be created locally on your local machine.


Credits

Credits

Images

The answer images were downloaded from:

Code/Reference

I used MDN Web Docs to learn about JavaScript reference for JSON.
The W3Schools website was also used particularly in relation to element attributes and how the best practice to set them.
The Code Institute course material.

Acknowledgment

I'd like to say thank you my mentor Benjamin Kavanagh for his guidance and support throughout my project.

michaelrfreitas-p2_web_curiosity-quiz_mayresub's People

Contributors

michaelrfreitas 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.