Gostaria de saber alguma forma para eu poder saber o fps que está rodando o meu jogo, tem como?
Como pegar o FPS em java?
P
1 Resposta
R
int totalFrameCount = 0;
TimerTask updateFPS = new TimerTask() {
public void run() {
// display current totalFrameCount - previous,
// OR
// display current totalFrameCount, then set
totalFrameCount = 0;
}
}
Timer t = new Timer();
t.scheduleAtFixedRate(updateFPS, 1000, 1000);
while (running) {
// your code
totalFrameCount++;
}
Tenda esse code. Obs: Não testei.
Criado 7 de outubro de 2017
Ultima resposta 7 de out. de 2017
Respostas 1
Participantes 2