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