Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


SurfaceView extremely low frame rate.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 SomeNoob   Members   -  Reputation: 102

Like
0Likes
Like

Posted 10 August 2014 - 01:30 PM

For some reason when using surface view I'm getting around 5 fps... Here's an idea of what I coded to measure the fps:

//game loop part of code(in another thread)
long start = System.currentTimeMillis();
while(game running){
end = System.currentTimeMillis();
if ((end - start) >= 1000) {
Log.d("PERSONAL", "FPS: " + fps + " milliseconds " + Long.toString(end - start));
start = System.currentTimeMillis();
fps = 0;
}
drawMethod();

}

//DrawMethod
public void drawMethod(){
fps++;
}

My question is how do I fix this problem of having such a low frame rate? And just to be clear when I did this test I wasn't drawing ANYTHING, I wanted to see what the baseline FPS would be without any drawing operations. 



Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS