Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I have a problem with the FPS counter on my "platformer"
- zaid1442011
-
Scratcher
500+ posts
I have a problem with the FPS counter on my "platformer"
The counter works great on the main menu You won't see them anyway., but when the game starts the counter shows only 2. I checked the other counter (The unrounded one called “tps”) it says 1.7……….. , so I posted here. Here is the link. I would give every one who contributed to this VIP (It currently gives you access to an empty room). I got the script from my engine, so tell me if there is something wrong with it.
Edit: There where certain ticks which the counter functions then malfunction.
Edit: In Turbowarp, the counter stops once the project begins. (gonna test this theory in scratch)
Edit: On Scratch the counter turns to a value between 1.5 and 2, then it stops.
Edit: Don't forget to click d when debugging
Edit: There where certain ticks which the counter functions then malfunction.
Edit: In Turbowarp, the counter stops once the project begins. (gonna test this theory in scratch)
Edit: On Scratch the counter turns to a value between 1.5 and 2, then it stops.
Edit: Don't forget to click d when debugging
Last edited by zaid1442011 (Aug. 21, 2023 10:12:42)
- zaid1442011
-
Scratcher
500+ posts
I have a problem with the FPS counter on my "platformer"
(#2)This script runs way before the problem occurs. It even runs way before the user clicks the play button (The event which breaks The Counter). If you think I am understanding you wrong. Please explain. I would add stuff to help you debug.
I think this block of code is the culprit… See the other scripts in sprite block? I think it pauses forever loops causing the FPS to act a bit weird…when green flag clicked
delete (all v) of [list v]
set [My player v] to [0]
hide variable [Apples v]
hide variable [Scene # v]
hide variable [FPS v]
if <<> or <<(☁ MAINTENANCE) > [0]> and <not <<(username) = [zaid1442011]> or <>>>>> then
broadcast [Maintenance v]
else
set [MAX PLAYERS v] to [6]
broadcast [setup - opponents v]
broadcast [Main Menu v]
forever
if <<> or <<(☁ MAINTENANCE) > [0]> and <not <<(username) = [zaid1442011]> or <>>>>> then
broadcast [Maintenance v]
stop [other scripts in sprite v]
stop [this script v]
end
end
end
- zaid1442011
-
Scratcher
500+ posts
I have a problem with the FPS counter on my "platformer"
Nothing even with 250 FPS


- -Heron-
-
Scratcher
15 posts
I have a problem with the FPS counter on my "platformer"
The block
@–ThatCrownedKing– is correct in that you have a “stop other scripts in sprite” block that stops the script that calculates the FPS from running. To fix this, I'd add a new broadcast message called “check FPS” that just reactivates the FPS code, like this:
Let me know if you have any questions!
Begin Scene # (scene #) go to x, y: (x) (y)is the issue.
@–ThatCrownedKing– is correct in that you have a “stop other scripts in sprite” block that stops the script that calculates the FPS from running. To fix this, I'd add a new broadcast message called “check FPS” that just reactivates the FPS code, like this:
when I receive [ check FPS v]and broadcast the message directly after you have the “stop other scripts in sprite” block.
forever
FPS Count
end
Let me know if you have any questions!
- zaid1442011
-
Scratcher
500+ posts
I have a problem with the FPS counter on my "platformer"
The blockI totally forgot about the stop blocks. Gonna try fix it in my old iPad. I will give you all a VIP rank on my platformer. To access the empty room.Begin Scene # (scene #) go to x, y: (x) (y)is the issue.
@–ThatCrownedKing– is correct in that you have a “stop other scripts in sprite” block that stops the script that calculates the FPS from running. To fix this, I'd add a new broadcast message called “check FPS” that just reactivates the FPS code, like this:when I receive [ check FPS v]and broadcast the message directly after you have the “stop other scripts in sprite” block.
forever
FPS Count
end
Let me know if you have any questions!
- Discussion Forums
- » Help with Scripts
-
» I have a problem with the FPS counter on my "platformer"