GithubHelp home page GithubHelp logo

mathiasbaumgartinger / millionairequiz Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.51 MB

Based on shows like "Who wants to be a Millionaire", this is a quiz template meant for easy personalization. Makes a great fit for the next wedding, bachelor's, or birthday party or just testing your friends.

License: MIT License

GDScript 100.00%

millionairequiz's Introduction

MillionaireQuiz

Based on shows like "Who wants to be a Millionaire", this is a quiz template meant for easy personalization. Makes a great fit for the next wedding, bachelor's, or birthday party or just testing your friends. I have searched for something like this for my brother's birthday party and could not find anything. So I decided to create my own version and share it with you.

Using a .json file, you can easily add your own questions and answers.

Music and Sound Effects

Due to copyright protection, the original music and sound effects of the show cannot be included. However, you can add your own music and sound effects to the project folder and adapt the export variables in the MillionaireQuiz.tscn->MusicManager node.

Adding your own questions: JSON Format

Follow the questions.json format with the following structure:

{
    "questions": [
        {
			"score": "easy",
			"question": "Who served as finance minister under Louis XIV?",
			"A": "Jean-Baptist Colbert",
			"B": "Jean-Jacques Monnoyer",
			"C": "Jules Mazarin",
			"D": "François de Louvois",
			"correct": "A"
		},
    ]
}

In the original show, different score-categories have different sound effects. This is implemented via the score-field (easy, medium, hard). This score determines the sound-effects being played when the question is answered correctly or incorrectly.

Controls

  • Enter: Advance game state
  • Click button: Answer question
  • Tab: Toggle overview and jokers
  • Click joker: Use joker

Sneak Peek into the Code

Ultimately, the quiz is based on different states, which are described by the GAME_STATE-enum in the MillionaireQuiz.gd-script with the following states:

  • idle: waiting for the moderator to start the game
  • intro: replay of the intro animation
  • opening: opening audio is played
  • lets_play: lets play audio is played
  • empty: quiz format is shown without any text
  • question: question is shown
  • A: answer A is shown
  • B: answer B is shown
  • C: answer C is shown
  • D: answer D is shown
  • locked: an option is locked
  • answered: the question has been answered
  • correct: the answer was correct
  • wrong: the answer was wrong

Once the game state hits empty, it runs in a loop from empty to correct or wrong and back to empty. In case you do not want to include the video sequence, you can set the current game state to opening (var game_state := GAME_STATE.opening).

Using signals, other components are notified by a change of the state. The MusicManager.gd-script is responsible for playing the music and sound effects. The QuestionManager.gd-script is responsible for loading the questions from the questions.json-file and displaying them on the screen.

Theme

The theme is created by me myself and got accents of the original show with a very personal touch.

Contributing

For discussion and support, please use the issues section. Happy about any feedback and contributions. Feel free to open pull requests.

millionairequiz's People

Contributors

mathiasbaumgartinger avatar

Watchers

 avatar

millionairequiz's Issues

Feature: audience joker

As a party game, inclusion of the crowd is very important. What better way than with the audience joker.

My initial idea was too use a QR code, so the audience could easily vote using their phones. This would probably require some form of server/web-socket functionality.

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.