Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 6    Views: 104

fredd648
Apple Fan
Profile
Posts: 14
Reg: May 11, 2013
waterloo
3,940
05/23/13 08:11 AM (12 years ago)

Trivia Quiz Customizing

hello everyone, I want to create a trivia game for my app, and the way I want it to work is to for the trivia game to have different rounds and after each round you get a reward. Since, this is not possible using just 1 screen of the trivia game, I thought of creating several screens of the game and linking them together so after the first round is finished (1 trivia game screen), the next round would be a new session of another trivia game screen and so on. My 2 questions are the following: 1- I wanted to modify the home screen of the game to change the "Start quiz" to "Round 1", and I know this is possible in the BT_screen_quiz.m, however when you have you have more than 1 screen for the trivia game, any changes you make will be applied to all the screens of the game. I though of creating an if statement where the name of the button is applied and referring to the ItemID of that specific screen, but I don't know if this would work? 2- I would also like to keep track of the total score of each round (each trivia game screen) and adding them up with all the scores from each round to display at the game of the whole game... but once again whatever I modify in the BT_screen_quiz.m will be for all instances of this screen in my app. Does anyone have any suggestions? Thanks in advance for any help you can provide me Fredd
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/23/13 10:39 AM (12 years ago)
Hi fredd648, this doesn't immediately address your question, but the easiest no-coding way is to go down the self-hosted route and simply clone the quiz plugin for however many levels you need. The 'reward' screen goes to the next level. I'm an Android user and it's a simple mod to store the score in a shared preference and pass it to the next quiz to accumulate the score, I should imagine someone will have an equally straightforward apple solution.
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
05/24/13 12:13 PM (12 years ago)
Hey fredd Have you made any progress on this? It looks like you definitely have the right idea...the if statement with the ItemID should work perfect the line of code with the "Start Quiz" text can be found in BT_screen_quiz.m on line 194
 
fredd648
Apple Fan
Profile
Posts: 14
Reg: May 11, 2013
waterloo
3,940
like
05/28/13 01:10 PM (12 years ago)
Thanks for the reply. @raveyd: I tried something similar without going down the self hosted route. I added "another" quiz plug-in to xcode and changed the name of it. I also renamed all the images/mp3 inside of the new plugin, and it gives me no errors, until I run the simulator and I can't open the app. Do you have your app self-hosted? I have read a few things about this, but you have to pay for the service, correct? @Absentia: I tried in lines 1241 and below where the reward screen title is set, but xcode gave me an error. Have you tried this before? Thanks to both
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/28/13 01:31 PM (12 years ago)
Hi @fredd648, you could do it that way (I think), but you'd also need to add all the data for that new plugin to the BT_config.txt file, in JSON format , to tell the plugin what to do. I haven't tried doing that, but I'm sure it's possible. Someone else could tell you for sure if you make a new post (this one is now as good as lost in the forum!) If you were to have a go at self-hosted it'll open up a whole new world! It's pretty straightforward to clone a plugin and do what you want. Sure, you have to pay for the service but it could pay for itself within weeks or less. Compared to other builders (and I've tried a few) it's a steal at the price.
 
fredd648
Apple Fan
Profile
Posts: 14
Reg: May 11, 2013
waterloo
3,940
like
05/28/13 01:53 PM (12 years ago)
Thanks for the reply raveyd! I will get more information and make another post in the next few days. But this is the reply to your question: Yes, I changed the itemtype name to the name of the folder I have dragged into xcode, so the new plugin now is called: bt_screen_quiz1 and I also made the changed in the bt_config.txt as follows {"itemId":"4001346D3FACC492E30369C", "itemType":"BT_screen_quiz1",................... However, this is the error I was getting when building the app in the simulator: clang: error: linker command failed with exit code 1 (use -v to see invocation) ps. what self hosted server are you using? I was looking at the one you can install in your on website/server... but is this secured? You have to add some .php scripts so I don't know about the vulnerability to adding this service. Thanks again
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
05/28/13 02:05 PM (12 years ago)
Sorry mate, I can't really help with the bt_config stuff. I think @SmugWimp has a good knowledge of manipulating JSON, also @Stobe in admin. There's at least the itemId, screenID, and child items you'll need to build. Self-hosting - I use Hostgator shared hosting, support is great and they'll help you secure the install if you ask - https is an option. Also, MrDavid at buzztouchmods.com offers dedicated bt server hosting/installation, he's a good guy and I've read his service is first class at a fair price.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.