Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help with trivia game~!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
crimsonsoulz




PostPosted: Tue Jan 08, 2008 2:40 pm   Post subject: Help with trivia game~!

Ok so for my grade 10 ISU we have to design a basic game using turing, Im here becasue i need a little boost
im not asking for someone to do the entire game for me, but just some help.

some info:
Well I deciced that my game would be about The Simpsons, a trivia game on The Simpsons.

I want the game to run like your basic trivia game, maybe with the simpsons theme music playing in the background.
What I need help in is how to keep track of the users score, a high score board. a title page, and how to implement a "hint" feature were the user pressess the "h" key and gets a hint about the question, but this is only ristricted to 3 hints per game.

Thanks

crimson.
Sponsor
Sponsor
Sponsor
sponsor
Randolf Nitler




PostPosted: Tue Jan 08, 2008 3:19 pm   Post subject: Re: Help with trivia game~!

for the score tracking thing, you can basically make a variable which will be called "counter: int" or something like that, and every time the player gets a answer right, you can do:
code:

counter:= counter + 1
% counter stays the same if the player gets the answer wrong

and for the hint part you can do something like this:
code:

var chars : array char of boolean
        Input.KeyDown (chars)
        if chars ('h') then
            %  display the hint
        end if
% or you can do
var: choice: string
if choice = "h" then
% display hint


Use the counter thing i showed above to keep track of the hint's, you can use an "if" statement to keep track if the player has used up their 3 hints.
Sean




PostPosted: Tue Jan 08, 2008 3:46 pm   Post subject: Re: Help with trivia game~!

crimsonsoulz @ Tue Jan 08, 2008 2:40 pm wrote:
Ok so for my grade 10 ISU we have to design a basic game using turing, Im here becasue i need a little boost
im not asking for someone to do the entire game for me, but just some help.

some info:
Well I deciced that my game would be about The Simpsons, a trivia game on The Simpsons.

I want the game to run like your basic trivia game, maybe with the simpsons theme music playing in the background.
What I need help in is how to keep track of the users score, a high score board. a title page, and how to implement a "hint" feature were the user pressess the "h" key and gets a hint about the question, but this is only ristricted to 3 hints per game.

Thanks

crimson.


For Music, search under the index for Music.PlayFile and you will find an example code I believe, that will tell you the proper way to do it. It is a process, you need to play a certain file, it's exact name and location if in a different folder, and you need to fork it outside of the process. Loops can be added if you want to repeat the song when it is finished.

So... Download the music file that you want, the Simpson Theme Song, and save it to the location of your turing file that will be using it. Name it something obvious and easy to insert instead of a long name.

For the score increasing every time a player gets it right, you will want a for loop to keep increasing to get the points above, like shown above.

Also, I would like to see the code that you are writing for your program.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: