Be sure to check out the survey on the blog sidebar!

X

Sunday, January 11, 2015

FPS?

Upon posting my previous post, I got some immediate questions about how I tracked FPS.
I decided to do a mini tutorial about how to track FPS on projects, because when developing, knowing your project's FPS can be very helpful.

How to add a basic FPS client on scratch:



1. First make 3 variables:
FPS
FPS Number
Test


2. Then, in each sprite (including the stage), put in this script:


3. In the "Stage" script, put in this script:


4. Also in the "Stage" script, put in:


5. Lastly, in the "set FPS to..." script, replace the "2" in "FPS Number / (1 + 2)" with however many sprites are in your project (excluding the stage script).  This is a key step.

Now you are finished.  This basically measures the total run speed of the project, and in turn tells you the frames per second.  If done properly, your FPS in a basic project should be anywhere from 20-30.  In my "Space" project, I had a high amount of cloned sprites, so it was around 10-15.  Anyway, I hope this helps you when developing scratch projects!  Enjoy!

~Rant


No comments:

Post a Comment