Discuss Scratch

Empire11
Scratcher
8 posts

How do you count Frames per second? (FPS)

Just wondering how… and could not find it when I searched.
FloweyTheFlower42
Scratcher
90 posts

How do you count Frames per second? (FPS)

I think you do this:

forever
set [Clock v] to [0]
reset timer
repeat until <(timer) > [1]>
change [Clock v] by (1)
end
set [FPS v] to (Clock)
end

Slow and uninteresting, but enjoy if you can.
awesomeawesxomeman3
Scratcher
62 posts

How do you count Frames per second? (FPS)

FloweyTheFlower42 wrote:

I think you do this:

forever
set [Clock v] to [0]
reset timer
repeat until <(timer) > [1]>
change [Clock v] by (1)
end
set [FPS v] to (Clock)
end

a more responsive and smaller solution is:
set [FPS v] to ((1) / (timer))
reset timer

make sure this block is running within your main game block or else it will not be accurate

Last edited by awesomeawesxomeman3 (Jan. 3, 2018 00:03:32)


Empire11
Scratcher
8 posts

How do you count Frames per second? (FPS)

Thanks
Empire11
Scratcher
8 posts

How do you count Frames per second? (FPS)


set [ Gratitude] to [100]

Last edited by Empire11 (Jan. 3, 2018 14:45:17)

Powered by DjangoBB

Standard | Mobile