Need help to make A Hangman

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Need help54321
    New Member
    • Jun 2007
    • 30

    #31
    So no one likes my mini putt idea i thought it was pritty cool

    Comment

    • nomad
      Recognized Expert Contributor
      • Mar 2007
      • 664

      #32
      Originally posted by blazedaces
      Your abilities reflect poorly on your teacher. Your misunderstandin g as to why he didn't "like the idea of hangman" only worsens his image.

      Unfortunately, I don't know the nature of this assignment, nor what goals this teacher has in teaching you java. It's only frustrating because you (and many people here) contributed much effort into procuring this project (and we barely scratched its surface. It really seemed like you could have learned a lot from the process. But now you will move on to something relatively unimportant just because the teacher might like the idea of visualizing golf balls.

      In my educated opinion mini-put stresses syntax (java visual/GUI specifics, the not-so-important step in programming) and ignores problem-solving/logic puzzles (the HOW do you do this or that, the psuedocode that is so hard for people to think up when they first start programming).

      This is the very problem with most programming-teaching guidelines in our education system today (keep in mind, this is an educated opinion of my own, feel free to disagree).

      *Stops self from going into philosophical debate on today's education system*

      Good luck with your program and sorry if I went a bit too far with this post,
      -blazed
      All well..I started some reseach on this one, that's ok, the next person that comes along and is looking for help will still get help from me on Hangman.
      Good luck with game...
      nomad

      Comment

      • DeMan
        Top Contributor
        • Nov 2006
        • 1799

        #33
        good on you, nomad!!!

        Comment

        • Need help54321
          New Member
          • Jun 2007
          • 30

          #34
          so no one can help me find a way to get em both to pop up and how to get the ball to move?

          Comment

          • blazedaces
            Contributor
            • May 2007
            • 284

            #35
            Originally posted by Need help54321
            so no one can help me find a way to get em both to pop up and how to get the ball to move?
            I don't know what you mean exactly by "pop up". Do you mean appear on the screen, the image that is? Or do you mean pop out of the hole? I don't know, confusing, sorry.

            As for getting a ball to move

            Ask yourself how you would have to draw a straight line from where it starts to where it finishes. Again, just like with the hangman advice, take this ONE STEP AT A TIME.

            Ok, trigonometry, you know how mini-put games somewhat look like (go an play one online if you don't). They let you point where you want it shot and how "hard" you want to shoot it (the position and force).

            Starting to sound like a physics problem right? So you get the position, which is really probably being represented by a distance and angle relative to some axis (sounds like a polar coordinate right?) and the force which equals mass times acceleration (mass which you specified already).

            Then ask, well, how do I make it move the way it would in the real world with this knowledge? Its acceleration,ve locity, and position would be calculations based on basic Newtonian physics right?

            Start with getting those numbers. It should allow you to calculate how far it goes, how long it's going that far, how fast it should be at any point, etc.

            Once you have that (take it in as many individual steps at a time) come back and let's think of how to make it appear as fast as it's going, etc. Alright?

            Good luck dude,

            -blazed

            Comment

            • Need help54321
              New Member
              • Jun 2007
              • 30

              #36
              Originally posted by blazedaces
              I don't know what you mean exactly by "pop up". Do you mean appear on the screen, the image that is? Or do you mean pop out of the hole? I don't know, confusing, sorry.

              As for getting a ball to move

              Ask yourself how you would have to draw a straight line from where it starts to where it finishes. Again, just like with the hangman advice, take this ONE STEP AT A TIME.

              Ok, trigonometry, you know how mini-put games somewhat look like (go an play one online if you don't). They let you point where you want it shot and how "hard" you want to shoot it (the position and force).

              Starting to sound like a physics problem right? So you get the position, which is really probably being represented by a distance and angle relative to some axis (sounds like a polar coordinate right?) and the force which equals mass times acceleration (mass which you specified already).

              Then ask, well, how do I make it move the way it would in the real world with this knowledge? Its acceleration,ve locity, and position would be calculations based on basic Newtonian physics right?

              Start with getting those numbers. It should allow you to calculate how far it goes, how long it's going that far, how fast it should be at any point, etc.

              Once you have that (take it in as many individual steps at a time) come back and let's think of how to make it appear as fast as it's going, etc. Alright?

              Good luck dude,

              -blazed


              Ok thanks alot man that is very helpfull as for what i mean by the pop up i have a picutre of a gold ball and a course when i label them both only the ball pops up if i label the course only the course pops up how do i get it so the ball appears on the start of the course?like i can only get one of em to pop up at a time even tho i label them both you no what i mean?

              Comment

              • Need help54321
                New Member
                • Jun 2007
                • 30

                #37
                i cant figure out how to get the gold ball to appear on the golf course only one image pops up lol if anyone nos what i mean please post a way to get the ball on the course thanks


                import javax.swing.*;
                import java.awt.*;
                public class FristPanel
                {
                public static void main(String args [])
                {
                JFrame jf1 = new JFrame("This Is the First Frame");
                JLabel lbl1 = new JLabel();
                JLabel lbl2 = new JLabel();
                jf1.setSize(500 ,500);
                Container c = jf1.getContentP ane();



                ImageIcon icon = new ImageIcon("Golf .jpg");
                lbl1.setIcon(ic on);

                c.add(lbl1);

                ImageIcon icon2 = new ImageIcon("golf ball.jpg");
                lbl2.setIcon(ic on2);

                c.add(lbl2);

                jf1.setVisible( true);

                }
                }

                Comment

                • blazedaces
                  Contributor
                  • May 2007
                  • 284

                  #38
                  Originally posted by Need help54321
                  i cant figure out how to get the gold ball to appear on the golf course only one image pops up lol if anyone nos what i mean please post a way to get the ball on the course thanks


                  import javax.swing.*;
                  import java.awt.*;
                  public class FristPanel
                  {
                  public static void main(String args [])
                  {
                  JFrame jf1 = new JFrame("This Is the First Frame");
                  JLabel lbl1 = new JLabel();
                  JLabel lbl2 = new JLabel();
                  jf1.setSize(500 ,500);
                  Container c = jf1.getContentP ane();



                  ImageIcon icon = new ImageIcon("Golf .jpg");
                  lbl1.setIcon(ic on);

                  c.add(lbl1);

                  ImageIcon icon2 = new ImageIcon("golf ball.jpg");
                  lbl2.setIcon(ic on2);

                  c.add(lbl2);

                  jf1.setVisible( true);

                  }
                  }
                  Here, take a look at this: http://java.sun.com/docs/books/tutor...ents/icon.html

                  It literally explains how to put multiple icons on the frame.

                  Good luck man,

                  -blazed

                  Comment

                  • Need help54321
                    New Member
                    • Jun 2007
                    • 30

                    #39
                    Originally posted by blazedaces
                    Here, take a look at this: http://java.sun.com/docs/books/tutor...ents/icon.html

                    It literally explains how to put multiple icons on the frame.

                    Good luck man,

                    -blazed

                    there using imageicons tho im useing Jlabels? arnt i?

                    Comment

                    • blazedaces
                      Contributor
                      • May 2007
                      • 284

                      #40
                      Originally posted by Need help54321
                      there using imageicons tho im useing Jlabels? arnt i?
                      Look, did you do it or not? Just please try doing the entire tutorial. Then after that, try doing some that relate.

                      After that come back ok...

                      -blazed

                      Comment

                      • Need help54321
                        New Member
                        • Jun 2007
                        • 30

                        #41
                        Originally posted by blazedaces
                        Look, did you do it or not? Just please try doing the entire tutorial. Then after that, try doing some that relate.

                        After that come back ok...

                        -blazed

                        lol i Cant figure it out i read it all tryed to do it in my project not working out tho
                        so im back with this

                        import javax.swing.*;
                        import java.awt.*;
                        public class FristPanel
                        {
                        public static void main(String args [])
                        {
                        JFrame jf1 = new JFrame("This Is the First Frame");
                        JLabel lbl1 = new JLabel();
                        JLabel lbl2 = new JLabel();


                        jf1.setSize(500 ,500);
                        Container c = jf1.getContentP ane();


                        ImageIcon icon = new ImageIcon("Golf .jpg");
                        lbl1.setIcon(ic on);

                        c.add(lbl1);

                        ImageIcon icon2 = new ImageIcon("golf ball.jpg");
                        lbl2.setIcon(ic on2);



                        c.add(lbl2);
                        c.add(lbl1);

                        jf1.setVisible( true);



                        }
                        }


                        I just need the golf ball to pop up on the course i got the ball where i want it to pop up but now the course wont pop up in back can u try loading that code so u get a idea of what i mean maybe u will no the problem
                        Ps; the gold course is just a rectangle for now i want to make a course thats just stright then move up

                        Comment

                        • Need help54321
                          New Member
                          • Jun 2007
                          • 30

                          #42
                          Like i no its just a simple thing i need to add i just cant figure out what and i need it for tommoro cause its half of its due so im kind of pannincing lol

                          Comment

                          • blazedaces
                            Contributor
                            • May 2007
                            • 284

                            #43
                            Originally posted by Need help54321
                            lol i Cant figure it out i read it all tryed to do it in my project not working out tho
                            so im back with this
                            Ok, sorry, I'm trying to be patient as best I can. I hope I don't let myself go too far again.

                            Listen, when you go to use a tutorial to help you out with something that is not working, what do you do? You read it, right? You know that the tutorial is the absolute correct way of doing things, so go through the following conversation style in your head:

                            I know the tutorial is right and I know that I'm wrong. Therefore, we must be different.

                            So... what is different?! Of course, the difference, that must be what I should look for.

                            Now, if I can understand that difference then I will understand why my way is incorrect.

                            Try again please, I want you to learn how to do this yourself because this process is a very large part in programming and becoming a good programmer.

                            Good luck,

                            -blazed

                            Comment

                            • Need help54321
                              New Member
                              • Jun 2007
                              • 30

                              #44
                              Yea but when i do it how they say i get loads of errors and i cant figure them out at all thats my problem but the way im doing it i just need a line of code that will let the other image go on the screen thats what one of my buds told me but we dont no what to add that will allow it to

                              Comment

                              • blazedaces
                                Contributor
                                • May 2007
                                • 284

                                #45
                                Originally posted by Need help54321
                                Yea but when i do it how they say i get loads of errors and i cant figure them out at all thats my problem but the way im doing it i just need a line of code that will let the other image go on the screen thats what one of my buds told me but we dont no what to add that will allow it to
                                Figuring out those errors will make that line of code all but obvious. It's part of the process. What errors are you getting?

                                -blazed

                                Comment

                                Working...