• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

frame rate slowly increases  RSS feed

Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm making a game, and I have a GamePanel class that controls the updating for the game and the screen. The method is written so that the game update rate would be kept at a constant rate, and the frame rate follows the update rate as a cap. The problem I'm having is that when the game starts, the FPS is at around 40, and the "game" updating is at 60 (and it's has been always at 60). The frame rate would slowly increase, and after about 15 seconds, it would rise to about 58FPS. Why does this happen? I'm sure it's not that My computer can't handle 60FPS... I tried changing the target UPS (which is the general Updates per second) to a hundred and the frame rate started at 80FPS, and then slowly increase to 99FPS. Why does this happen? How can I let it boost to 60FPS faster? Are all games like this? (because some games I look at do in fact start at a lower FPS, but they boost up to a higher rate much much faster).

If it helps, here's the code for the run method which does all the updating controls

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a great little tut, about timing using java.
I recommend using the example class
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!