Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Trivia Quiz Game Template

Discussion in 'Assets and Asset Store' started by puppeteer, Sep 25, 2015.

  1. karmik

    karmik

    Joined:
    Oct 8, 2014
    Posts:
    124
    Sorry guys didn't do my homework

    Webgl seems to be working fine on fb in chrome.and on mobile too
     

    Attached Files:

    puppeteer likes this.
  2. karmik

    karmik

    Joined:
    Oct 8, 2014
    Posts:
    124
    I tested sometime back. From what i remember below is the process

    1.You create a new apk file with a new version like 1.1 or something.
    2.Then you upload the file to google playstore and publish to prd.
    3.the user will see an Update app option in playstore. If he has set the auto update option to yes, the app will update automatocally when connected to wifi

    Hope this helps
     
    puppeteer likes this.
  3. wikreate

    wikreate

    Joined:
    Apr 28, 2017
    Posts:
    10
    thank you soo much,
    The problem is when user doesn't set auto update to yes in this case the application can't be updated do you have any idea?
     
  4. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    I don't think there is a way to force update apps when they are ready:
    https://forum.unity3d.com/threads/android-force-update-apk-when-new-version.344984/

    But I'm thinking now, is what you want to update part of the app itself or is it just the list of questions? In the later case you could target an external XML file which the trivia quiz will load each time the quiz runs. So if you update the XML it gets automatically updated in the app.
     
  5. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    Hi puppy,

    even if you missed my last posting(s)..., I try a new question on this topic here:

    What happens if the player is not connected to the internet? Can he still play with the old questions that have been loaded before, or does he not see any questions and can not play?
     
    puppeteer likes this.
  6. MuhRiz

    MuhRiz

    Joined:
    Nov 8, 2015
    Posts:
    3

    hey, does this asset has database? like json or xml file?
     
    puppeteer likes this.
  7. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    If the game can't access the online XML it will revert to the default questions that are inside the quiz app itself, so it doesn't keep a record of the XML locally. That could actually be an interesting toggled feature, to keep a copy of the XML locally. I'll check this option.
     
  8. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    The quiz can either be part of the app itself ( from within Unity Editor ), or it can use an XML file to load quizzes into the app from an online source or from a local source on the user device ( ex: classroom with quiz distributed locally to students ).

    The next update will also have the option to fill out the quiz using an Excell template and export it to XML for use.
     
  9. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Hey guys,

    I'm happy to show you a new feature that has been asked for by so many users, and the solution was achieved thanks to a mail question by one of the users that relates to the formatting we get when importing the XML into Excell.

    Anyway, here's what we have:

    ezgif.com-video-to-gif(1).gif

    The excell file will allow you to fill out questions, leave out any parts you don't want, and export to XML. The resulting XML will only include the parts you filled out for your quiz. Then you can load it into your Trivia Quiz Game.

    I'll make a guide video with the update, good times :D
     
  10. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Here's a short video showing how to use the Excel-to-XML feature:



    You can fill out the Excel file while keeping the parts you don't want to use empty. The XML export will simply ignore any empty parts. You can also remove whole columns you don't use.

    Excel templates are provided in the Resources folder.

    @longroadhwy and @nekobanana, check this out :D
     
    Last edited: Jun 27, 2017
    karmik likes this.
  11. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Update 1.86 is online in the store, get it here:
    https://www.assetstore.unity3d.com/#!/content/45521?aid=1011lGiL

    Update 1.86 (26.06.2017)
    Improvements:
    - You can now create your quiz questions through Excel, and then export them to XML for use in the quiz. Excel templates for the quiz are available in the project resources folder.
    - Unified all basic game modes to have the same Image/Sound features in both questions and answers.
    - When a Math Category is attached to a quiz gamecontroller or category, it updates the list of questions in that quiz or category. This allows the user to export the questions to an XML file.
    - We no longer need to assign the Answer Objects in the gamecontroller. The game will look for an object named "Answers" in the quiz and get the answer objects from inside it.
     
    ATeam_Production likes this.
  12. karmik

    karmik

    Joined:
    Oct 8, 2014
    Posts:
    124
    @puppeteer
    Thaks for the excel option.

    Also i have decided to publish my game in 15 days from now.

    I need help with one issue. I have some questions that have "all the above" as answer. I dont want to randomise answers for these question. But for rest of questions, i want to randomise answers.

    Can you help me with this issue.

    Will save a lot of time. I have committed to deadline for release, so i can focus and deploy my game asap. Any help on this will save me lot of time.
     
  13. MuhRiz

    MuhRiz

    Joined:
    Nov 8, 2015
    Posts:
    3

    thanks for reply, i have one question, i already have this asset, but i wanna something like leaderboard, could you give a lesson for me??
    i appreciate for your help....
     
  14. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    From what I understand, you want these questions specifically to *always* be included in the quiz no matter what random set of questions appears, right?
     
  15. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Unfortunately, online leaderboards have never been my forte. Others asked about it already but I haven't been able to do something like this that works the way I want ( out of the box without installing any external tools ).
     
  16. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    ...but you could track and save players progress and points, or not? So, if you already implemented an "API"-like thing for the questions, could there be any way to prepare players progress/points in the same way for sending it onto an external system? If you store any players points in a "xml-leaderboard", after every game, the app could send this xml file to an external system - "my webserver". on my server I get this xml file and publish the data on a leaderboard on my website. Good or bad idea? ;)
     
    puppeteer likes this.
  17. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    The complexity lies in the transition to the server, but being able to make the Excel-to-XML update after this long has given me a boost of confidence. I want to try the login+leaderboard feature again, but I want to make sure it can work on multiple platforms or else we'll just be bloating the package further.

    So this will be built from the base up on version 2.0 of Trivia Quiz, or I will test a simple user login for starters without a server side leaderboard, then keep the leaderboard for v2.0. For the next update I have some XML enhancements and the mode mixer to think about.

    At any rate, keep "nagging" me about this because I know it will benefit all other users in the end.
     
    Artomiano likes this.
  18. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    @tom-art: I've been dabbling with XML for the next update and I had a thought which might be interesting for you. It's a solution that uses XML to record a highscore table from an online address ( similar to how we can get a quiz from an online address ). It's not a secure solution, but it could give your players a dynamic highscore table that works across PC and Mobile without using any server code.

    What do you think about something like this?
     
  19. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Had a great back and forth with a customer, resulting in some interesting features ( and a couple bug fixes ), including the ability to add multiple subcategories within a single category. So here's a video showing that feature:



    This will be a quick update to before the XML update, because there are a few things that need to be addressed ASAP in the latest version.
     
    Artomiano likes this.
  20. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Working on a couple of cool things for the next update ( the one before the XML one ), and here's another thing you can do in the next update:



    This little script can lock a level button based on a recorded PlayerPrefs value of your choice. In the video above I lock all the level buttons as long as we don't have at least 1000 points in the High Score of the Single Player level.

    This same script can also work with my other templates that load levels, simple drag and drop.
     
    Last edited: Jul 30, 2017
    Artomiano likes this.
  21. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Next update has been submitted to the store, should be online in a few days:

    Update 1.90 (29.07.2017):

    Improvements:
    - You can add a list of subcategories to an existing category. The subcategories will be added up into the list of questions in that category.
    - You can lock a level button based on a PlayerPrefs value you choose. For example you can require a High Score of 1000 in Single Player before unlocking another level.

    Fixes:
    - Removed Dynamic XML components from categories, they were just an example to show loading categories from online source.
    - In CloseUp game mode, you shouldn't be able to click and see the full image.
    - Stop sound when moving on to the next question.
     
    Artomiano likes this.
  22. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Update 1.90 for Trivia Quiz is live, get it here:

    https://www.assetstore.unity3d.com/#!/content/45521

    Be sure to try out the new features for subcategories and locking levels based on score, would love to have feedback on those ( plus a bug catch would be good :D )
     
  23. J-Rossier

    J-Rossier

    Joined:
    Dec 7, 2015
    Posts:
    7
    Hi puppeteer, i don't work on my project for a while. But i need to finish them. I update the template and again i have a problem when a wrong answer was select another random answer stay highligth :( i'm using unity 5.6.0f3 thanks again
     
    puppeteer likes this.
  24. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Did you try the same code solution I gave earlier? If it doesn't work just contact me with your project, there could be something else locking the highlight.
     
  25. J-Rossier

    J-Rossier

    Joined:
    Dec 7, 2015
    Posts:
    7
    Yes i have the code at line 770 is this what you mean?
     
  26. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    There could be another reason related to the Event System which changed across version of Unity. Your best bet is to send over your current project with the bug so I can take a look.
     
  27. J-Rossier

    J-Rossier

    Joined:
    Dec 7, 2015
    Posts:
    7
    How can i send you the project?
     
  28. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Check your private messages.
     
  29. Xain

    Xain

    Joined:
    Aug 3, 2013
    Posts:
    68
    Is it possible to add your questions in the game? Like in-game editor. That would be great.
     
    puppeteer likes this.
  30. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Would be an interesting feature to give users of your game the ability to create their own quiz, though for saving online it would need server side implementation. It could also be just a local save for the user, or an offline option. Or create a quiz and then share it with friends. Something like BuzzFeed maybe.

    Could be a good idea for version 2.0.
     
    mindfulmx and Xain like this.
  31. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    Don't forget the "XML-thing" before new ideas, puppy. :rolleyes:
     
    puppeteer likes this.
  32. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    You didn't tell me your opinion about this "XML highscore table", what do you think?
     
  33. ScottRamsay

    ScottRamsay

    Joined:
    Aug 13, 2017
    Posts:
    10
    Hello Puppeteer. Could you link me to instruction on how to change the audio question files in Unity? I can't find a chapter on it in the PDF.
    Thanks
     
    puppeteer likes this.
  34. ScottRamsay

    ScottRamsay

    Joined:
    Aug 13, 2017
    Posts:
    10
    I have just found it, although you should consider adding these instructions to your PDF for noobs like me :)
     
    puppeteer likes this.
  35. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Lately I've been doing more and more videos to cover some of the topics in the TQG template, like this quick guide for example:



    I should really put more info in the docs too. While we're at it, is there anything specific you'd like to know more about, how to configure or set up for the template?
     
  36. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    Hi puppy,

    sorry. I forgot to answer this. ;)
    So... about your idea: I'm not sure if I understand you in the right way. Record highscores from an external source is okay... but how should I save "mobile" highscore TO the external source? I need a two way system - write and read solution. Do you know what I mean? ;)
     
  37. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    That is what I'm trying to do, to see if I can get a list of highscore from an XML, then save to it online from any source, so it can be a mobile version or a PC version of the same game. They would both load and save from that list. The problem of course is that even if it works it wouldn't be hack proof ( nothing is ), but if it does work it can be a simple way to show user scores.
     
  38. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    You could use a ssl connection...
     
  39. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Looks like there is no way around a server side solution for anything related to highscore tables, so I'll put this aside for now.

    In other news, the XML focused update is almost ready and should be submitted to the store in a couple of days. Will post an update video later.
     
  40. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    :( So I have to look for another asset that extends TQGT.
     
    puppeteer likes this.
  41. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    If I find some asset on the store that is free/cheap/popular and easy to implement, I will create a video showing how to integrate it into TQG. Anything that goes into database handling usually complicates things and creates many potential problems ( and support questions I might not be able to answer ), so I'm afraid there's no way around using a another asset.
     
  42. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    XML focused update is now online on the store:

    1.96 (31.08.2017)

    Improvements:
    - When loading XML from an external source, a local copy of the XML file is saved, so that if we lose internet access we can still use the offline version of the XML file.
    - Dynamic XML works when attached to a category object.
    - Updated documentation to cover updated topics such as the GameController and Question format.
    - Made one more pass to make sure all elements of a quiz exist in all quiz types, including image objects, sound buttons, exit button, etc

    Fixes:
    - When exporting XML, the resulting XML file should have numbered Answers, like this "Answer1, Answer2, etc".
    - SaveXML should also export Followup text for each question.
    - Auto assign answer objects also when importing XML. Previously it would only happen when running the game.
    - Limit the number of presented questions to the number of available answer objects.
    - If a quiz failed to load any questions, it should not show Victory screen..
     
    Xain likes this.
  43. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    I'm making one final update before moving on to working on version 2.0 of Trivia Quiz Game. This update will address some more user requests, but most importantly I want to try to finally do the three things I avoided all this time: In-App Purchases, Social score sharing, and a High score table.

    TQGUpdate198.png
    These will be very complicated for me to do, but I still want to try before giving up completely and moving on to the package upgrade.

    Let's see how it goes!
     
    mindfulmx and Artomiano like this.
  44. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    Hope dies last. :p
    I bought TQGT months before, but couldn't use it. So I really REALLY hope for your engagement.
     
  45. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Still doing some research into the topics mentioned above, so no update this week unfortunately.
     
    Artomiano likes this.
  46. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Had several customers ask a similar question this past week: How to put a "continue" button and let players review their answers before moving on to the next question.

    Here's a quick vid to show how to do it:


    You can also set a followup text for each question inside the question element, for example to explain something after the question. But the video above gives you a quick way to set a general followup instead of having to enter one for each question.
     
  47. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Testing a possible update which will let you choose how many correct answers are needed in order to pass a question:

     
    Artomiano likes this.
  48. Milroy

    Milroy

    Joined:
    Jun 7, 2017
    Posts:
    1
    [SOLVED]
    I want to keep the score to victory at 0,
    But after all 3 lives are gone, if the score is higher than the high score
    the victory screen appears
    if its lower than the high score game over screen will appear.
    How do I do it?
    ----------------------------------------------------------------

    TQGGameController.cs

    line 1621 to 1631

    public void Updatelives()
    {
    // Update lives only if we have a lives bar assigned
    if ( players[currentPlayer].livesBar )
    {
    // If we run out of lives, it's game over
    if (( players[currentPlayer].lives <= 0 ) && (players[currentPlayer].score < highScore)) StartCoroutine(GameOver(1));
    else if(( players[currentPlayer].lives <= 0 ) && (players[currentPlayer].score > highScore)) StartCoroutine(Victory(1));
    }

    }
     
    Last edited: Oct 18, 2017
    puppeteer likes this.
  49. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Nice implementation, so in this way the player will always need to get a higher score than before in order to win, right?
    Would love to see your final project.
     
  50. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    I was wondering if anyone still uses Unity 4 for their Trivia Quiz project?
    It would make things easier to move all updates to a higher version, especially the Unit Services parts.