Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualPsychotikRabbit

Posted 12 December 2012 - 09:00 AM

For the timer you can try differents values to test the stability of your games but as I said 25 frames per second should be enough.

And is the repaint() method call is really necessary in your paintComponent method ?
@Override
public void paintComponent(Graphics g){
  super.paintComponent(g);
  Graphics2D g2d = (Graphics2D) g;
  if(Map.redLevel == true){
   g2d.drawImage(background, himmelX, himmelY, null);
   g2d.drawImage(background2, himmelX2, himmelY2, null);
   g2d.drawImage(lava, grassX+80, grassY+355, null);
   g2d.drawImage(lava, grassX+680, grassY+130, null);
   repaint();
  }
}

#1PsychotikRabbit

Posted 12 December 2012 - 08:59 AM

For the timer you can try differents values to test the stability of your games but as I said 25 frames per second should be enough.

And is the repaint() method call is really necessary in your paintComponent method ?
@Override
public void paintComponent(Graphics g){
  super.paintComponent(g);
  Graphics2D g2d = (Graphics2D) g;
  if(Map.redLevel == true){
   g2d.drawImage(background, himmelX, himmelY, null);
   g2d.drawImage(background2, himmelX2, himmelY2, null);
   g2d.drawImage(lava, grassX+80, grassY+355, null);
   g2d.drawImage(lava, grassX+680, grassY+130, null);
   [b]repaint();[/b]
  }
}

PARTNERS