canasia.org

 
  • Narrow screen resolution
  • Wide screen resolution
  • Increase font size
  • Decrease font size
  • Default font size
  • default color
  • dark color
  • red color
Forums
Welcome, Guest
Please Login or Register.    Lost Password?
basic football basic football game (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: basic football basic football game
#2529
basic football basic football game  
football game can't be done in an _applet_ form.  The game has to simulate traffic (e.g. there are constraints on the motion of the _object_s and The idea is not only to avoid collisions, but also to adapt one motion to another.  I'm wondering if someone has created a basic football game or if someone can give me a site where to find some good information on this subject.   We are wanting the football game to be as close as possible to a real football game.  Where the user would be able to control the p_layer_ that has the football, but I think we are going to start out only being able to control the QB.  And before each play, the user will use radio buttons to choose a Run (left or right) play or Pass(left or right) play.   Thanks for any help you can give me!! Do you by any chance go to Full Sail? A friend of a friend of mine was in the game design and development program there, and he had a very similar project. If so, how do you like it? The guy I spoke to said it was really intense. EVT
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2530
Andy (Visitor)
Click here to see the profile of this user
Birthdate:
basic football basic football game  

Do you by any chance go to Full Sail? A friend of a friend of mine was in the game design and development program there, and he had a very similar project. If so, how do you like it? The guy I spoke to said it was really intense. EVT
I go to mizzou, and I haven't yet taken any game design classes.  In a couple semesters though. Can anyone tell me why I can't move the QB?  I doesn't even enter the class KeyHandler public class MyPanel extends JPanel{                 KeyEvent evt;                 Toolkit tk1 = Toolkit.getDefaultToolkit();                 Image QBp_layer_ = tk1.getImage( QB.gif );                 private P_layer_[] offense;                 private P_layer_[] defense;                 public MyPanel(){                     KeyHandler listener = new KeyHandler();                      addKeyListener(listener);                 System.out.println( listener + listener);                 setBackground(Color.green);                     }   //displaying the football p_layer_ and transfering the info passed to offense  public void display (P_layer_[] footballp_layer_) {offense = footballp_layer_; repaint();}                 public void paintComponent (Graphics g) {                         super.paintComponent(g);                         paintP_layer_s(g,offense[0]);                     } //paintComponent //painting the p_layer_s image         public void paintP_layer_s(Graphics g,P_layer_ FBp_layer_){                 if(FBp_layer_ instanceof Q{                  g.drawImage(QBp_layer_,FBp_layer_.x,FBp_layer_.y,this);                 // System.out.println( drawimage );                                         }                                 } //TO MOVE THE QB          public class KeyHandler implements KeyListener{                     //To move the QB               System.out.println( Entered KeyHandler );                 public void keyPressed(KeyEvent evt){                    int x=1;                    int y=1;                    int ofx, ofy;                //offense[0] is the QB                    ofx = offense[0].getX();                    ofy = offense[0].getY();           if(evt.getKeyCode()==KeyEvent.VK_LEFT){ofx=ofx+x; offense[0].x=ofx;}         if(evt.getKeyCode()==KeyEvent.VK_RIGHT){ofx=ofx-x; offense[0].x=ofx;}         if(evt.getKeyCode()==KeyEvent.VK_UP){ofx=ofx-y; offense[0].y=ofy;}         if(evt.getKeyCode()==KeyEvent.VK_DOWN){ofx=ofx+y; offense[0].y=ofy;}                         }                         public void keyReleased(KeyEvent evt){}                         public void keyTyped(KeyEvent evt){}                           public boolean isFocusTraversable(){return true;}             }//KeyHandler             }//MyPanel Thanks for any help!
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2531
Andy (Visitor)
Click here to see the profile of this user
Birthdate:
basic football basic football game  
I got it to work, thanks
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2532
Andy (Visitor)
Click here to see the profile of this user
Birthdate:
basic football basic football game  
Can anyone help me with adding a Button to my project here is my code.  I don't understand why it is working for KeyListener but not for ActionListener         public class MyPanel extends JPanel implements KeyListener,ActionListener{                 KeyEvent evt;                 KeyEvent evt2;                 Toolkit tk1 = Toolkit.getDefaultToolkit();                 Image QBp_layer_ = tk1.getImage( QB.gif );                 Image oline = tk1.getImage( oline.gif );                 Image dline = tk1.getImage( dline.gif );                 Image Dp_layer_s = tk1.getImage( OtherDp_layer_s.GIF );                 Image Op_layer_s = tk1.getImage( OtherOp_layer_s.GIF );                 Image ball = tk1.getImage( ball.gif );                 Image field = tk1.getImage( FBfield.gif );                 private P_layer_[] Allp_layer_s;                 private P_layer_[] Of;                 private P_layer_[] Df;                                 private JButton startButton;                                 private JButton restartButton;                                 private JButton endButton;                                 private JButton pauseButton;                 public MyPanel(){                     setBackground(Color.green);                         Button startButton=new Button( Start );                         Button restartButton=new Button( Restart );                         Button endButton=new Button( End Game );                         Button pauseButton=new Button( Pause );                 JPanel panel2=new JPanel();                 Container contentPane2=_frame_.getContentPane();                 contentPane2.add(panel2,BorderLayout.NORTH);                         panel2.add(startButton);                         panel2.add(pauseButton);                         panel2.add(restartButton);                         panel2.add(endButton);                         _frame_.show();                         startButton.addActionListener(this);                         pauseButton.addActionListener(this);                         restartButton.addActionListener(this);                         endButton.addActionListener(this);                         addKeyListener(this);                     }//MyPanel()         public void actionPerformed(ActionEvent evt2){         _object_ source = evt2.getSource();         if(source==pauseButton){System.out.println( PAUSE );}         if(source==startButton){System.out.println( START );}         if(source==restartButton){System.out.println( RESTART );}         if(source==endButton){System.out.println( END GAME );}                                         }                               public void keyPressed(KeyEvent evt){                         int x=1;                         int y=1;                         int ofx, ofy;                         ofx = Allp_layer_s[1].getX();                         ofy = Allp_layer_s[1].getY();   //and I have lots of more code Thanks for any help
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2533
Carl G. (Visitor)
Click here to see the profile of this user
Birthdate:
basic football basic football game  
startButton=new JButton( Start ); restartButton=new JButton( Restart ); endButton=new JButton( End Game ); pauseButton=new JButton( Pause ); Carl G.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#2534
Andy (Visitor)
Click here to see the profile of this user
Birthdate:
basic football basic football game  
Thanks! that worked. sorry to keep asking questions! I have another question.  I have 2 panels one for the buttons,time, and score board.  And the other for the football field.  The screen keeps flickering really bad, to the point where I have to click on the buttons many times in order for them to work.  If I slow the time throgh the loop down, then I don't have that problem but I have to slow it down to 1 sec.  but I want it more around 200 milliseconds.   I've tried public void update(Graphics g){ paint(g); }   but that didn't help any.  Does anyone know a way I can update the panels w/out calling repaint(); all the time.  I've also tried panel1.repaint();  panel2.repaint();  And that doesn't work. Thanks for any help!!! Andy
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
Advertisement

www.yoursite.com
canasia.org
Compare garmin nuvifone
Buy compare &read about the Garmin nuvifone. Guaranteed next working day delivery service available online in UK.

Pozycjonowanie stron internetowych
YouTube Downloader - Tahitian Noni Juice - City of cite - iron foundry - Firmenadressen - Trouwjurk - songs store - houses in krakow developert - pozycjonowanie stron - Der Gipfel
śmieszne filmy
śmieszne filmy
www.kawe.pl
kalkulator kredytowy
Kredyty mieszkaniowe, hipoteczne
www.kredytmieszkani…
odtwarzacze MP3
odtwarzacze mp3
www.sirius.pl
Pozycjonowanie strony
Pozycjonowanie
www.truvati.pl
Darmowe gry
darmowe gry, gry
www.gry.freetravel.…
meble biurowe kostka brukowa Praca Dodatkowa zakłady sportowe Gatwick parking