Making a trivia game.

I was looking at making a sports trivia java game. I want to make it so it starts with 20 seconds and goes down and the faster you answer it the seconds left equals how many points you get. Does anyone have any left over code or a similar style of game? I won't be putting it online or anything I am just making it for a friend and thats it so no real code stealing and making profit or anything. So can you please help me?
Thanks

SomethingCool wrote:
I have all the questions and everything done. I just need help getting started on the actual game.
Thanks"Help getting started" is very different from "a tutorial that has exactly what to do". So which do you want? The code so you can re-type it yourself? Or the basic concepts and techniques so you can actually create code yourself?

Similar Messages

  • Trivia Game: Error while testing CS3 app in CS4

    I have been attempting to test an exercise file for a Trivia
    Game written in AS3 using the Flash CS3 IDE.
    Unfotunately I have been receiving two errors each time its
    run while using Flash Professional CS4.:
    <ol>
    <li><strong> 1023: Incompatible override.
    </strong></li>
    <li><strong> 1021: Duplicate function
    definition.</strong></li>
    </ol>
    each of these errors occur on the same line:
    <ul>
    <li> <strong>public function showScore()
    {</strong></li>
    </ul>
    Can anyone help? The code and every

    It appears that showScore is some sort of reserved word in
    CS4 or one of the CS4 libraries. Just change every showScore in the
    code to something else like showGameScore and it should
    work.

  • Trivia game that does NOT require data

    looking for a trivia game that does not require an Internet connection. We are going camping and like to play a trivia game around the camp fire, but there is no cell service or data or wifi. We have used Mr Trivia for the last couple years but have ran out of new questions. Looking for something simular in function. Most of what I've tryed does not funtion without running data.
    ipad, iphone or pod (mutiple generations)
    thanks

    dalewren wrote:
    Are there any carriers that allow this?
    Not that I'm aware of. In fact, many carriers, if they detect an iPhone on their network without a data plan, will either bill you for such or cancel your service.

  • Scoring in a trivia game

    I'm putting together a flash trivia game. I want the score to
    be revealed only after all the questions have been answered.
    Something like this:
    1-5 right, try again
    10+ right, good job
    15+ you're getting better
    20+ you're a master
    So, I need some script to remember the score, and keep it
    hidden, and count the right answers and reveal them at the end.
    Can someone help me with this?
    I'm kinda new to action scripting

    To be able to play existing sounds fragments and play generated tones you can use the Mobile Media API (MMAPI). Check whether your target JVM implementation supports MMAPI.
    To be able to play a certain tone you could use something like this:
    (check the API specification of the 'javax.microedition.media' package)
    Manager.playTone(int note, int duration, int volume)
    That should do the trick.
    Jasper

  • Simple Trivia game

    I am attempting to design a very simple trivia game. It needs to include if and for statements. Can anyone link me to a place they know of that shows me how?

    pastramigod wrote:
    More of how to incorporate it into a trivia game.There's no specific instructions for this that I know of. You're just going to have to play and experiment with your code. In fact, I recommend that you play and experiment with your code, because even if you don't get a decent game running, you are sure to learn a lot. Please come back with your code samples if you run into problems.

  • Music trivia game error message

    i'm having problems accessing my music trivia game. it worked when i got the ipod last week, but now that i've used it a bit, whenever i go to play my music trivia, "no songs found, error" appears on my screen. does anyone know why? is there some way i can fix it? i have only deleted a couple of songs and added a whole album (18 songs) but that's the extent of the changes i've made with the nano. any help would be appreciated
    thanks
    PC   Windows XP   Sony

    If I reset the iPod, that means all the songs will be deleted too, right? I'm still a little unclear with all these 5 R's thrown into the mix every which way!
    Thanks

  • Basic Trivia Game

    I am looking to make a trivia game as a special feature on my dvd for my kids...1 trivia game per each kid 10 questions each...After each question a track is going to with them saying YAY or NO and then it proceeds to the next question....The questions do not need to be in random order....infact id prefer they are not...also id like at the end of the quiz for a menu to say how many they got right out of how many....i have developed a way to do this however it involves using over a hundred menu's and tracks with different end jumps...i do not know anyhting about scripting but i am willing to use it if someone lays it out for me....im using DVDSP4.....and ideas?

    Do a quick search using the "more options" and search last year, just put the word "trivia" in the DVD SP forum and there are many threads. I think some of them had some details and point to projects files

  • Need a little help with a trivia game

    Hey guys I was wondering if I could get some help. I'm taking a class at school for java programming and its my first class. And I have to do a final assignment, which is to make a java trivia game. I have all the parts coded already pretty sure. Now be forewarned that I'm not "that" great at programming.
    But the part that I'm stuck on and cant really get any help on is this: For the game I need to have a file with all the questions and answers, which is created already and works. The file writer has the question, choice 1, choice 2, choice 3, choice 4 and the answer written to it, in that order. We needed to implement a GUI and I coded that as a message label on top where the question will go, in the middle 4 radio buttons where the choices to the answer will go and on the bottom a next question, ok and quit button.
    My question is this: How do I pull the information from the file that was written to appear in the GUI, such as the question and the choices for the answers for the question? ANY and ALL help would be appreciated

    Read the information using a BufferedReader wrapped around a FileReader. Change your GUI using setText on the component you want to display the text.
    Edit: An example that does both things
    import java.io.*;
    import javax.swing.*;
    public class FileAndSwing {
       public static void main(String[] args) throws Exception {
          BufferedReader reader = new BufferedReader(
                new FileReader("FileAndSwing.java"));
          StringBuilder builder = new StringBuilder();
          for ( String line = null; (line = reader.readLine()) != null; ) {
             builder.append(line).append("\n");
          JFrame frame = new JFrame("FileAndSwing.java");
          frame.setSize(500, 500);
          JTextArea field = new JTextArea();
          frame.add(field);
          field.setText(builder.toString());
          frame.setVisible(true);
    }This is also kind of a Quine :-).
    Edited by: endasil on 15-Dec-2009 4:00 PM

  • Making a multiplayer game

    I am planning on making a multiplayer game, but the thing is
    i have never made one before. I can use java with flash if that
    helps. Does anyone know a tutorials i can use to help me learn.
    Thank You

    use google to search for tutorials.

  • Trivia game app with real money

    hi,
    i`m working on a trivia game app that involves a tournament with money prizes.
    i haven`t been able to understand what`s allowed to do under the apple guidlines concerning possible means of payment for credits to the tournament.
    1 - can i use In App Purchase to allow the players to buy credits for the tournament where they can win money?
    2 - can i have a native page allowing them to buy credits to the tournament using credit card or paypal? if not can i open a browser asking them for their credit card\paypal?
    Thanks!
    Ido

    Because the game is only 99 cents? It shouldn't matter, itunes is getting money either way, I already paid for the card and redeemed it to my account. How ridiculous.

  • Having problem making purchases in game? Credit Card set up and previously made many purchases.

    Having problem making purchases in game? Credit Card set up and previously made many purchases.

    What happens when you try to buy them, does the 'buy' button not work, do you get any error messages ... ?
    If you are getting a message to contact iTunes Support then you can do so via this link and ask them for help (we are fellow users here on these forums, we won't know why the message is appearing) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    If it's a different problem ... ?

  • CS4 coding - trivia game

    I'm coding a question-and-answer type of game for a class of mine. Even thought I have CS4, I'm using ActionScript 2.0. The game has five categories. Each category has a button in Scene II that takes the player to another scene (Button A to Scene III, Button B to to Scene IV, etc). Once you get to the scene, a box (made a button so you can click it) with a question fades in. When you click it, the question fades out and the answer fades in. Clicking it again loops back to the beginning of the fading tween.
    What I need help with is finding a way to make it so each time the player clicks a category, they'll be taken to the next question in line. So the first time the player clicks Category A, they'll be taken to Question/Answer 1A. The second time they click Category A, they'll be taken to Question/Answer 2A. And so on and so forth.
    Also, is there a way to do this simply without having to make every individual Question/Answer button? I have over 100 questions and I don't know how well my program will be functioning with that many things to load.

    You will have to rethink your approach in order to simplify that game.  Using scenes the way you are will be hard to manage, and using scenes with navigation is not a reliable design approach when it comes to Flash, they just don't work reliably.  You can easly design this whole thing is just one frame if the timeline if you think thru it.
    Your game design should not be based on creating individual questions/answers movieclips that you have to manage on the timeline.  What you should think about is how to go about making it so that your questions and answers are just data that you store in variables (like an array).  You just pull the data sequentially from the array as you progress thru the game.  Later on, you could have the questions/arrays fed into the file dynamically using an xml file or a database.
    The vehicle for presenting the question / answer sets could be designed as just one movieclip with a dynamic textfield that you assign the text for each new question /  answer to using code.  Try to think how to design a movieclip that does all of what you described as far as the buttons and whatnot that you can use over and over again, just the one instance of it.  You go thru a question / answer set , click a button, and that same movieclip is re-used, where the next question / answer replace the last ones.
    It might seem like a lotta work, even just learning how to do it, but I'd be willing to bet it will take you alot less time to do than creating maybe 10 or 20 questions the way you are proceeding now.

  • Points and discussion about the concepts behind making a 2D game

    Hi all. I'm currently trying my hand at a 2D RPG style game. I have a few questions open for discussion, however, regarding the general points of implementation behind it.
    1. Tiles vs static background argument aside, am I right in the thinking the best way of implementing movement across a big background map is actually to move the background and other sprites in relation to the player, giving the illusion of player movement although he in fact never moves from the center of the screen? Is there a way of actually creating a large map, populating it with sprites, and then moving the player across it and panning the screen after him?
    2. Collision detection. If we go with the idea of moving everything in relation to the player rather than the player himself, woudln't this mean a large amount of calculations when collision detection occurs. Example, u want the player to stop moving when he hits a brick wall so you have to tell every entity sprite to stop moving in response to key presses (because remember, pressing up moves everything else up, not the player character).
    3. Isometric. Is the easiest way of implementing an isometric style game just to develop isometric graphics and sprites?
    4. Tiles. I've been doing a lot of reading into tiles but I'm not sure what's a better implementation: a tile system which consists of the entire background and things like houses split into tiles or a simple big background which can be scrolled around and is populated by house sprites which are all moved in relation to the player and their collision detections done individually. Tiles certainly seem like a nice innovation but I feel like the graphics suffer as a consequence and u end up with a 8bit NES looking game!
    I'm just getting to grips with the concepts behind a lot of game design and all of this are some interesting points which I thought would be insightful to discuss. Opinions please!
    Cheers.

    Everything I'm about to say is based off of a tile-based Maze game I made.
    1. Using a big background map is a bit lazy if you ask me, but graphically it would be easier to create a nice-looking game. You also have to think about memory. Let's say you manage to get an 800x600 background image at the size of 200kb with JPEG compression. That 200kb jpg image you use as a background is not 200kb when loaded into memory. I dont remember exactly how much bigger it gets in memory, so this next statement is probably wrong. But I heard that: 4bytes per pixel for the ARGB data, and there are 800x600 (480,000) pixels. That's 480000*4 (1920000) bytes if that statement is right. But it's probably wrong, so hopefully Abuse or someone will correct it :)
    2. Move EVERYTHING up? I think you're a little mixed up. When the background (and all objects with it) is scrolled, their actual X,Y data is not changed. It is simply drawn according to the scroll offset. The only thing that is being calclulated for movement is the character/scroll offset. Think of it as a camera. The entire world is not moving, just the location of where you're viewing it. Quick example:
    You have a Tree who's location is (10,10). If the scroll offset is (0,0), then that Tree will be drawn at (10,10). But let's say your character moves up 5 pixels. You say you want him centered, so the scroll offset also moves up 5 pixels, making the offset (0,-5). When it's time to draw again, that Tree can't be at the same place it was, because the character moved. If the character moved up, the Tree would appear as if it moved DOWN. So you'd draw it like:
    g.drawImage(tree.getImage(),tree.x-scrollOffsetX,tree.y-scrollOffsetY,null);With that math, the Tree is actually drawn at (10,15), which is lower than before the character moved. You don't actually loop through all of your objects and change each and every X and Y value, you just change the global scroll offset
    Speaking of collision detection, this is where TileMaps have a large advantage. In a TileMap, you don't have to check through each and every object in the world for collision. You can just grab the 4 surrounding tiles (north,west,east,south) from the Tile array. This means there are only 4 collision detections no matter where the character is in any situation on the map.
    If you used an image for background instead of tiles, you'd have to check each object in the world for collision because it's harder to tell how close it is to the character. One thing you could do is just grab all of the object currently visible on screen and check their collision, but, depending on where you are on the map, this could easily cause an inconsistent frame rate (you could be in a field of grass that has no collision or a forest of 50 trees each screen- LOTS of collision!).
    3. I dont got much to say about isometric :P
    4. an 8bit NES game, eh? That is the common misconception that you have to use images that are the same size of the tiles. Have you seen the game "The Legend of Zelda: Four Swords"? That's a tile-based game, but on several occasions you see trees that are 10 times bigger than the 20x20 tiles. They mixed it up, they used a TileMap for the basic ground, and put good looking large images on top. The large images (such as a large tree) uses 4 or 5 "base" tiles that are used for collision. That way the character will only collide with the bottom-half of the tree, giving the appearance of going "behind" the tree when the Y value is above the middle line of the tree. This is far away from looking like an 8bit NES game :)
    I hope that was more helpful than it was confusing, but I tend to babble, so.. anyway. Hope it helps :o

  • TS1368 A message says can not conect to the iTunes Store when trying to download and making purchases inside games. How do I fix this?

    I'm playing clash of the clans and I'm not able to download gems. It keeps saying unable to connect to iTunes whenever I press buy....

    Hey there Aliship,
    It sounds like you are unable to purchase in game items. I would check the Passcode Restrictions to see if in app purchases have been disabled. I would use this article to help you check that:
    iOS: Understanding Restrictions (parental controls)
    http://support.apple.com/kb/ht4213
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling

  • Question - making rummy card game applet

    Hi, I am not sure if this is the right place to be putting this, if not please let me know. I'm trying to make an applet for the card game rummy for my final project for school. I was wondering if I could get some help on how to load a card image from a file and randomizing the images for the deal button or if not that then I am also trying a much simpler way due to time constraints. I was trying to make two arrays of strings: one for the facevalue of the card and another for the suit value, then randomize those and draw a string to the correct places for the dealt hand. I can't seem to get this to work well so far. Any help is greatly appreciated. Here is the code for the basic gui that I have now.
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    import java.util.Random;
    import java.lang.*;
    public class CardGame extends Applet implements ActionListener {
         Button Deal;
         Button NewGame;
         Button PutDown;
         Color bgColor;
         Color rectColor;
         Image deck;
         MediaTracker mt;
         CheckboxGroup radioGroup;
         Checkbox radio1;
         Checkbox radio2;
         Checkbox radio3;
         Checkbox radio4;
         Checkbox radio5;
         Checkbox radio6;
         Checkbox radio7;
    **Its hard to tell but the arrays are commented out for now.     
         //String[] faceValue = {"ACE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "TEN", "JACK", "QUEEN", "KING"};
    //     String[] suitValue = {"CLUBS", "HEARTS", "SPADES", "DIAMONDS"};
         public void init()
              setLayout(null);
              mt = new MediaTracker(this);
              Deal = new Button("Deal");
              NewGame = new Button("New Game");
              PutDown = new Button("Put Down");
              Deal.setBounds(750, 450, 75, 25);
              NewGame.setBounds(750, 475, 75, 25);
              PutDown.setBounds(750, 425, 75, 25);
              add(Deal);
              add(NewGame);
              add(PutDown);
              Deal.addActionListener(this);
              NewGame.addActionListener(this);
              PutDown.addActionListener(this);
              radioGroup = new CheckboxGroup();
              radio1 = new Checkbox(" ", radioGroup, false);
              radio2 = new Checkbox(" ", radioGroup, false);
              radio3 = new Checkbox(" ", radioGroup, false);
              radio4 = new Checkbox(" ", radioGroup, false);
              radio5 = new Checkbox(" ", radioGroup, false);
              radio6 = new Checkbox(" ", radioGroup, false);
              radio7 = new Checkbox(" ", radioGroup, false);
              add(radio1);
              add(radio2);
              add(radio3);
              add(radio4);
              add(radio5);
              add(radio6);
              add(radio7);
              radio1.setBounds(143, 525, 10, 10);
              radio2.setBounds(222, 525, 10, 10);
              radio3.setBounds(301, 525, 10, 10);
              radio4.setBounds(380, 525, 10, 10);
              radio5.setBounds(459, 525, 10, 10);
              radio6.setBounds(538, 525, 10, 10);
              radio7.setBounds(617, 525, 10, 10);
         public void Randomize()
              //this is where I need the help mostly.
         public void Stop()
         public void actionPerformed(ActionEvent evt)
         if (evt.getSource()== Deal)
                   setBackground(Color.green); //test
              else
                   Deal.setLabel("Not there, here!"); //another test
         if(radio1.getState())
                   setBackground(Color.blue); //just a test to make sure I know how to use the radio buttons
         public void paint(Graphics g) {
              g.drawString("Welcome to Rummy!!", 300, 50 );
              g.drawRect(100, 100, 600, 440);
              g.drawRect(110, 420, 75, 100);
              g.drawRect(190, 420, 75, 100);
              g.drawRect(270, 420, 75, 100);
              g.drawRect(350, 420, 75, 100);
              g.drawRect(430, 420, 75, 100);
              g.drawRect(510, 420, 75, 100);
              g.drawRect(590, 420, 75, 100);
              g.drawRect(110, 120, 75, 100);
              g.drawRect(190, 120, 75, 100);
              g.drawRect(270, 120, 75, 100);
              g.drawRect(350, 120, 75, 100);
              g.drawRect(430, 120, 75, 100);
              g.drawRect(510, 120, 75, 100);
              g.drawRect(590, 120, 75, 100);
              g.drawRect(300, 250, 75, 100);
              g.drawRect(380, 250, 75, 100);
              g.drawString("A S", 220, 445);
    }

    thanks for that...could I use something like this for the playing card class though:
    public class Card {
    public final static int SPADES = 0, // Codes for the 4 suits.
    HEARTS = 1,
    DIAMONDS = 2,
    CLUBS = 3;
    public final static int ACE = 1, // Codes for the non-numeric cards.
    JACK = 11, // Cards 2 through 10 have their
    QUEEN = 12, // numerical values for their codes.
    KING = 13;
    private final int suit; // The suit of this card, one of the constants
    // SPADES, HEARTS, DIAMONDS, CLUBS.
    private final int value; // The value of this card, from 1 to 11.
    public Card(int theValue, int theSuit) {
    // Construct a card with the specified value and suit.
    // Value must be between 1 and 13. Suit must be between
    // 0 and 3. If the parameters are outside these ranges,
    // the constructed card object will be invalid.
    value = theValue;
    suit = theSuit;
    public int getSuit() {
    // Return the int that codes for this card's suit.
    return suit;
    public int getValue() {
    // Return the int that codes for this card's value.
    return value;
    public String getSuitAsString() {
    // Return a String representing the card's suit.
    // (If the card's suit is invalid, "??" is returned.)
    switch ( suit ) {
    case SPADES: return "Spades";
    case HEARTS: return "Hearts";
    case DIAMONDS: return "Diamonds";
    case CLUBS: return "Clubs";
    default: return "??";
    public String getValueAsString() {
    // Return a String representing the card's value.
    // If the card's value is invalid, "??" is returned.
    switch ( value ) {
    case 1: return "Ace";
    case 2: return "2";
    case 3: return "3";
    case 4: return "4";
    case 5: return "5";
    case 6: return "6";
    case 7: return "7";
    case 8: return "8";
    case 9: return "9";
    case 10: return "10";
    case 11: return "Jack";
    case 12: return "Queen";
    case 13: return "King";
    default: return "??";
    public String toString() {
    // Return a String representation of this card, such as
    // "10 of Hearts" or "Queen of Spades".
    return getValueAsString() + " of " + getSuitAsString();
    } // end class Card
    except now how would I make something like this random I know theres a bunch of work before that, but just curious. Thanks

Maybe you are looking for