Can't find FPS?

First of all hello everyone :slight_smile: I am new to Slick and I just started. I know how to pogram in Java but I want to start making games. Now I was just trying out the tutorials on the site when I stumbled on a little problem. When I run the code in the left corner “FPS: XXX” appears? I can’t find the code line that does this? Can someone explain this to me please?

Code:

package Game;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;

public class Code extends BasicGame{
Image land = null;
Image plane = null;
float x = 400;
float y = 300;
float scale = 1.0f;

public Code(){
    super("Van Hoeserlande Jordi");
    
}

public void init(GameContainer event) throws SlickException{
	land = new Image("Land_Background.jpg");
	plane = new Image("Plane_Image.png");
}

public void update(GameContainer event, int delta) throws SlickException{
	Input input = event.getInput();
	  
    if(input.isKeyDown(Input.KEY_Q)){
        plane.rotate(-0.2f * delta);
    }

    if(input.isKeyDown(Input.KEY_D)){
        plane.rotate(0.2f * delta);
    }

    if(input.isKeyDown(Input.KEY_Z)){
        float hip = 0.4f * delta;

        float rotation = plane.getRotation();

        x+= hip * Math.sin(Math.toRadians(rotation));
        y-= hip * Math.cos(Math.toRadians(rotation));
    }
    
    if(input.isKeyDown(Input.KEY_S)){
        float hip = 0.4f * delta;

        float rotation = plane.getRotation();

        x-= hip * Math.sin(Math.toRadians(rotation));
        y+= hip * Math.cos(Math.toRadians(rotation));
    }
}

public void render(GameContainer event, Graphics g) throws SlickException{
	land.draw(0, 0);
	plane.draw(x, y, scale);
}

public static void main(String[] args) throws SlickException{
     AppGameContainer screen = new AppGameContainer(new Code());
     screen.setDisplayMode(800, 600, false);
     screen.start();
}

}

The fps thing is part of Slick.

I have not used libGDX, but i recommend libGDX over slick.

Yeah I know but I tried… Slick has more information and more tutorials.
And I can understand it so why not :slight_smile:

So do you mean it will always be there?

there is a way to turn it off, i cant remember how.

For libGDX tutorials: http://code.google.com/p/libgdx/wiki/TableOfContents

also i read that it comes with some premade games in a post today, you could check out the source code for them

[quote=“Phased,post:4,topic:40825”]
Indeed, here’s a link to the docs:
http://slick.cokeandcode.com/javadoc/org/newdawn/slick/GameContainer.html

Just call setShowFPS(false) on your GameContainer object, and voila: it’s gone.

Oke thank you! :slight_smile: