Search Unity

[RELEASED] Trivia Quiz Game Template

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

  1. mindfulmx

    mindfulmx

    Joined:
    Mar 21, 2017
    Posts:
    42
    Hello, I just bought this nice template, and when I open it in unity get this mesage:

    "There are inconsistent line endings in the 'Assets/TQGAssets/CS_Assets/CS_Scripts/TQGGameController.cs' script. Some are Mac OS X (UNIX) and some are Windows. This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands."

    it is normal?
    how can I fixi it?
    Thanks in advance!
     
    Last edited: Mar 21, 2017
    puppeteer likes this.
  2. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    I can help you better if you can send me the project you currently have, then I'll show you how I modified the various parts and post a video here for others to see. What do you think?
     
  3. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    It's not an error, just a warning that relates to how the code lines are formatted. If it asks you to fix it automatically just press Yes, otherwise it doesn't matter for the actual execution of the code.
     
    mindfulmx likes this.
  4. mindfulmx

    mindfulmx

    Joined:
    Mar 21, 2017
    Posts:
    42
    Hello again, and thanks for your answer,
    What video format (and size) do you recomend to use as questions?
     
    puppeteer likes this.
  5. DD_DD_DD

    DD_DD_DD

    Joined:
    Feb 27, 2017
    Posts:
    4
    Hi.
    Thanks for the assistance!
    But how could i send you the project?
     
    puppeteer likes this.
  6. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    According to this answer Unity seems to work best with OGG format:

    http://answers.unity3d.com/questions/962826/best-video-format-for-smooth-playback.html

    Though I did try to work with small size MP4 videos at 640x480 for the example, which is intended for non-mobile use, and it worked fine.

    Check your private messages.
     
  7. mindfulmx

    mindfulmx

    Joined:
    Mar 21, 2017
    Posts:
    42
    Hello again,
    Im trying to hear a sound in ths closeup mode game (and see the zoomed image of course), but the sound is not played (I already assign a sound), any recomendations??
    Thanks in advance!
     
    Last edited: Mar 30, 2017
  8. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Do you want the sound to play when you zoom in on the image, or at the start when the question is asked?
     
  9. mindfulmx

    mindfulmx

    Joined:
    Mar 21, 2017
    Posts:
    42
    My idea is to play sound when the question is asked..
    (the sound to play when you zoom in on the image is a great idea too):)
     
  10. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    In order to allow the sound to be played, you need to have a sound button inside the question object. This also allows you to replay the sound by clicking on it, but you need to assign a few things to make it work.

    Take a look at this short video I recorded:



    In it I copy a sound button from another game mode and paste it in the correct place in the Closeup mode. This allows the sound to play when showing the question. After that I assign the button a function to make it play the sound again when pressed.

    Try it out!
     
    mindfulmx likes this.
  11. mindfulmx

    mindfulmx

    Joined:
    Mar 21, 2017
    Posts:
    42
    Thanks a lot for your support!
     
  12. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    I had an interesting question from a friend regarding the import of special symbols like "&" through XML. If used as is, you will get an error when trying to import a quiz with such a symbol, but there is a way around it.

    Here's a video showing what to do:



    Basically you can write each symbol in a special way in order to include it. This link contains the text you need to use for each symbol:
    https://docs.oracle.com/cd/A97336_01/buslog.102/bc4j/developing_bc_projects/obcCustomXml.htm
     
  13. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    A new update was submitted to the store, should be online within a few days.

    1.83 (13.04.2017)

    Improvements:
    - You can toggle whether to update the Dynamic XML on each load or not. This is useful when you want to change an online XML file while the game is still running.

    Fixes:
    - When exporting XML, the bonus values are always 100, and the time values are always 8. Now they correctly follow the values you set for them in the list.
    - Keyboard/Gamepad loses focus when clicking the mouse on the background UI.
    - Extra players are not removed from the results list in HotSeat mode.
     
    mindfulmx likes this.
  14. ntzeke

    ntzeke

    Joined:
    Mar 6, 2016
    Posts:
    8
    Quick question regarding XML imports for questions.

    I have my XML files. I import them with no issues. However, the questions always seem to switch back to the original stock 5 questions. I go back, reimport the XML file, and then it switches back again.

    Any ideas what I am doing wrong. (I do save after each XML import)

    If it helps it appears I get this error when importing from the console:
    The object you are trying to replace does not exist or is not a prefab.
    UnityEditor.PrefabUtility:ReplacePrefab(GameObject, Object, ReplacePrefabOptions)
    TriviaQuizGame.TQGMenu:ImportXML() (at Assets/TQGAssets/Editor/TQGMenu.cs:51)
     
    Last edited: Apr 18, 2017
    puppeteer likes this.
  15. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    I believe you may have selected the GameController inside the project view and not inside your game scene.

    TQGImportToGameController.png
     
  16. ntzeke

    ntzeke

    Joined:
    Mar 6, 2016
    Posts:
    8
    That helps for the Single Player, but for the category wheel I am still having them revert back. As soon as I import from XML (using scene: CS_GameCategoryChallenge) it gives the error I mention above.
     
  17. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Which version of Unity are you on? I want to match the settings to get the best result.
     
  18. ntzeke

    ntzeke

    Joined:
    Mar 6, 2016
    Posts:
    8
    This may be where I messed up - I have updated to 5.6.0f3
     
  19. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    I just tested it on 5.6.0f3 and it seemed to work correctly, updating and playing the quiz with the category questions. The red error always appears when you import into the project folder, it's harmless, and you can treat it like a warning that disappears when starting the game.



    There must be something else resetting the questions in your project, can you share a screenshot or a vid?
     
  20. MissMaxx

    MissMaxx

    Joined:
    Apr 21, 2017
    Posts:
    5
    Hello, I just bought this nice template...

    How to make " Quit" and "Play Again" button in the end of the game, on the CanvasVictory and CanvasGameOver.

    Give me the tutor please, thanks
     
  21. ntzeke

    ntzeke

    Joined:
    Mar 6, 2016
    Posts:
    8
    I got it figured out. Not sure what was wrong but I deleted the Categories and added them back. That seemed to fix the switching back. I really appreciate the help.

    Next up is the Word Scramble Game!
     
    puppeteer likes this.
  22. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Thanks, if you look at your game scene you can find two objects CanvasVictory and CanvasGameOver , inside each of these you can see the Quit and Restart buttons.

    You may need to press the small square button on the top right to turn these objects on.

    Take a look at the screenshot below:

    TQGQuitAndRestart.png
     
  23. MissMaxx

    MissMaxx

    Joined:
    Apr 21, 2017
    Posts:
    5
    I've tried it
    But when I click Restart button it starts from when I play the last level, game over with 0 live, not from the beginning of game
     
    puppeteer likes this.
  24. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Which version of Unity are you using, and which version of the Trivia Quiz Game do you have?
     
  25. MissMaxx

    MissMaxx

    Joined:
    Apr 21, 2017
    Posts:
    5
    Unity 5.5.2f1, and TQG 1.83
     
  26. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    If you look at the GameOver Restart button, does it look like my screenshot below?

    TQGRestartButton.png
     
  27. MissMaxx

    MissMaxx

    Joined:
    Apr 21, 2017
    Posts:
    5

    Sorry for late response...I can't online everyday :)

    1.jpg 2.jpg

    I move the button in the middle

    Then I play the game
    3.jpg
    when I click Restart button it start from the scene that I play, not from the beginning of game

    Then I'll try to Game Over
    4.jpg
    It's start from the last scene with 0 live... I want to start from the beginning of game. Then I click restart again...blank answer choice, 0 live and blank timer...and still from the last scene
    5.jpg


    Sorry for my bad english...I hope you understand about it :)

    Almost forgot...I choose CS_GamePortrait scene
     
  28. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    @UDN_0381f3
    This shouldn't happen in the portrait scene ( or any scene actually ). I just tried opening the scene, playing the game and then pressing the restart button, and it all restarts correctly with 3 lives.

    Take a look at the restart button you have in your game, does it look like my screenshot below?

    RestartButton.png
     
  29. MissMaxx

    MissMaxx

    Joined:
    Apr 21, 2017
    Posts:
    5
    I found the problem...admob plugin that I use. If I delete the plugin the game work well. But I can't fix it, I don't understand about unity :D

    Could you please update this template with admob ads (banner and interstitial)? So I don't need the plugin anymore.

    Thanks.
     
  30. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    If you send me your project with the current admob setup I can take a look to see what might cause the problem. BTW, did you try the UnityAds system? It's really easy to use, here is a short setup video I made:

     
  31. wikreate

    wikreate

    Joined:
    Apr 28, 2017
    Posts:
    10
    Hello,
    Pleaaaaaaaaaase i need your help, I bought this game in order to add new features , So i need to know how can i bring wheel categories questions from an online XML, I have a script named TQGdynamicXML.cs but it thoesn't work for me with wheel categories.
    thanks.
     
    puppeteer likes this.
  32. wikreate

    wikreate

    Joined:
    Apr 28, 2017
    Posts:
    10
    Hello,
    Pleeeease I need your help , I have to import questions from an online xml for wheel categories,
    Thanks.
     
  33. wikreate

    wikreate

    Joined:
    Apr 28, 2017
    Posts:
    10
    Please if some one have an idea about my question, i'll be very thankful.
     
  34. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Hi,
    The Dynamic XML component is used mainly to load a whole quiz from online or a local address, but I will take a look and see how it can also be attached to a category to be used in the same manner.

    So what I will try to do is implement the same functionality on the Category level.

    Stay tuned.
     
  35. wikreate

    wikreate

    Joined:
    Apr 28, 2017
    Posts:
    10
    Hello,
    Ok, thank you very much, I'm waiting for your response .
     
  36. wikreate

    wikreate

    Joined:
    Apr 28, 2017
    Posts:
    10
    Please, Mr Puppeter i really need your help i'm waiting for your answer ,i'll be very thankful if you can answer me as soon as possible
     
  37. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Hi,
    I'm making changes to the category code to allow it to accommodate the dynamic XML script. What is your deadline?
     
  38. wikreate

    wikreate

    Joined:
    Apr 28, 2017
    Posts:
    10
    Hello,
    in fact i need it for today or maximum by tomorrow
    please this is very critical situation and we really appreciate your prompt action,
    Thank you verry much.
     
  39. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    I just finished modifying the code to allow for dynamic loading per category. Please contact me through mail with your Unity version, TQG version, and invoice number so I can match it to your project.
     
  40. wikreate

    wikreate

    Joined:
    Apr 28, 2017
    Posts:
    10
    Hello ,
    thank you, I sent you an email with requested informations.
     
  41. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
  42. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Yes, it should move to the next one and not get stuck on the same one.
    Thanks for catching that, I'll take a look.
     
  43. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    I just tested a fresh download with Unity 5.6 and the wheel seems to be working properly: Starts with a random category, plays the category, then goes to the next category in the wheel.

    There could be some change in the code that caused it to be "stuck" on the same category. In your TQGCategorySelector script do you have currentCategory++; in the function StartGame() ? This is what should take you to the next category.
     
  44. roboroo

    roboroo

    Joined:
    Mar 27, 2017
    Posts:
    15
    Hi, bought your Quiz template yesterday after wasting way too many hours trying to create my own! Really great work, thankyou. A couple of questions: When using the category grid, I cannot seem to get images or sounds to work when bringing up a category containing these. After some digging I realized the game controller prefab loads the categories on afterward, so no audio object can be loaded/ played. Is there some way around it? Was also wanting different music to play on each load but still no luck wit that.
    Also, if using the base menu and selecting different game types, is there a way to carry over the scores to each game (persistent)? so there is a final tally at the end of game? Thanks
     
    Last edited: May 9, 2017
  45. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    You have some interesting ideas here, contact me through mail so we can test a few things together.

    In the text string a "\n" should break the line, so in your sentence you should have it when you want to start the next line. I believe in the XML this should be possible too.
     
  46. mindfulmx

    mindfulmx

    Joined:
    Mar 21, 2017
    Posts:
    42
    Hello!,
    When I put only 2 answer options the bonus dont work so the score is not workin neither..
    CAn you ples help!
     
  47. puppeteer

    puppeteer

    Joined:
    Sep 15, 2010
    Posts:
    1,282
    Hi,

    I just tested a quiz with two answers and it seemed to work fine with the bonus reduction. There are a few things you need to make sure with the number of answers you use. Take a look at the screenshot below for some pointers:

    TQGTwoQuestions.jpg
     
  48. Artomiano

    Artomiano

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

    a couple of questions for you:

    1. How likely is it to get an expansion for the Highscore in the foreseeable future? I am talking about the possibility to send Highscore records (including name, score and number of correct questions) to a public highscore list on my homepage (via API or XML). It would be enough if you could provide the data somehow - as records. Could not that be as similar to how the online update function for the questions? Only that the data goes in the other direction ...

      If this is not an option: What about a connection to facebook, for publishing highscores on the facebook page of my game? In this case I would suggest: https://developers.facebook.com/docs/games/services/scores-achievements?locale=en_US - for this option: Could you integrate achievements?

    2. Could you create two tutorial videos?

      Video 1: How to create a system with "coins" (or similar), that's beeing used to unlock categories.
      Example: On game start, the player is getting 100 coins to unlock 10 questions. Every finished category "pays" 10 coins. So the player can unlock a new category. (the amount of coins paid and earned should be configurable) Could you do this?

      Video 2: How to integrate UnityIAP (or SimpleIAP or similar) to create a small ingame shop. In this shop the player can buy some coin packages.
    That's all. ;)

    P.S. I purchased all of your quiz assets. I'm planning to combine all of them in one great game.
     
    Last edited: May 30, 2017
  49. karmik

    karmik

    Joined:
    Oct 8, 2014
    Posts:
    124
    Hi Puppeter
    I had to post pone my prj earlier due to other commitments. I am planing to launch in june/august.

    I wanted to know if there is a way to use this project to create a direct c# or java app to Facebook rather than deploy using webgl.

    I can host the game on a server. Thats is not a problem. Perhaps if we can use any ide to use this prj to create a web app deployment and then publish to facebook, that wpuld be great

    As webgl doesn't work with chrome and i would be missing out a huge user base because of this.

    I am sure other users also would be interested in this.

    Perhaps this will also pull more users to buy the framework :)
     
    Last edited: Jun 12, 2017
    puppeteer likes this.
  50. wikreate

    wikreate

    Joined:
    Apr 28, 2017
    Posts:
    10
    Hello every one,
    please i'm newer in unity ,I have déveloped an application i build android version and i put it in paly store ,but i'm working in new version and i need to force update automatically so that users who downloaded the application can use the new version , but i have no idea how can i do that, please if any one have a solution or advice I'll be verry thankful,
    Thank you .