Problem with frameRate

Hi i am making a game where the framerate has to be 60. However when i write
frameRate(60); in void setup and
println(frameCount) in draw it seems the frameCount is around 20. It Would be nice to know if there’s anything i can do to change this

Yeah - remove your call to println(). It’s pretty slow, and doesn’t like being called every frame.

That doesn’t seem to be the problem. I am using delay in void draw and it effects the frameRate. how can i set the framerate to 60 while still using the delay?

Wait. Hold on. You have calls to delay() in your code?

Yeah, remove those too. Normally I would post a rant about how awful delay() is. Basically it is not the function you want at all. Look up millis() instead.

1 Like

thank you for the help