Discuss Scratch

beatboxer433
Scratcher
9 posts

how do i make an accurate and consistent fps counter

the one i use is:
when green flag clicked
reset timer
forever
set [fps] to ((1) / (timer))
reset timer
end
(note: if the blocks look unaligned or just are genuinely in a mess please tell me)
however, using methods to set fps to a higher value have not worked, and the only way to change it is to lag the project in general to get the counter under 30.
i've also used another fps counter, but instead it gives me 15 fps instead of 30 fps from the fps counter above.
in general i just need a consistent fps counter
PhiPhenomenon
Scratcher
500+ posts

how do i make an accurate and consistent fps counter

Your FPS counter should be working. On the Scratch website, you won't be able to make the FPS counter go higher than 30 since that's the framerate all the projects run at. If you want to try testing your FPS counter at higher framerates, you should share your project and port it into Turbowarp. Holding the alt key and pressing the green flag will switch the project to run at 60 FPS.

Anyway, if you want to try a different script that doesn't involve resetting the timer, you can use this:

when flag clicked
set [Previous v] to (0)
forever
set [FPS v] to ((1)/((timer)-(Previous)))
set [Previous v] to (timer)
end

Last edited by PhiPhenomenon (March 27, 2024 01:09:50)

WallydogChoppychop
Scratcher
500+ posts

how do i make an accurate and consistent fps counter

beatboxer433 wrote:

the one i use is:
when green flag clicked
reset timer
forever
set [fps] to ((1) / (timer))
reset timer
end
(note: if the blocks look unaligned or just are genuinely in a mess please tell me)
however, using methods to set fps to a higher value have not worked, and the only way to change it is to lag the project in general to get the counter under 30.
i've also used another fps counter, but instead it gives me 15 fps instead of 30 fps from the fps counter above.
in general i just need a consistent fps counter
An fps counter does not change the fps it detects the fps (hence fps counter)
As PhiPhenomenom has said you could use TurboWarp if you would like to increase the fps

Last edited by WallydogChoppychop (March 27, 2024 06:24:49)


Kumquats are tasty
I started scratch in 2.0
Is that a rare thing?
SOME ONE TELL ME
(Removed by moderator - Please don't show disturbing images of kumquats)

I'm asleep like all the time…
-ExoByte-
Scratcher
100+ posts

how do i make an accurate and consistent fps counter

beatboxer433 wrote:

the one i use is:
when green flag clicked
reset timer
forever
set [fps] to ((1) / (timer))
reset timer
end
(note: if the blocks look unaligned or just are genuinely in a mess please tell me)
however, using methods to set fps to a higher value have not worked, and the only way to change it is to lag the project in general to get the counter under 30.
i've also used another fps counter, but instead it gives me 15 fps instead of 30 fps from the fps counter above.
in general i just need a consistent fps counter
I'm no professional, but you should probably post this in the “Help with Scripts” topic instead. Also, there is a McVincient (@fanjoua) video on how to make one.

Hi! I'm @-ExoByte-. I like to code, play games, I'm a fan of Kirby and Sonic (but mostly Sonic), I'm the manager of Code Bros. Studios™️, and I love donuts.

(VovoV)
^
This is Louie. He's a block pup that protects me from unhealthy obsessions with skibidi toilets.

Powered by DjangoBB