FPS keeper

Why so slow? See your Frames Per Second! :slight_smile:

–Here is the code


--# Main

function setup()

--Nothing Here

end


function draw()

    background(40, 40, 50)

    --Keeps track of you FPS

fps = 1/DeltaTime

--Shows you FPS

text("FPS: " ..fps, 400, 500)

end

60 FPS is very fast, it’s the maximum on iOS’ hardware.

A popular FPS average used (created by @Jmv38) is

FPS = FPS * 0.9 + 0.1 / DeltaTime

(Also, I have a “True FPS” dependency on Codea Community that sets FPS to the exact amount of frames drawn in the last second.)