Skip to content

Project milestone 2 for Code Institute Full-stack development program: JavaScript Essentials.

Notifications You must be signed in to change notification settings

PedroCristo/portfolio_project_2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quiz Land - Game

Introduction

Project milestone 2 for Code Institute Full-stack development program: JavaScript Essentials.

Quiz Land is a quiz game that allows players to test their knowledge in different topics. In Quiz Land there are 3 different quizzes available and it has 10 questions for each topic. If the user can answer the question correctly they will receive points. Quiz Land is a good way to have fun and also to learn while playing a game.

Live Project Here

Quiz Land webpage on multiple devices

README Table Content

User Experience - UX

User Stories

  • As a website creator, I want to:
  1. Build an online quiz that is visually appealing from the user’s first visit so they are intrigued to explore and play the game.
  2. Build an easy to navigate quiz and game for its users to play.
  3. Build a quiz that is both enjoyable and challenging for the user.
  • As a new visitor, I want to:
  1. Be able to understand the main purpose of the game.
  2. Be able to easily navigate throughout the game and choose a quiz to play.
  3. Be able to see my results after playing the game.
  • As a returning visitor, I want to:
  1. Be able to find new quizzes when they are available.
  2. Be able to check the Height Scores page
  3. Be able to challenge myself and improve on my scores.

Design

Wireframe

In this project I decided to build a prototype using the tool Canva before starting work on the code. It was helpful from an UX perspective as I could display the different elements in the screen and work with them with the objective of building an application that would be easily used by the users.
Live Project Wireframe Here

Website Structure

The Quiz Land is a nine page website that has been designed to look like an application in small devices.

Pages:

  • Homepage
  • Quiz Sports
  • Quiz History
  • Quiz Geography
  • Game End
  • Trophy Gold
  • Trophy Silver
  • Trophy Bronze
  • High Scores

Colour Scheme

Color Scheme
The main colour scheme I chose for this project is an overall blue tone and purple with a darker colour for maximum user accessibility. I have choosen a green color as an interactive-color to contrast with the background.

Typography

  • The Roboto, sans-serif is used as the main font for the whole website.

Imagery

  • 3 images were used as a background for the website pages.
  • 1 image was used for the Favicon.

Interactive Links

  • At the bottom of the Home page, users can access the game's social media links (Facebook and Instagram). Once these icons are clicked they open a new tab.

Features

Home Page

Home Page

  • When the users reach the website, they are instantly greeted on the Homepage and they have access to the button to start playing immmediately. Also there is a sidebar opening by pressing the hamburger icon on the top right, here users can start to play but they can also choose a different quiz or just check the High Scores board. On the bottom right side the players can access the game's official social media pages.
    Live Feature Here

Navigation Menu

Side Navigation Menu Desktop

Side Navigation Menu

  • At the top right of the website, users can find a hamburger menu that is fully responsive in all devices. In this navigation menu users can navigate to the different quizzes and also check the High Scores board.

    Side Navigation Menu Tablet

Side Navigation Menu Tablet

Navigation Menu Mobile

Side Navigation Menu mobile

Navigation Menu Day/Night Mode

Side Navigation Day/Night Mode

  • Menu Day/Night Mode. From 8am to 8pm users can access the navigation menu when open in day mode (background-color white), from 8pm to 8am users can access the same menu in night mode (background-color black).

Quiz Sports

Quiz Game 1

  • All of the game happens in this feature. Here the users will see the questions and they have 4 choices as their answer. The player will choose one and will see if the answer given is right or wrong. The topic questions in Quiz 1 are Sports.
    Live Feature Here

Quiz History

Quiz Game 2

  • This feature has the same purpose as Quiz 1 but here the topic questions are History.
    Live Feature Here

Quiz Geography

Quiz Game 3

  • This feature has the same purpose as Quiz 1 and Quiz 2 but here the topic questions are Georaphy.
    Live Feature Here

Game End Page

Game End Page

  • Game End feature is the page that users go after a quiz is finished. Here the players can see the last score and save their usernames.
    Live Feature Here

Trophy Gold Page

Trophy Gold Page

  • After the user saves the game and if they score 250 they are brought to this feature to receive the gold medal.
    Live Feature Here

Trophy Silver Page

Trophy Silver Page

  • After the user saves the game and if they score 225 they are brought to this feature to receive the silver medal.
    Live Feature Here

Trophy Bronze Page

Trophy Bronze Page

  • After the user saves the game and if they score 200 they are brought to this feature to receive the bronze medal.
    Live Feature Here

High Scores Page

HighScores Page

  • In the High Scores feature users can check the best scores by the individual players.
    Live Feature Here

Future Features

Progress Bar Right/Wrong Answers

  • I am planning to add a feature with two progress bars. One progress bar to show the number of right answers and the other to show the number of wrong answers in the last game played.

How To Play

How to Start

How to Start

  • The player can choose a quiz to play from the menu or start a random quiz by pressing the button Let's Play in the Homepage.

The Game

How To Play

  • The player has 3 different quizzes in the game. For each quiz the user will see the question on the top center [2] and 4 choices [3] are available. The player then has to choose one of the choices and if the answer is right will win 25 points. The score will be displayed on the bottom right[5]. While the game is going on, users can see the progress bar updating any time they answer a question [1] and the question counter will also update on the bottom left [4] . On the top right the users can check at any time what quiz they are on [6].

Right Answer

Right Answer

  • When the user answers the question right the message "Right Answer" will appear on the top center [7] and the background color of their choice answer will turn green [8].

Wrong Answer

Wrong Answer

  • When the user answers the question wrong the message "Wrong Answer" will appear on the top center [9] and the background color of their choice answer will turn red [10].

Technologies Used

Languages Used

Frameworks - Libraries - Programs Used

  • Google Fonts
    • Google fonts were used to import the 'Roboto' font throughout the style.css.
  • Font Awesome
    • Font Awesome are used as an icons for user UX purposes.
  • Git
    • Git was used for version control by utilizing the Gitpod terminal to commit to Git and Push to GitHub.
  • GitHub
    • GitHub is used to store the project's code after being pushed from Git.
  • VSCode
    • VSCode was used to create and edit the website.
  • Mobile Simulator
    • Mobile Simulater was used to test the website on a mobile device.
  • PIXLR
    • PIXLR was used to create, modify and resize all images on this website.
  • Canva
    • Canva was used to create wireframe, the 3 background images and also the Favicon.

Testing

The W3C Markup Validator and W3C CSS Validator Services were used to validate every page of the project to ensure there were no syntax errors in the project.

  • The HTML files were validated through the W3C Validator, presenting no errors.

Results:

  • The CSS files were validated though the Jigsaw W3C Validator, presenting no errors.

Results:

  • All JavaScript files were validated through JSHint, presenting no errors.

Jshint Result

The testing was done using the Google Chrome Browser. Chrome Developer Tools was used extensively, particularly to check responsiveness on different screen sizes. Testing was also done using Firefox on desktop, and again on Google Chrome and Opera on the Huawei P20.

  • Responsive on all device sizes between 320px - 2600px wide

  • Devices tested using the Google Developer Tools emulator

    • BlackBerry Z30 (360px x 640px)
    • BlackBerry PlayBook (600px x 1024px)
    • Samsung Galaxy Note 3 (360px x 640px)
    • Samsung Galaxy S3 (360px x 640px)
    • Samsung Galaxy S8 (360px x 740px)
    • Samsung Galaxy S9+(320px x 658px)
    • Samsung Galaxy Tab S4(712px x 1138px)
    • LG Optimus L70 (384px x 640px)
    • Microsoft Lumia 550 (640px x 360px)
    • Microsoft Lumia 950 (360px x 640px)
    • Motorola G4 (360px x 640px)
    • Nexus 4 (384px x 640px)
    • Nokia Lumia 520 (320px x 533px)
    • Nokia N9 (480px x 854px)
    • Pixel 3 (393px x 786px)
    • Apple iPad Mini (468px x 4024)
    • Apple iPhone 4 (320px x 480px)
    • Apple iPhone 5/S (320px 568px)
    • Apple iPhone 6/7/8 (375px x 667px)
    • Apple iPhone 6/7/8 Plus (414px x 736px)
    • Apple iPhone X (375px x 812px)

Lighthouse

Lighthouse was used to test Performance, Best Practices, Accessibility and SEO on both Desktop and Mobile devices.

  • Desktop Results:

    Lighthouse Destop Result.

  • Mobile Results:

    Lighthouse Mobile Result.

    Functionality

  • All links have been hovered and clicked to ensure accessibility.

  • Pages all load correctly on all device screen sizes.

  • All social media links work correctly and open a new tab.

  • All the buttons are working correctly and bring the users to the function that they were built for.

  • The game is working correctly the question comes at the right time and it gives a reply back to the user when answered.

  • The score has no issues and it increases by 25 points any time the user gives a right anwser.

  • The progress bar and question counter have also no issues, the background color increases (from 0% to 100%) and the number of questions also increases any time the user chooses an anwser.

Bugs

Text Overlaping Mobile Devices

Text Overlaping Mobile Devices

  • I had this issue with my project when I built the layout for the Quiz Page as they are many elements in the same page.

Fixed Bug

Fix Bug

  • I had to add media queries for portrait and landscape to avoid this issue happening.

Deployment of This Project

The website development was created in the "main" branch. This branch was deployed using GitHub Pages.

  • This site was deployed by completing the following steps:
  1. Open GitHub.
  2. Click on the project to be deployed.
  3. Navigate to the "Settings".
  4. Navigate down to the "GitHub Pages".
  5. Click on "Check it out here!".
  6. Select the "main" branch and select "Save".
  7. The link to the live website was ready on the top.

Forking This Project

  • Fork this project following the steps:
  1. Open GitHub.
  2. Click on the project to be forked.
  3. Find the 'Fork' button at the top right of the page.
  4. Once you click the button the fork will be in your repository..

Cloning This Project

  • Clone this project following the steps:
  1. Open GitHub.
  2. Click on the project to be cloned.
  3. You will be provided with three options to choose from, HTTPS, SSH or GitHub CLI, click the clipboard icon in order to copy the URL.
  4. Once you click the button the fork will be in your repository.
  5. Open a new terminal.
  6. Change the current working directory to the location that you want the cloned directory.
  7. Type 'git clone' and paste the URL copied in step 3.
  8. Press 'Enter' and the project is cloned.

Credits

Information Sources/Resources

Content

Special Thanks

  • Special thanks to my mentor Sandeep Aggarwal, Slack Community, Dave Horrocks and Mairéad Gillic for their assistance throughout this project.

About

Project milestone 2 for Code Institute Full-stack development program: JavaScript Essentials.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published