Turning FPS off in Slick

Is there away to do it? Sorry for posting here instead of there forums, their registration is messed up.

GameContainerObject.setShowFPS(false);

If “lol–” is only supposed to be ran once per second, how come when i lower the logicupdate, my animation appears faster.

public class Ggame extends BasicGame{
    private Image longsword[];
    private float frame;
    private float lol;
    public Ggame(){ 
        super( "Sword Test"); 
    } 
    
 
    public static void main(String[] args) {
        try{ 
            AppGameContainer app = new AppGameContainer( new Ggame()  );
            app.setDisplayMode( 550, 500, false);
            app.setMaximumLogicUpdateInterval(25);
            app.setMinimumLogicUpdateInterval(25);
            app.setTargetFrameRate(60);
            app.setShowFPS(false);
            app.start(); 
            
        }catch ( SlickException e ){ 
            e.printStackTrace(); 
        } 
    }

    public void init( GameContainer container ) throws SlickException{
        frame = 0.0f;
        longsword = new Image[9];
        for(int k=0;k<longsword.length;k++)
            longsword[k] = new Image("longsword/longsword"+(k+1)+".png");
    }
    
    public void update( GameContainer gc, int delta ) throws SlickException{
        if(lol==0) lol = 8;
        if(frame % delta == 0) lol--;
        frame++;
        
    }
    public void render( GameContainer gc, Graphics g ) throws SlickException{ 
        longsword[Math.round(lol)].draw(0,0);
    }
}

why are you not using the slick animation class? there may be some problems with the setFrameRate method. Because the frames take less time since theya ren ot updating everytime, but I think that it should compensate though. fi you want the animations to be longer make the update time for the animation higher.
this might help:
http://slick.cokeandcode.com/wiki/doku.php?id=animations
here is some source code:


import org.newdawn.slick.Animation;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.SpriteSheet;

/**
 * A test for basic animation rendering
 *
 * @author kevin
 */
public class AnimationTest extends BasicGame {
	/** The animation loaded */
	private Animation animation;
	/** The limited animation loaded */
	private Animation limited;
	/** The manual update animation loaded */
	private Animation manual;
	/** The animation loaded */
	private Animation pingPong;
	/** The container */
	private GameContainer container;
	/** Start limited counter */
	private int start = 5000;
	
	/**
	 * Create a new image rendering test
	 */
	public AnimationTest() {
		super("Animation Test");
	}
	
	/**
	 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
	 */
	public void init(GameContainer container) throws SlickException {
		this.container = container;
		
		SpriteSheet sheet = new SpriteSheet("testdata/homeranim.png", 36, 65);
		animation = new Animation();
		for (int i=0;i<8;i++) {
			animation.addFrame(sheet.getSprite(i,0), 150);
		}
		limited = new Animation();
		for (int i=0;i<8;i++) {
			limited.addFrame(sheet.getSprite(i,0), 150);
		}
		limited.stopAt(7);
		manual = new Animation(false);
		for (int i=0;i<8;i++) {
			manual.addFrame(sheet.getSprite(i,0), 150);
		}
		pingPong = new Animation(sheet, 0,0,7,0,true,150,true);
		pingPong.setPingPong(true);
		container.getGraphics().setBackground(new Color(0.4f,0.6f,0.6f));
	}

	/**
	 * @see org.newdawn.slick.BasicGame#render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)
	 */
	public void render(GameContainer container, Graphics g) {
		g.drawString("Space to restart() animation", 100, 50);
		g.drawString("Til Limited animation: "+start, 100, 500);
		g.drawString("Hold 1 to move the manually animated", 100, 70);
		g.drawString("PingPong Frame:"+pingPong.getFrame(), 600, 70);
		
		g.scale(-1,1);
		animation.draw(-100,100);
		animation.draw(-200,100,36*4,65*4);
		if (start < 0) {
			limited.draw(-400,100,36*4,65*4);
		}
		manual.draw(-600,100,36*4,65*4);
		pingPong.draw(-700,100,36*2,65*2);
	}

	/**
	 * @see org.newdawn.slick.BasicGame#update(org.newdawn.slick.GameContainer, int)
	 */
	public void update(GameContainer container, int delta) {
		if (container.getInput().isKeyDown(Input.KEY_1)) {
			manual.update(delta);
		}
		if (start >= 0) {
			start -= delta;
		}
	}

	/**
	 * Entry point to our test
	 * 
	 * @param argv The arguments to pass into the test
	 */
	public static void main(String[] argv) {
		try {
			AppGameContainer container = new AppGameContainer(new AnimationTest());
			container.setDisplayMode(800,600,false);
			container.start();
		} catch (SlickException e) {
			e.printStackTrace();
		}
	}

	/**
	 * @see org.newdawn.slick.BasicGame#keyPressed(int, char)
	 */
	public void keyPressed(int key, char c) {
		if (key == Input.KEY_ESCAPE) {
			container.exit();
		}
		if (key == Input.KEY_SPACE) {
			limited.restart();
		}
	}
}

all credit goes to kevin.

hope this helped.