Explore the docs »
View Demo
·
Report Bug
A quiz game made with vanilla js.
To get a local copy up and running follow these simple steps.
- npm
npm install npm@latest -g
- Clone the repo
git clone https://github.com/ChristianPredoianu/quiz-game-vanillajs.git
- Install NPM packages
npm install
- Serve with hot reload at localhost
npm run start
- Build for production
npm run build
The user must select game options before starting the game. The options are: Category, difficulty, amount of questions and questions type (multiple or true/false). The game uses the Open trivia api. Some combinations of game options doesn't return any questions back from the api. This is a lack of questions from Open trivia api. For example category: Politics, difficulty: hard, amount of questions: 50 and type of questions: true/false. The user get's notified about this and has to choose other game options. For every questions there is a timer set to 15s. If the user doesn't choose an answer before the timer runs out the answers will be disabled and the user gets 0 point for that particular question. If the user doesn't choose an answer while the timer is active the user gets a notification to choose an answer. That means that the user can't go to the next question before choosing an answer while the timer is active. When all questions are answered the user is presented the total score in % and is asked to submit a name. When resetting the game, the game uses localstorage to set the players scores and showing the top 3 highscores at the start of the game.
Distributed under the MIT License. See LICENSE
for more information.
Christian Predoianu - @linkedin - christianpredoianu@yahoo.com
Project Link: https://github.com/ChristianPredoianu/quiz-game-vanillajs